I have validated the following on Ubuntu 21.04 (vanilla, upgraded from
20.10, using the gnome DE instead of Ubuntu):

* The Arduino application fails while loading 
/usr/lib/x86_64-linux-gnu/liblistSerialsj.so.1.4.0 due to undefined symbol: 
sp_get_port_usb_vid_pid
* Running 'nm -D /usr/lib/x86_64-linux-gnu/liblistSerialsj.so.1.4.0' shows 'U 
sp_get_port_usb_vid_pid", meaning that that library depends on that symbol, but 
doesn't provide it
* Running 'ldd /usr/lib/x86_64-linux-gnu/liblistSerialsj.so.1.4.0' doesn't list 
any dependencies that provide the missing symbol
* Installing the package listserialportsc and running "listserialportsc" works
* Running 'nm -D /usr/bin/listserialportsc' also shows 'U 
sp_get_port_usb_vid_pid'
* Running 'ldd /usr/bin/listserialportsc' lists 'libserialport.so.0 => 
/lib/x86_64-linux-gnu/libserialport.so.0 (0x00007f610efaa000)'
* Running 'nm -D /lib/x86_64-linux-gnu/libserialport.so.0' prints 
'0000000000002700 T sp_get_port_usb_vid_pid' indicating that that library 
provides the missing symbol
* Patching liblistSerialsj.so.1.4.0 so that it specifies an ELF dependency on 
libserialport.so.0 provides the missing symbol and allows the application to 
start as expected
* This patching can be performed by running 'sudo patchelf --add-needed 
libserialport.so.0 liblistSerialsj.so.1.4.0' (recommended to back up the 
original library beforehand, e.g. sudo cp liblistSerialsj.so.1.4.0 
liblistSerialsj.so.1.4.0.orig)

Looking at the build scripts in the listSerialPortsC project, I suspect
things were mis-translated going into the Ubuntu build process - the
build scripts "vendor-in" the .c files with the required symbols rather
than using a dynamic-link dependency on the libserialport.so library.
If the debian package for liblistSerialsj is compiling the project
sources without either adding -Lserialport to the compile/link line or
vendoring in those sources, that would explain the issue.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916278

Title:
  Arduino fails to start: undefined symbol: sp_get_port_usb_vid_pid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/arduino/+bug/1916278/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to