Linux 64bits bug on libudev

8 views
Skip to first unread message

Laurent Bourdette

unread,
Mar 22, 2016, 11:11:40 AM3/22/16
to serial communication manager
hello,
On Linux 64 bits a bug due to differences between 32/64 on libudev
can be corrected "by hand" but need to be corrected in library ...

Thank's for your very good job, I continue to evaluate the library.
Laurent Bourdette from France.


./build-and-run.sh
Executing FindPorts application
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/scm_tuartx1/linux_1.0.4_x86_64.so: libudev.so.0: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type = ( can't open, file not found )
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    at com.embeddedunveiled.serial.internal.SerialComPortJNIBridge.loadNativeLibrary(SerialComPortJNIBridge.java:252)
    at com.embeddedunveiled.serial.SerialComManager.<init>(SerialComManager.java:469)
    at FindPorts.main(FindPorts.java:25)

Explanation of the problem :

>For 64-bit Ubuntu, it is in the 32-bit libudev0 package.

>You can install that with the following command:

>sudo apt-get install libudev0:i386
>This package was removed from Ubuntu in 14.04.

More explanation and solving :
http://askubuntu.com/questions/288821/how-do-i-resolve-a-cannot-open-shared-object-file-libudev-so-0-error


The ( bad ) solution :

sudo ln -sf /lib/$(arch)-linux-gnu/libudev.so.1 /lib/$(arch)-linux-gnu/libudev.so.0

After, work fine.
 ./build-and-run.sh
Executing FindPorts application
/dev/console
/dev/ptmx
/dev/pts/0
/dev/pts/1
/dev/pts/ptmx
/dev/tty



rishi gupta

unread,
Mar 22, 2016, 12:16:47 PM3/22/16
to Laurent Bourdette, serial communication manager
Hi Laurent, Thanks for details. Here is the dependency SCM have on other libraries.

linux-gate.so.1 =>  (0xf7729000)
libudev.so.0 => /lib/i386-linux-gnu/libudev.so.0 (0xf767b000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74d2000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf74c8000)
/lib/ld-linux.so.2 (0xf772a000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf74ad000)

linux-vdso.so.1 =>  (0x00007fff081fe000)
libudev.so.0 => /lib/x86_64-linux-gnu/libudev.so.0 (0x00007f51715c9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f517120b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5171002000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5171a8d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5170de5000)

I use 12.04 because I need it to build android. I am fully aware of 32/64 bit udev.

For 32 bit on ubuntu 12.04
sudo apt-get install libudev0:i386
sudo apt-get install libudev-dev:i386

For 64 bit on ubuntu 12.04
sudo apt-get install libudev-dev

For embedded linux
libudev.so.1

Please explain a bit how this can be solved in library itself. Different Linux distro uses different packges.
I planned to add support for systemd daemon but have to wait until ubuntu 12.06 is released in April 2016 :)

--
You received this message because you are subscribed to the Google Groups "serial communication manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serial-communication...@googlegroups.com.
To post to this group, send email to serial-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/serial-communication-manager/e3e597df-7635-4232-ab5b-c52a1b5472a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages