On Mon, Feb 15, 2010 at 9:47 AM, Xiaofan Chen <[email protected]> wrote: > On Mon, Feb 15, 2010 at 9:36 AM, CeDeROM <[email protected]> wrote: >> Ah yes, OpenOCD's configure script can also assume using >> "/usr/local/lib" and "/usr/local/include" to search for libraries and >> header files - it would be nice, however if it don't the Port will >> make it automatically :-) > > Actually I consider this a bug of OpenOCD. /usr/local should > be searched, even under Linux. >
So I just tested it under Linux, if I install libftdi to /usr/local (which is the default if you build from source), it will fail to build. I will tend to think this is a bug. mc...@ubuntu:~/Desktop/build/openocd/build$ ../git/openocd/configure --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi --enable-parport --enable-dummy checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... 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 for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for gcc option to accept ISO C99... -std=gnu99 checking whether gcc -std=gnu99 and cc understand -c and -o together... yes checking for ranlib... ranlib checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc -std=gnu99... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... (cached) ranlib checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok checking how to run the C preprocessor... gcc -std=gnu99 -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 dlfcn.h... yes checking for objdir... .libs checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes checking if gcc -std=gnu99 static flag -static works... yes checking if gcc -std=gnu99 supports -c -o file.o... yes checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking for an ANSI C-conforming const... yes checking for long long int... yes checking for library containing ioperm... none required checking for library containing dlopen... -ldl checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for arpa/inet.h... yes checking elf.h usability... yes checking elf.h presence... yes checking for elf.h... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for ifaddrs.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking for netinet/in.h... yes checking for netinet/tcp.h... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for strings.h... (cached) yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/poll.h usability... yes checking sys/poll.h presence... yes checking for sys/poll.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking for sys/stat.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for sys/types.h... (cached) yes checking for unistd.h... (cached) yes checking for net/if.h... yes checking whether to enable assertions... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking whether time.h and sys/time.h may both be included... yes checking whether byte ordering is bigendian... no checking for strndup... yes checking for strnlen... yes checking for gettimeofday... yes checking for usleep... yes checking for vasprintf... yes checking for "../git/openocd/guess-rev.sh"... yes checking whether to build a release... no checking whether to build Doxygen as HTML... yes checking whether to build Doxygen as PDF... no checking whether to enable verbose JTAG I/O messages... no checking whether to enable verbose USB I/O messages... no checking whether to enable verbose USB communication messages... no checking whether to enable malloc free space logging... no checking whether to enable ZY1000 minidriver... no checking whether to enable dummy minidriver... no checking whether standard drivers can be built... yes checking Build & Link with libftdi...... configure: error: Cannot build & run test program using libftdi configure:13380: checking Build & Link with libftdi... configure:13416: gcc -std=gnu99 -o conftest -g -O2 conftest.c -ldl -lftdi -lusb >&5 conftest.c:82:18: error: ftdi.h: No such file or directory conftest.c: In function 'main': conftest.c:88: warning: implicit declaration of function 'ftdi_new' conftest.c:88: warning: assignment makes pointer from integer without a cast configure:13416: $? = 1 configure: program exited with status 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "openocd" | #define PACKAGE_TARNAME "openocd" | #define PACKAGE_VERSION "0.4.0-rc2-dev" | #define PACKAGE_STRING "openocd 0.4.0-rc2-dev" | #define PACKAGE_BUGREPORT "OpenOCD Mailing List <[email protected]>" | #define PACKAGE_URL "" | #define PACKAGE "openocd" | #define VERSION "0.4.0-rc2-dev" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_LONG_LONG_INT 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_ARPA_INET_H 1 | #define HAVE_ELF_H 1 | #define HAVE_DIRENT_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_IFADDRS_H 1 | #define HAVE_MALLOC_H 1 | #define HAVE_NETDB_H 1 | #define HAVE_NETINET_IN_H 1 | #define HAVE_NETINET_TCP_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_SYS_POLL_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_NET_IF_H 1 | #define HAVE__BOOL 1 | #define HAVE_STDBOOL_H 1 | #define TIME_WITH_SYS_TIME 1 | #define HAVE_STRNDUP 1 | #define HAVE_STRNLEN 1 | #define HAVE_GETTIMEOFDAY 1 | #define HAVE_USLEEP 1 | #define HAVE_VASPRINTF 1 | #define IS_CYGWIN 0 | #define IS_WIN32 0 | #define IS_DARWIN 0 | #define BUILD_PARPORT 1 | #define BUILD_DUMMY 1 | #define BUILD_EP93XX 0 | #define BUILD_ECOSBOARD 0 | #define BUILD_ZY1000 0 | #define BUILD_AT91RM9200 0 | #define PARPORT_USE_PPDEV 1 | #define PARPORT_USE_GIVEIO 0 | #define BUILD_BITBANG 1 | #define BUILD_FT2232_LIBFTDI 1 | #define BUILD_FT2232_FTD2XX 0 | #define BUILD_USB_BLASTER_LIBFTDI 0 | #define BUILD_USB_BLASTER_FTD2XX 0 | #define BUILD_AMTJTAGACCEL 0 | #define BUILD_GW16012 0 | #define BUILD_PRESTO_LIBFTDI 0 | #define BUILD_PRESTO_FTD2XX 0 | #define BUILD_BITQ 0 | #define BUILD_USBPROG 0 | #define BUILD_OOCD_TRACE 0 | #define BUILD_JLINK 1 | #define BUILD_VSLLINK 0 | #define BUILD_RLINK 0 | #define BUILD_ARMJTAGEW 0 | /* end confdefs.h. */ | | #include <stdio.h> | #include <ftdi.h> | | int | main( int argc, char **argv ) | { | struct ftdi_context *p; | p = ftdi_new(); | if( p != NULL ){ | return 0; | } else { | fprintf( stderr, "calling ftdi_new() failed\n"); | return 1; | } | } | configure:13423: error: Cannot build & run test program using libftdi -- Xiaofan http://mcuee.blogspot.com _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
