Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

configure fails on Mac OSX 10.8 #118

Open
blackswords opened this Issue · 7 comments

7 participants

@blackswords

Hi,

I have an outdated version of stlink on my mac so I decided to update it but it was impossible to compile it. It does not found the libusb-1.0 and abort. I had to remove the libusb checking lines from the configure.ac and then edit the sources to modify the #include to #include to make it compile.

Now everything is working fine but I think that this issue should be fixed.

Same results with my other Mac (10.7)

@texane
Owner
@blackswords

well, what I did is not really a solution, just an ugly fix. The scripts don't check for libusb so if it's not installed it may have some problems...

If some Mac OS X user can confirm me the paths for its libusb installation maybe I can do something but I don't want to ruin everything

@dnlogan

Hi blacksword,
I noticed the same problem while installing stlink (OSX 10.8). Modifying the configure.ac enables me to run configure, but compiling (make) results in:

gcc -DPACKAGE_NAME=\"stlink\" -DPACKAGE_TARNAME=\"stlink\" -DPACKAGE_VERSION=\"0.5.6\" -DPACKAGE_STRING=\"stlink\ 0.5.6\" -DPACKAGE_BUGREPORT=\"davem@devkitpro.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"stlink\" -DVERSION=\"0.5.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_POLL_H=1 -DHAVE_MMAP=1 -I. -std=gnu99 -Wall -Wextra -O2 -g -O2 -MT src/libstlink_a-stlink-common.o -MD -MP -MF src/.deps/libstlink_a-stlink-common.Tpo -c -o src/libstlink_a-stlink-common.o test -f 'src/stlink-common.c' || echo './'src/stlink-common.c
In file included from src/stlink-common.h:442,
from src/stlink-common.c:14:
src/stlink-sg.h:15:20: error: libusb.h: No such file or directory
In file included from src/stlink-common.h:442,
from src/stlink-common.c:14:
src/stlink-sg.h:45: error: expected specifier-qualifier-list before ‘libusb_context’
In file included from src/stlink-common.h:443,
from src/stlink-common.c:14:
src/stlink-usb.h:22: error: expected specifier-qualifier-list before ‘libusb_context’
make: *** [src/libstlink_a-stlink-common.o] Error 1

Can you tell me what you had modified in the sources. I already installed ​libusb-1.0.9 from http://www.libusb.org.

Thank You.

@cstratton

One problem is that there may be multiple way to get libusb on a Mac - directly from libusb.org, from Homebrew, maybe from Macports?

I'm not at the machine where I was able to build it, but I think I had to either change an include path or create a symlink for libusb.h

To stop link from failing I set USB_LIBS to the location of the installed libusb library in configure.ac

@machinaut

Still failed for me on 10.9 with libusb installed from homebrew. Error message was:

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

Took some research, and the PKG_CHECK_MODULES macro fails because "pkg-config" isn't installed. Installing that from homebrew fixed the configure crashing for me.

@cybertux

@machinaut Thanks a lot this saved my day. Installing "pkg-config" also fixes this issue on ubuntu 14.04.

@Ribster

Thanks man, real nice. Worked for mavericks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.