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

Already on GitHub? Sign in to your account

configure fails on Mac OSX 10.8 #118

Closed
ghost opened this Issue Dec 7, 2012 · 7 comments

Comments

Projects
None yet
7 participants
@ghost

ghost commented Dec 7, 2012

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 <libusb.h> to #include </usr/local/include/libusb-1.0/libusb.h> 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)

Owner

texane commented Dec 7, 2012

Hi,

You think good, this issue should be fixed. Feel free to send
a patch from the master containing your modifications, that
hopefully does not break the build on other systems.

Regards,

Fabiebn.

2012/12/7 NAVARRO Benjamin notifications@github.com

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.acand 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)


Reply to this email directly or view it on GitHubhttps://github.com/texane/stlink/issues/118.

@ghost

ghost commented Dec 7, 2012

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 commented Jan 18, 2013

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.

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

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 commented Mar 9, 2014

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

Ribster commented Mar 22, 2014

Thanks man, real nice. Worked for mavericks.

@xor-gate xor-gate added the os/mac-osx label May 3, 2016

@xor-gate xor-gate closed this May 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment