Skip to content

libffi.so.7 missing from linux libs #219

Open
@mgunyho

Description

@mgunyho

Hi, I was trying to play a video file with Processing on openSUSE Tumbleweed. I first ran into #214, but after fixing the symlinks, if I try to run any of the examples I get the error

can't load library gobject-2.0 (gobject-2.0|libgobject-2.0|libgobject-2.0-0) with -Djna.library.path=~/sketchbook/libraries/video/library/linux-amd64. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'gobject-2.0':
libffi.so.7: cannot open shared object file: No such file or directory
libffi.so.7: cannot open shared object file: No such file or directory
/usr/lib64/libgobject-2.0.so.0.7600.4: undefined symbol: g_bookmark_file_copy
Native library (linux-x86-64/libgobject-2.0.so) not found in resource path (/tmp/processing/Loop17380185095420067892temp:~/Apps/processing/processing-4.3/core/library/jogl-all.jar:~/Apps/processing/processing-4.3/core/library/gluegen-rt.jar:~/Apps/processing/processing-4.3/core/library/core.jar:~/sketchbook/libraries/video/library/gst1-java-core-1.4.0.jar:~/sketchbook/libraries/video/library/video.jar:~/sketchbook/libraries/video/library/jna.jar)
/lib64/libgobject-2.0.so.0: undefined symbol: g_bookmark_file_copy
/lib64/libgobject-2.0.so.0: undefined symbol: g_bookmark_file_copy
/lib64/libgobject-2.0.so.0: undefined symbol: g_bookmark_file_copy
Native library (linux-x86-64/libgio-2.0.so) not found in resource path

... and a bunch of other errors, many (all?) of the .so libraries fail to load.

This seems to be because my distro doesn't ship libffi.so.7, but .so.8, which is backwards incompatible (the ABI was changed in libffi 3.4.0 released in 2021). So I think either the libraries should be updated to later versions which presumably use libffi.so.8, or libffi7 should be bundled along with the other libs. I see that libffi-7 is bundled in the mingw version here, but it's not in the list of linux libs.

workaround

I was able to work around this by manually downloading libffi.so.7 from an RPM distribution site, placing it next to the other libs, and then running sketches from the terminal with LD_LIBRARY_PATH set:

$ export LD_LIBRARY_PATH=~/sketchbook/libraries/video/library/linux-amd64/ 
$ processing-java --sketch=path_to_sketch --run

This gets rid of all the .so errors. I wasn't able to set the LD_LIBRARY_PATH for the processing IDE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions