Xiaofan Chen
2010-05-06 12:59:34 UTC
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.backend is not there (what to download, what to install, how to
setup MSYS, etc).
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.
mingw-w64-bin_i686-mingw_20100320.zip
Supposedly it is targeting 64bit system but hosted on 32bit
system. So I think it should be the right one to use.
I still need to use the normal MSys/MinGW32 to bootstrap
as there are auto-tools packages in the above zip file. Not
so sure if this is okay or not. I have not downloaded the
other necessary packages for the mingw-w64 yet. This
seems to still cause problem for the Locale issues.
The process does produce 64bit examples -- I have not tested it though
under the 64bit Windows.
***@ACERPC /c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/libusb-pbatard
$ LC_ALL=C; LANGUAGE=C; export LANGUAGE LC_ALL
***@ACERPC /c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/libusb-pbatard
$ LANG=C; export LANG
***@ACERPC /c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/libusb-pbatard
$ env | grep LANG
REGINA_LANG_DIR=c:\Regina
LANG=C
REGINA_LANG=en
LANGUAGE=C
***@ACERPC /c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/libusb-pbatard
$ ./configure --host=x86_64-w64-mingw32 --enable-examples-build
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... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking build system type... i686-pc-mingw32
checking host system type... x86_64-w64-mingw32
checking how to print strings... printf
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 x86_64-w64-mingw32-gcc... d:/mingw-w64/x86_64-w64-mingw3
2/bin/ld.exe
checking if the linker (d:/mingw-w64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld...
yes
checking for BSD- or MS-compatible name lister (nm)... /d/mingw-w64/bin/x86_64-w
64-mingw32-nm
checking the name lister (/d/mingw-w64/bin/x86_64-w64-mingw32-nm) interface... B
SD nm
checking whether ln -s works... no, using cp -p
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-mingw32 paths to x86_64-w64-mingw32 format... fu
nc_msys_to_mingw_path_convert
checking for d:/mingw-w64/x86_64-w64-mingw32/bin/ld.exe option to reload object
files... -r
checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_imp
lib
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking command to parse /d/mingw-w64/bin/x86_64-w64-mingw32-nm output from x86
_64-w64-mingw32-gcc object... ok
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -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 x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-gcc static flag -static works... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-gcc linker (d:/mingw-w64/x86_64-w64-ming
w32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
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... yes
checking whether to build static libraries... yes
checking for inline... inline
checking whether x86_64-w64-mingw32-gcc and cc understand -c and -o together...
yes
checking operating system... Windows
checking for x86_64-w64-mingw32-windres... x86_64-w64-mingw32-windres
checking sys/timerfd.h usability... no
checking sys/timerfd.h presence... no
checking for sys/timerfd.h... no
checking whether TFD_NONBLOCK is declared... no
checking whether to use timerfd for timing... no (header not available)
checking for struct timespec... yes
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating libusb/libusb-1.0.rc
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
***@ACERPC /c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/libusb-pbatard
$ make
make all-recursive
make[1]: Entering directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/li
busb-pbatard'
Making all in libusb
make[2]: Entering directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/li
busb-pbatard/libusb'
CC libusb_1_0_la-core.lo
CC libusb_1_0_la-descriptor.lo
CC libusb_1_0_la-io.lo
io.c: In function 'get_next_timeout':
io.c:1917:3: warning: suggest parentheses around '&&' within '||'
io.c: In function 'libusb_get_next_timeout':
io.c:2160:2: warning: suggest parentheses around '&&' within '||'
CC libusb_1_0_la-sync.lo
CC libusb_1_0_la-threads_windows.lo
CC libusb_1_0_la-poll_windows.lo
CC libusb_1_0_la-windows_usb.lo
os/windows_usb.c: In function 'winusb_submit_control_transfer':
os/windows_usb.c:2546:30: warning: unused variable 'priv'
os/windows_usb.c: In function 'hid_submit_control_transfer':
os/windows_usb.c:3650:25: warning: unused variable 'ctx'
/bin/sh ../libtool --mode=compile x86_64-w64-mingw32-windres -i libusb-1.0.rc
-o libusb-1.0.lo
libtool: compile: x86_64-w64-mingw32-windres -i libusb-1.0.rc -DDLL_EXPORT -DP
IC -o .libs/libusb-1.0.o
libtool: compile: x86_64-w64-mingw32-windres -i libusb-1.0.rc -o libusb-1.0.o >
/dev/null 2>&1
CCLD libusb-1.0.la
*** Warning: linker path does not have real file for library -lsetupapi.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libsetupapi but no candidates were found. (...for file magic test)
*** Warning: linker path does not have real file for library -lole32.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libole32 but no candidates were found. (...for file magic test)
*** Warning: linker path does not have real file for library -ladvapi32.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libadvapi32 but no candidates were found. (...for file magic test)
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
make[2]: Leaving directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/lib
usb-pbatard/libusb'
Making all in doc
make[2]: Entering directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/li
busb-pbatard/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/lib
usb-pbatard/doc'
Making all in examples
make[2]: Entering directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/li
busb-pbatard/examples'
CC xusb.o
CCLD xusb.exe
CC lsusb.o
CCLD lsusb.exe
CC dpfp.o
CCLD dpfp.exe
make[2]: Leaving directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/lib
usb-pbatard/examples'
make[2]: Entering directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/li
busb-pbatard'
make[2]: Leaving directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/lib
usb-pbatard'
make[1]: Leaving directory `/c/cygwin/home/mcuee/mcu/libusb1win32/git/mingw2/lib
usb-pbatard'
--
Xiaofan http://mcuee.blogspot.com
Xiaofan http://mcuee.blogspot.com