stlink: PKG_CHECK_MODULES USB unexpected token

I installed this a month ago on OSX and it went fine, I had to reinstall osx and now I am running into problems.

./configure: line 4781: syntax error near unexpected token USB,' ./configure: line 4781:PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0.0,’

I already installed libusb:

$ pkg-config --libs libusb -L/usr/local/lib -lusb

$ pkg-config --libs libusb-1.0 -L/usr/local/lib -lusb-1.0

if I comment out the line 4781 from configure which causes the problem then it creates the make file but the makefile doesn’t Include or link correctly.

I can compile it by adding -lusb-1.0 to the gcc command (also added -I/usr/local/include/libusb to the makefile)

gcc -g -O2 -o st-util gdbserver/st_util-gdb-remote.o gdbserver/st_util-gdb-server.o mingw/st_util-mingw.o libstlink.a -lusb-1.0

Any ideas why I don’t have this USB token? What should it be?

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

(ubuntu linux) Anyone still experiencing this I did sudo apt-get install pkg-config and it worked. Thanks to https://twitter.com/KenichiHidai for pointing me in the right direction.