0

I am trying to start PulseView and sigrok AppImages. Unfortunately, I am getting an error message and I cannot figure out how to fix it:

./sigrok-cli-0.7.1-x86_64.AppImage 
sigrok-cli: symbol lookup error: /tmp/.mount_sigrokLM29y6/usr/lib/libsigrok.so.4: undefined symbol: libusb_get_version

./PulseView-0.4.1-x86_64.AppImage 
pulseview: symbol lookup error: /tmp/.mount_PulseVunpXcp/usr/lib/libsigrok.so.4: undefined symbol: libusb_get_version

Then, I tried to build from source following the instructions at https://sigrok.org/wiki/Linux . I have built successfully all libraries but got the same undefined reference to libusb when building sigrok-cli:

~/temp/sigrok-cli$ make
make  all-am
  CCLD     sigrok-cli
/usr/local/lib/libsigrok.so: undefined reference to `libusb_free_pollfds'
/usr/local/lib/libsigrok.so: undefined reference to `libusb_get_version'
/usr/local/lib/libsigrok.so: undefined reference to `libusb_handle_events_timeout_completed'
/usr/local/lib/libsigrok.so: undefined reference to `libusb_has_capability'
/usr/local/lib/libsigrok.so: undefined reference to `libusb_error_name'
/usr/local/lib/libsigrok.so: undefined reference to `libusb_get_port_numbers'
collect2: error: ld returned 1 exit status
Makefile:476: recipe for target 'sigrok-cli' failed
make[1]: *** [sigrok-cli] Error 1
Makefile:362: recipe for target 'all' failed
make: *** [all] Error 2

Here are some dumps:

$ lsb_release -a
LSB Version:    core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial

$ apt-cache policy libusb-1.0*
libusb-1.0-0:
  Installed: 2:1.0.20-1
  Candidate: 2:1.0.20-1
  Version table:
 *** 2:1.0.20-1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
libusb-1.0-0-dbg:
  Installed: (none)
  Candidate: 2:1.0.20-1
  Version table:
     2:1.0.20-1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libusb-1.0-0-dev:
  Installed: 2:1.0.20-1
  Candidate: 2:1.0.20-1
  Version table:
 *** 2:1.0.20-1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
libusb-1.0-doc:
  Installed: 2:1.0.20-1
  Candidate: 2:1.0.20-1
  Version table:
 *** 2:1.0.20-1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

Do you have ideas what is the problem?

1 Answer 1

-1

I fixed the problem thanks to the help of a developer in the sigrok mailing list. I had an outdated libusb version installed in /usr/local/lib/libusb-1.0.so.0

ldd showed that libsigrok.so, that I previously built, was refering to libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0

$ ldd /usr/local/lib/libsigrok.so linux-vdso.so.1 =>  (0x00007fffd00c9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9e60cb4000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
(0x00007f9e609a3000) libserialport.so.0 =>
/usr/local/lib/libserialport.so.0 (0x00007f9e60792000) libftdi1.so.2 =>
/usr/lib/x86_64-linux-gnu/libftdi1.so.2 (0x00007f9e60584000)
libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f9e60376000)
libzip.so.4 => /usr/lib/x86_64-linux-gnu/libzip.so.4 (0x00007f9e60163000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f9e5ff46000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
(0x00007f9e5fb7c000) /lib64/ld-linux-x86-64.so.2 (0x00007f9e612d2000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f9e5f90c000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9e5f704000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9e5f4ea000)

nm showed that the required symbols are missing

$nm -gD /usr/local/lib/libusb-1.0.so.0 | grep version

Then I searched for other libusb containing the symbols

$ locate libusb-1.0.so.0
/lib/x86_64-linux-gnu/libusb-1.0.so.0
/lib/x86_64-linux-gnu/libusb-1.0.so.0.1.0
/opt/calibre/lib/libusb-1.0.so.0
/usr/lib/libusb-1.0.so.0
/usr/lib/libusb-1.0.so.0.0.0
/usr/local/lib/libusb-1.0.so.0
/usr/local/lib/libusb-1.0.so.0_toberemoved

$ nm -gD /lib/x86_64-linux-gnu/libusb-1.0.so.0 | grep version
0000000000006190 T libusb_get_version

Finally, I renamed the outdated /usr/local/lib/libusb-1.0.so.0 . The dependency of libsigrok corrected itself to /lib/x86_64-linux-gnu as confirmed with ldd. After that I managed to build sigrok-cli and start the AppImages PulseView-0.4.1-x86_64.AppImage and sigrok-cli-0.7.1-x86_64.AppImage without any problems.

$ sudo mv /usr/local/lib/libusb-1.0.so.0 /usr/local/lib/libusb-1.0.so.0-temp
$ ldd /usr/local/lib/libsigrok.so
linux-vdso.so.1 =>  (0x00007ffe453e1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f10f103e000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
(0x00007f10f0d2d000)
libserialport.so.0 => /usr/local/lib/libserialport.so.0 (0x00007f10f0b1c000)
libftdi1.so.2 => /usr/lib/x86_64-linux-gnu/libftdi1.so.2
(0x00007f10f090e000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0
(0x00007f10f06f6000)
libzip.so.4 => /usr/lib/x86_64-linux-gnu/libzip.so.4 (0x00007f10f04e3000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f10f02c6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f10efefc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f10f165c000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f10efc8c000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f10f1834000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f10efa72000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f10ef86a000)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .