and what about libftdi ? ./configure --with-libusb=1.0 failed because
libftdi wants to link to libusb-0.1
Firstly since many people here do not use Top Posting style, please
try not using top posting. Thanks.
Indeed if you have libftdi (not libftdi-1.0),
"./configure --with-libusb=1.0 --with-libftdi" will generate an error.
(tested under Ubuntu Linux 9.10 32bit).
checking for LIBUSB1... yes
checking for libusb_get_device_list... yes
checking for LIBFTDI... yes
checking for ftdi_usb_open... yes
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
But even if I remove libftdi and install libftdi-1.0, it still produce this
error. Strange.
checking for LIBUSB1... yes
checking for libusb_get_device_list... yes
checking for LIBFTDI... yes
checking for ftdi_usb_open... yes
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
***@ubuntu:~/Desktop/build/urjtag/svn/urjtag/urjtag$ grep
ftdi_read_data_submit /usr/include/libftdi/ftdi.h
struct ftdi_transfer_control *ftdi_read_data_submit(struct
ftdi_context *ftdi, unsigned char *buf, int size);
config.log:
configure:14254: checking for LIBUSB1
configure:14262: $PKG_CONFIG --exists --print-errors "libusb-1.0"
configure:14265: $? = 0
configure:14280: $PKG_CONFIG --exists --print-errors "libusb-1.0"
configure:14283: $? = 0
configure:14319: result: yes
configure:14331: checking for libusb_get_device_list
configure:14331: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 conftest.c -lrt -lreadline
-L/usr/local/lib -lusb-1.0 >&5
configure:14331: $? = 0
configure:14331: result: yes
configure:14385: checking for LIBFTDI
configure:14393: $PKG_CONFIG --exists --print-errors "libftdi"
configure:14396: $? = 0
configure:14411: $PKG_CONFIG --exists --print-errors "libftdi"
configure:14414: $? = 0
configure:14676: result: yes
configure:14682: checking for ftdi_usb_open
configure:14682: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 -I/usr/include/libftdi conftest.c
-lftdi -lrt -lreadline -L/usr/local/lib -lusb-1.0 >&5
configure:14682: $? = 0
configure:14682: result: yes
configure:14699: checking for ftdi_read_data_submit
configure:14699: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 -I/usr/include/libftdi conftest.c
-lftdi -lrt -lreadline -L/usr/local/lib -lusb-1.0 >&5
/tmp/cccyfIRk.o: In function `main':
/home/mcuee/Desktop/build/urjtag/svn/urjtag/urjtag/conftest.c:84:
undefined reference to `ftdi_read_data_submit'
collect2: ld returned 1 exit status
configure:14699: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "UrJTAG"
| #define PACKAGE_TARNAME "urjtag"
| #define PACKAGE_VERSION "0.10"
| #define PACKAGE_STRING "UrJTAG 0.10"
| #define PACKAGE_BUGREPORT "http://urjtag.org"
| #define PACKAGE_URL ""
| #define SVN_REVISION "1794"
| #define PACKAGE "urjtag"
| #define VERSION "0.10"
| #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 __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_IOPERM 1
| #define HAVE_GETEUID 1
| #define HAVE_GETUID 1
| #define HAVE_NANOSLEEP 1
| #define HAVE_SWPRINTF 1
| #define HAVE_USLEEP 1
| #define HAVE_LIBRT 1
| #define HAVE_SIGACTION_SA_ONESHOT 1
| #define HAVE_LINUX_PPDEV_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_READLINE_HISTORY 1
| #define HAVE_READLINE_HISTORY_H 1
| #define HAVE_READLINE_COMPLETION 1
| #define HAVE_LIBUSB1 1
| #define HAVE_LIBFTDI 1
| /* end confdefs.h. */
| /* Define ftdi_read_data_submit to an innocuous variant, in case
<limits.h> declares ftdi_read_data_submit.
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
| #define ftdi_read_data_submit innocuous_ftdi_read_data_submit
|
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char ftdi_read_data_submit (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef ftdi_read_data_submit
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char ftdi_read_data_submit ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined __stub_ftdi_read_data_submit || defined
__stub___ftdi_read_data_submit
| choke me
| #endif
|
| int
| main ()
| {
| return ftdi_read_data_submit ();
| ;
| return 0;
| }
configure:14699: result: no
configure:14716: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
--
Xiaofan http://mcuee.blogspot.com