Open GoogleCodeExporter opened 9 years ago
Looking at this again because of another build related thing and still can't
figure out why the compiler isn't finding the header file. Although everything
else looks fine. Its weird....
Original comment by chmor...@gmail.com
on 14 Oct 2013 at 1:09
On OS X version 10.8.5 with a fresh libftdi1 installed from MacPorts I get
similar issues. The library is installed by MacPorts in the (default) location
"/opt/local" (note: is different from "/usr/local").
The following files are succesfully installed by MacPorts:
------------------------------------------
$ port contents libftdi1
------------------------------------------
/opt/local/bin/ftdi_eeprom
/opt/local/bin/libftdi1-config
/opt/local/include/libftdi1/ftdi.h
/opt/local/lib/cmake/libftdi1/LibFTDI1Config.cmake
/opt/local/lib/cmake/libftdi1/UseLibFTDI1.cmake
/opt/local/lib/libftdi1.2.1.0.dylib
/opt/local/lib/libftdi1.2.dylib
/opt/local/lib/libftdi1.a
/opt/local/lib/libftdi1.dylib
/opt/local/lib/pkgconfig/libftdi1.pc
/opt/local/lib/pkgconfig/libftdipp1.pc
------------------------------------------
Surprisingly, the following ./configure trials all fail the same way:
------------------------------------------
$ ./configure
$ ./configure --prefix=/opt/local
$ ./configure --includedir=/opt/local/include
------------------------------------------
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /opt/local/bin//grep
checking for egrep... /opt/local/bin//grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking libftdi1/ftdi.h usability... no
checking libftdi1/ftdi.h presence... no
checking for libftdi1/ftdi.h... no
checking ftdi.h usability... no
checking ftdi.h presence... no
checking for ftdi.h... no
error: missing libftdi header files
However, it does work when I use the following additional directives:
------------------------------------------
$ ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include
CFLAGS=-I/opt/local/include
------------------------------------------
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /opt/local/bin//grep
checking for egrep... /opt/local/bin//grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking libftdi1/ftdi.h usability... yes
checking libftdi1/ftdi.h presence... yes
checking for libftdi1/ftdi.h... yes
checking for ftdi_init in -lftdi1... yes
checking /usr/include/python2.7/Python.h usability... yes
checking /usr/include/python2.7/Python.h presence... yes
checking for /usr/include/python2.7/Python.h... yes
configure: creating ./config.status
config.status: creating Makefile
------------------------------------------
$ make
------------------------------------------
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -lftdi1
-L/opt/local/lib -DLIBFTDI1=1 -c support.c
clang: warning: -lftdi1: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
support.c:121:15: warning: implicitly declaring library function 'malloc' with
type 'void *(unsigned long)'
buf = malloc(total_size);
^
support.c:121:15: note: please include the header <stdlib.h> or explicitly
provide a declaration for 'malloc'
1 warning generated.
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -lftdi1
-L/opt/local/lib -DLIBFTDI1=1 -c mpsse.c
clang: warning: -lftdi1: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -lftdi1
-L/opt/local/lib -DLIBFTDI1=1 -c fast.c
clang: warning: -lftdi1: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -shared
-Wl,-install_name,libmpsse.so mpsse.o fast.o support.o \
-o libmpsse.so -lftdi1 -L/opt/local/lib
ar rcs libmpsse.a mpsse.o fast.o support.o
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -lftdi1
-L/opt/local/lib -DSWIGPYTHON -DLIBFTDI1=1 -c support.c
clang: warning: -lftdi1: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
support.c:121:15: warning: implicitly declaring library function 'malloc' with
type 'void *(unsigned long)'
buf = malloc(total_size);
^
support.c:121:15: note: please include the header <stdlib.h> or explicitly
provide a declaration for 'malloc'
1 warning generated.
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -lftdi1
-L/opt/local/lib -DSWIGPYTHON -DLIBFTDI1=1 -c mpsse.c
clang: warning: -lftdi1: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
/opt/local/bin//swig -python mpsse.i
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -c -DLIBFTDI1=1
mpsse_wrap.c -I/usr/include/python2.7
gcc -Wall -fPIC -fno-strict-aliasing -I/opt/local/include -shared -framework
Python mpsse_wrap.o mpsse.o support.o \
-o _pylibmpsse.so -lftdi1 -L/opt/local/lib -I/usr/include/python2.7
------------------------------------------
Original comment by verdult
on 19 Aug 2014 at 7:55
Original issue reported on code.google.com by
chmor...@gmail.com
on 13 Sep 2013 at 8:18