gBroutin / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

UnsatisfiedLinkErrors with Native Library Suffixes #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What procedure will reproduce the problem?
Try to run any GStreamer-Java application on Ubuntu 11.10 (Oneiric Ocelot) 
32/64-bit

What happens? UnsatisfiedLinkError: Unable to load library 'gstreamer-0.10': libgstreamer-0.10.so: cannot open shared object file: No such file or directory UnsatisfiedLinkError: Unable to load library 'glib-2.0': libglib-2.0.so: cannot open shared object file: No such file or directory UnsatisfiedLinkError: Unable to load library 'gobject-2.0': libgobject-2.0.so: cannot open shared object file: No such file or directory UnsatisfiedLinkError: Unable to load library 'gstinterfaces-0.10': libgstinterfaces-0.10.so: cannot open shared object file: No such file or directory UnsatisfiedLinkError: Unable to load library 'gstbase-0.10': libgstbase-0.10.so: cannot open shared object file: No such file or directory

System environment:
GStreamer-Java 1.5 (release)
GStreamer 0.10 (0.10.35-1)
Ubuntu 11.10 Oneiric Ocelot 64-bit
OpenJDK 7 (7~b147-2.0~pre6-1ubuntu1)

Workaround: sudo ln -sf /usr/lib/libgstreamer-0.10.so.0.29.0
/usr/lib/libgstreamer-0.10.so sudo ln -sf /lib/x86_64-linux-gnu/libglib-2.0.so.0.3000.0
/lib/x86_64-linux-gnu/libglib-2.0.so sudo ln -sf /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3000.0 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so sudo ln -sf /usr/lib/libgstinterfaces-0.10.so.0.24.0
/usr/lib/libgstinterfaces-0.10.so sudo ln -sf /usr/lib/libgstbase-0.10.so.0.29.0
/usr/lib/libgstbase-0.10.so

Request:
GStreamer-Java should be able to find the native libraries even though their 
file names might have unexpected suffixes.

Original issue reported on code.google.com by lukaskae...@gmail.com on 16 Oct 2011 at 3:20

GoogleCodeExporter commented 8 years ago
A simpler work-around is to install the package libgstreamer0.10-dev. 
Specifying version names when loading a native library via Native.loadLibrary 
is not practical, because there too many variants.

Original comment by tsha...@gmail.com on 16 Oct 2011 at 4:44

GoogleCodeExporter commented 8 years ago
I tried installing libgstreamer0.10-dev but still received the error. It wasn't 
until I used the workaround above that I actually got it running. 

Original comment by ty.bur...@gmail.com on 20 Oct 2011 at 3:47

GoogleCodeExporter commented 8 years ago
we use these patches on fedora/rhel:
http://pkgs.fedoraproject.org/gitweb/?p=jna.git;a=tree
if ubuntu don't use them especially this:
http://pkgs.fedoraproject.org/gitweb/?p=jna.git;a=blob;f=jna-3.2.5-loadlibrary.p
atch;h=99b2798a577d5b5e52d94da1ed4e2d39c2e74774;hb=HEAD
then it can be also the reason.

Original comment by lfar...@lfarkas.org on 20 Oct 2011 at 5:35

GoogleCodeExporter commented 8 years ago
sudo apt-get install libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev 
libglib2.0-dev

Above packages on Ubuntu 11.04 create the same symlinks you have manually 
created above. Is this not the case on Ubuntu 11.10?

Original comment by tsha...@gmail.com on 20 Oct 2011 at 5:56

GoogleCodeExporter commented 8 years ago
Ubuntu 12.04 LTS: same problem and same fix (symlinks or comment #4).

Original comment by lukaskae...@gmail.com on 30 Apr 2012 at 5:55

GoogleCodeExporter commented 8 years ago
Ubuntu 12.04 LTS: comment #4 - thanks for the solution, that saved a lot of 
time.

Original comment by felixw2...@googlemail.com on 8 Jul 2012 at 11:25