Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: libusb_set_option #1277

Closed
PSLLSP opened this issue Nov 10, 2022 · 4 comments · Fixed by #978
Closed

undefined symbol: libusb_set_option #1277

PSLLSP opened this issue Nov 10, 2022 · 4 comments · Fixed by #978

Comments

@PSLLSP
Copy link

PSLLSP commented Nov 10, 2022

Ubuntu 18.04.6

When I try to run st-info, I get an error:
st-info: symbol lookup error: /usr/lib/libstlink.so.1: undefined symbol: libusb_set_option

user@ubuntu:~$ sudo dpkg -i ~/Downloads/stlink_1.7.0-1_amd64.deb 
Selecting previously unselected package stlink.
(Reading database ... 386526 files and directories currently installed.)
Preparing to unpack .../stlink_1.7.0-1_amd64.deb ...
Unpacking stlink (1.7.0-1) ...
Setting up stlink (1.7.0-1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

user@ubuntu:~$ st-info --version
v1.7.0

The issue:

user@ubuntu:~$ st-info --probe
st-info: symbol lookup error: /usr/lib/libstlink.so.1: undefined symbol: libusb_set_option

These "libusb" libraries are installed at my box:

user@ubuntu:~$ dpkg -la | grep libusb
ii  libgusb2:amd64                            0.2.11-1                                        amd64        GLib wrapper around libusb1
ii  libusb-0.1-4:amd64                        2:0.1.12-31                                     amd64        userspace USB programming library
ii  libusb-1.0-0:amd64                        2:1.0.21-2                                      amd64        userspace USB programming library
ii  libusb-1.0-0:i386                         2:1.0.21-2                                      i386         userspace USB programming library
ii  libusb-1.0-0-dev:amd64                    2:1.0.21-2                                      amd64        userspace USB programming library development files
ii  libusb-1.0-doc                            2:1.0.21-2                                      all          documentation for userspace USB programming
ii  libusbmuxd4:amd64                         1.1.0~git20171206.c724e70f-0.1                  amd64        USB multiplexor daemon for iPhone and iPod Touch devices - library

ldd info:

user@ubuntu:~$ ldd /usr/bin/st-info
	linux-vdso.so.1 (0x00007fffb3f9d000)
	libstlink.so.1 => /usr/lib/libstlink.so.1 (0x00007f945a5fb000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f945a034000)
	libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f9459e1c000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f945a425000)
	libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f9459bfe000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f94599df000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f94597d7000)
@gszy
Copy link
Collaborator

gszy commented Nov 13, 2022

Is this the same as #1089 perhaps?

@PSLLSP
Copy link
Author

PSLLSP commented Nov 13, 2022

I think it is the same as #1089...

@slyshykO
Copy link
Collaborator

looks like st-utils is built with a newer version of libusb that is present in the system.

try locally to build st-utils from the sources.

@Nightwalker-87
Copy link
Member

Fixed by #978.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants