Peter Stuge wrote:
> export LIBUSB_1_0_CFLAGS=/tmp/test/include
> export LIBUSB_1_0_LIBS=/tmp/test/lib
> cd libftdi-1.0 && ../openocd/bootstrap && ./configure \

Olof Tångrot wrote:
> I get a lot of build errors starting with:
> 
> make[1]: Entering directory `/tmp/test/src/libftdi-1.0/src'
> /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I..     -g -O2 /tmp/test/include -MT ftdi.lo -MD -MP -MF .deps/ftdi.Tpo
> -c -o ftdi.lo ftdi.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 /tmp/test/include
> -MT ftdi.lo -MD -MP -MF .deps/ftdi.Tpo -c ftdi.c  -fPIC -DPIC
> -o .libs/ftdi.o
> ftdi.c:31:20: error: libusb.h: No such file or directory

My bad. The two export lines before libftdi build are wrong. Try:

export LIBUSB_1_0_CFLAGS=-I/tmp/test/include/libusb-1.0
export LIBUSB_1_0_LIBS="-L/tmp/test/lib -lusb-1.0"

Sorry. Maybe you see a pattern in these settings already, if you are
familiar with compiling and linking, and you might also have noticed
how the settings have influenced the command line of the command that
failed. I hope it makes sense to you.

As an alternative to those two exports, you could do:

export PKG_CONFIG_PATH=/tmp/test/lib/pkgconfig

(No -I or -L or -l should be in there. :)

Note that export CFLAGS/LDFLAGS before building OpenOCD are still
needed, until libftdi.pc is fixed in libftdi to mention that libftdi
depends on libusb-1.0. Then this build gets even easier.


//Peter
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to