From: Xiaofan C. <xia...@gm...> - 2010-05-08 12:08:56
|
On Thu, May 6, 2010 at 8:59 PM, Xiaofan Chen <xia...@gm...> wrote: > On Wed, May 5, 2010 at 2:39 PM, Peter Stuge <pe...@st...> wrote: >> Xiaofan Chen wrote: >>> and the basic documentation of how to build libusb-1.0 Windows >>> backend is not there (what to download, what to install, how to >>> setup MSYS, etc). >> >> As I understand it is not different from "plain" MinGW. >> >> When cross-compiling, I run ./configure --host=i686-w64-mingw32 >> or ./configure --host=x86_64-w64-mingw32 for MinGW-W64, instead >> of ./configure --host=i686-mingw32 like I do with "plain" MinGW. >> Cross-compiling under Ubuntu 10.04 64bit failed. Maybe Ubuntu has an old version of mingw-w64. mcuee@ubuntu64:~/Desktop/build/libusb1/windows/64bit/libusb-pbatard$ ./autogen.sh --host=amd64-mingw32msvc libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' configure.ac:21: installing `./compile' configure.ac:19: installing `./config.guess' configure.ac:19: installing `./config.sub' configure.ac:11: installing `./install-sh' configure.ac:11: installing `./missing' examples/Makefile.am: installing `./depcomp' configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for amd64-mingw32msvc-strip... amd64-mingw32msvc-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for amd64-mingw32msvc-gcc... amd64-mingw32msvc-gcc checking whether the C compiler works... no configure: error: in `/home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard': configure: error: C compiler cannot create executables See `config.log' for more details. ==== contents of config.log ====== This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libusb configure 1.0.8, which was generated by GNU Autoconf 2.65. Invocation command line was $ ./configure --enable-debug-log --enable-examples-build --host=amd64-mingw32msvc ## --------- ## ## Platform. ## ## --------- ## hostname = ubuntu64 uname -m = x86_64 uname -r = 2.6.32-21-generic uname -s = Linux uname -v = #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /home/mcuee/bin PATH: /home/mcuee/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games PATH: /home/mcuee/CodeSourcery/Sourcery_G++_Lite/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:2479: checking for a BSD-compatible install configure:2547: result: /usr/bin/install -c configure:2558: checking whether build environment is sane configure:2608: result: yes configure:2657: checking for amd64-mingw32msvc-strip configure:2673: found /usr/bin/amd64-mingw32msvc-strip configure:2684: result: amd64-mingw32msvc-strip configure:2749: checking for a thread-safe mkdir -p configure:2788: result: /bin/mkdir -p configure:2801: checking for gawk configure:2817: found /usr/bin/gawk configure:2828: result: gawk configure:2839: checking whether make sets $(MAKE) configure:2861: result: yes configure:2967: checking for amd64-mingw32msvc-gcc configure:2983: found /usr/bin/amd64-mingw32msvc-gcc configure:2994: result: amd64-mingw32msvc-gcc configure:3263: checking for C compiler version configure:3272: amd64-mingw32msvc-gcc --version >&5 amd64-mingw32msvc-gcc (GCC) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:3283: $? = 0 configure:3272: amd64-mingw32msvc-gcc -v >&5 Using built-in specs. Target: amd64-mingw32msvc Configured with: /build/buildd/gcc-mingw32-4.4.2/build-tree/gcc-4.4.2/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/include' --mandir='/share/man' --infodir='/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/lib/' --disable-multilib --enable-threads --enable-sjlj-exceptions --enable-version-specific-runtime-libs --disable-shared --target=amd64-mingw32msvc --enable-languages=c : (reconfigured) /build/buildd/gcc-mingw32-4.4.2/build-tree/gcc-4.4.2/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/include' --mandir='/share/man' --infodir='/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/lib/' --disable-multilib --enable-threads --enable-sjlj-exceptions --enable-version-specific-runtime-libs --disable-shared --target=amd64-mingw32msvc --enable-languages=c Thread model: win32 gcc version 4.4.2 (GCC) configure:3283: $? = 0 configure:3272: amd64-mingw32msvc-gcc -V >&5 amd64-mingw32msvc-gcc: '-V' option must have argument configure:3283: $? = 1 configure:3272: amd64-mingw32msvc-gcc -qversion >&5 amd64-mingw32msvc-gcc: unrecognized option '-qversion' amd64-mingw32msvc-gcc: no input files configure:3283: $? = 1 configure:3303: checking whether the C compiler works configure:3325: amd64-mingw32msvc-gcc conftest.c >&5 /usr/lib/gcc/amd64-mingw32msvc/4.4.2/../../../../amd64-mingw32msvc/bin/ld: cannot find -lgcc collect2: ld returned 1 exit status configure:3329: $? = 1 configure:3367: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libusb" | #define PACKAGE_TARNAME "libusb" | #define PACKAGE_VERSION "1.0.8" | #define PACKAGE_STRING "libusb 1.0.8" | #define PACKAGE_BUGREPORT "lib...@li..." | #define PACKAGE_URL "http://www.libusb.org/" | #define PACKAGE "libusb" | #define VERSION "1.0.8" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3372: error: in `/home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard': configure:3376: error: C compiler cannot create executables See `config.log' for more details. ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set=set ac_cv_env_host_alias_value=amd64-mingw32msvc ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_path_install='/usr/bin/install -c' ac_cv_path_mkdir=/bin/mkdir ac_cv_prog_AWK=gawk ac_cv_prog_CC=amd64-mingw32msvc-gcc ac_cv_prog_STRIP=amd64-mingw32msvc-strip ac_cv_prog_make_make_set=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run aclocal-1.11' AMDEPBACKSLASH='' AMDEP_FALSE='' AMDEP_TRUE='' AMTAR='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run tar' AM_BACKSLASH='\' AM_CFLAGS='' AM_DEFAULT_VERBOSITY='0' AM_LDFLAGS='' AR='' AUTOCONF='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run autoconf' AUTOHEADER='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run autoheader' AUTOMAKE='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run automake-1.11' AWK='gawk' BUILD_EXAMPLES_FALSE='' BUILD_EXAMPLES_TRUE='' CC='amd64-mingw32msvc-gcc' CCDEPMODE='' CFLAGS='' CPP='' CPPFLAGS='' CYGPATH_W='echo' DEFS='' DEPDIR='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' FGREP='' GREP='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='' LDFLAGS='' LIBOBJS='' LIBS='' LIBTOOL='' LIBUSB_VERSION_MAJOR='1' LIBUSB_VERSION_MICRO='8' LIBUSB_VERSION_MINOR='0' LIPO='' LN_S='' LTLIBOBJS='' MAKEINFO='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/missing --run makeinfo' MKDIR_P='/bin/mkdir -p' NM='' NMEDIT='' OBJDUMP='' OBJEXT='' OS_DARWIN='' OS_DARWIN_FALSE='' OS_DARWIN_TRUE='' OS_LINUX='' OS_LINUX_FALSE='' OS_LINUX_TRUE='' OS_WINDOWS='' OS_WINDOWS_FALSE='' OS_WINDOWS_TRUE='' OTOOL64='' OTOOL='' PACKAGE='libusb' PACKAGE_BUGREPORT='lib...@li...' PACKAGE_NAME='libusb' PACKAGE_STRING='libusb 1.0.8' PACKAGE_TARNAME='libusb' PACKAGE_URL='http://www.libusb.org/' PACKAGE_VERSION='1.0.8' PATH_SEPARATOR=':' POSIX_THREADS_FALSE='' POSIX_THREADS_TRUE='' RANLIB='' RC='' SED='' SET_MAKE='' SHELL='/bin/sh' STRIP='amd64-mingw32msvc-strip' VERSION='1.0.8' VISIBILITY_CFLAGS='' ac_ct_CC='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='' am__include='' am__isrc='' am__leading_dot='.' am__quote='' am__tar='${AMTAR} chof - "$$tardir"' am__untar='${AMTAR} xf -' bindir='${exec_prefix}/bin' build='' build_alias='' build_cpu='' build_os='' build_vendor='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' host='amd64-mingw32msvc' host_alias='amd64-mingw32msvc' host_cpu='' host_os='' host_vendor='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /home/mcuee/Desktop/build/libusb1/windows/64bit/libusb-pbatard/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' lt_ECHO='echo' mandir='${datarootdir}/man' mkdir_p='/bin/mkdir -p' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "libusb" #define PACKAGE_TARNAME "libusb" #define PACKAGE_VERSION "1.0.8" #define PACKAGE_STRING "libusb 1.0.8" #define PACKAGE_BUGREPORT "lib...@li..." #define PACKAGE_URL "http://www.libusb.org/" #define PACKAGE "libusb" #define VERSION "1.0.8" configure: exit 77 -- Xiaofan http://mcuee.blogspot.com |