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

STM32f103C8: undefined symbol: libusb_set_option #1089

Closed
dcmde opened this issue Jan 28, 2021 · 1 comment · Fixed by #978
Closed

STM32f103C8: undefined symbol: libusb_set_option #1089

dcmde opened this issue Jan 28, 2021 · 1 comment · Fixed by #978

Comments

@dcmde
Copy link

dcmde commented Jan 28, 2021

  • I made serious effort to avoid creating duplicate or nearly similar issue

  • Programmer/board type: [Stlink v2-clone] (e.g Stlink /v1, /v2, /v2-clone, /v2-1)

  • Operating system and version: [Linux] (e.g Linux, Mac OS X, Windows)

  • Stlink tools version and/or git commit hash: [1.6.1-1] (e.g v1.1.0/git-c722056)

  • Stlink commandline tool name: [st-info] (e.g st-info, st-flash, st-util)

  • Target chip (and board if applicable): [Stm32f103c8] (e.g STM32F402VG)

Commandline-Output:

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

Expected/description:

I installed the package on my Ubuntu 18.04,

$ sudo apt install libusb-1.0-0-dev
$ sudo dpkg -i stlink-1.6.1-1_amd64.deb
(Reading database ... 316701 files and directories currently installed.)
Preparing to unpack stlink-1.6.1-1_amd64.deb ...
Unpacking stlink (1.6.1-1) over (1.6.1-1) ...
Setting up stlink (1.6.1-1) ...

Then I was able to use all commands st-info, st-flash, ...
But then I got this error all the time when running any command.

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

I think the problem is not due to the stlink because I can see it with lsusb and it worked for some times. Something is "broken" with libstlink.so I suppose.
I checked on the internet but could not find anything relevant to my problem.
If you have any idea of the cause of the problem, could you please tell me how to proceed?
Thanks in advance.

@Nightwalker-87 Nightwalker-87 changed the title [STM32 device name]: [undefined symbol: libusb_set_option] STM32f103C8: undefined symbol: libusb_set_option Jan 30, 2021
@Nightwalker-87 Nightwalker-87 added this to the v1.6.2 milestone Jan 30, 2021
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 10, 2021 that will close this issue
@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 10, 2021

@dcmde: As far as I can see the given file path for the library is not correct.
This issue derives from a compilation error that has been fixed in #978.

I could not reproduce the
st-info: symbol lookup error: /usr/lib/libstlink.so.1: undefined symbol: libusb_set_option
output with the same setup:

  • Release v1.6.1 (commit 6aa08a6)
  • STM32F103C8T6 ("Bluepill") and
  • a STLink/V2-clone programmer
  • Linux (Debian)

Instead I get the expected regular console output.

So as it appears this error is not generally reproducible and may be caused by unintended leftovers on the local build system.
A proper clean-up of the build routine can be achieved with sudo make uninstall && sudo make clean && hash -r.

@Nightwalker-87 Nightwalker-87 self-assigned this Mar 10, 2021
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 10, 2021 that will close this issue
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.