Skip to content

Preparing the FLI SDK Dependency #1

@cversek

Description

@cversek

If you are getting an error message like
OSError: libfli.so: cannot open shared object file: No such file or directory
it is very likely that the FLI SDK hasn't been compiled and installed properly.

There are a few steps that one needs to prepare FLI's SDK so that python-FLI can provide access to the C library.

First, the SDK must be compiled as a shared object/dynamic library (.so file) rather than the default, which is a static object (.a file). I have just posted a replacement Makefile that can be dropped in the libfli-1.104 source package folder. Then one can run make clean (if code was already compiled) then make install (as root). That should build the library so that it can be handled by the Python ctypes module (python-FLI is just a slightly more convenient OO wrapper for this foreign function interface module) and copy it to /usr/local/lib.

Now depending on the target Linux system /usr/local/lib might not be on the dynamic libraries path. There are many ways to get this library found, but I have a few suggestions in order of least hacky first. On Ubuntu and similar, that path could be added to the end of file /etc/ld.so.conf, which is updated next by running ldconfig. If that doesn't seem to work, you could create a symbolic link like this:
sudo ln -s /usr/local/lib/libfli.so /usr/lib
If ctypes is still having trouble finding the library, you could always just drop it into the python package folder (probably somewhere like /usr/local/lib/python2.7/dist-packages/FLI-dev-py2.7.egg/FLI/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions