On Sun, Jun 17, 2012 at 1:07 PM, Xiaofan Chen <[email protected]> wrote:
> Usually I use MinGW.org (32bit) and TDM64 for libusb/libusbx/libusbk
> related testing. So today I gave the personal build of rubenvb a try
> and tried to build libusbx 1.0.12 release but somehow it failed.
> TDM64 is okay. Tested under Windows XP 64bit.
>
> The reason might be the bundled dlltool.exe insider rubenvb or
> libusbx, but I am not so sure.
>

I think the problem is with the bundled dlltool.exe. I tested again
under Windows Vista 64bit and I had the same problem. Once
I replace the dlltool.exe using the one inside TDM64, the build
becomes a success.

mcuee@Vista64VM /c/work/libusbx/libusbx-1.0.12/mingw64rvb
$ ../configure --enable-examples-build
checking for a BSD-compatible install... /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... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-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 gcc... c:/mingw64_rubenvb/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (c:/mingw64_rubenvb/x86_64-w64-mingw32/bin/ld.exe) is GNU
 ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm
checking the name lister (/mingw/bin/nm) interface... BSD 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 file names to i686-pc-mingw32 format...
func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_c
onvert_file_msys_to_w32
checking for c:/mingw64_rubenvb/x86_64-w64-mingw32/bin/ld.exe option to reload o
bject files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... 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... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (c:/mingw64_rubenvb/x86_64-w64-mingw32/bin/ld.ex
e) 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 windres... windres
checking for inline... inline
checking whether gcc and cc understand -c and -o together... yes
checking operating system... Windows
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
checking for sigaction... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for gettimeofday... yes
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

1) With the original dlltool.exe, the build failed.

mcuee@Vista64VM /c/work/libusbx/libusbx-1.0.12/mingw64rvb
$ make
make  all-recursive
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
Making all in libusb
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
  CC     libusb_1_0_la-core.lo
  CC     libusb_1_0_la-descriptor.lo
  CC     libusb_1_0_la-io.lo
  CC     libusb_1_0_la-sync.lo
  CC     libusb_1_0_la-poll_windows.lo
  CC     libusb_1_0_la-windows_usb.lo
  GEN    libusb-1.0.lo
  CC     libusb_1_0_la-threads_windows.lo
  CCLD   libusb-1.0.la
Creating library file: .libs/libusb-1.0.dll.a
  GEN    libusb-1.0.dll
C:\mingw64_rubenvb\bin\dlltool.exe: Syntax error in def file ../../libusb/libusb
-1.0.def:2
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
Making all in doc
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
Making all in examples
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'

  CC     listdevs.o
  CCLD   listdevs.exe
listdevs.o: In function `main':
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:50:
 undefined reference to `libusb_init'
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:54:
 undefined reference to `libusb_get_device_list'
listdevs.o: In function `print_devs':
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:40:
 undefined reference to `libusb_get_device_address'
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:40:
 undefined reference to `libusb_get_bus_number'
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:32:
 undefined reference to `libusb_get_device_descriptor'
listdevs.o: In function `main':
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:59:
 undefined reference to `libusb_free_device_list'
c:\work\libusbx\libusbx-1.0.12\mingw64rvb\examples/../../examples/listdevs.c:61:
 undefined reference to `libusb_exit'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [listdevs.exe] Error 1
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
make: *** [all] Error 2

2) Once I change to use the dlltool.exe from TDM64, it is okay.

mcuee@Vista64VM /c/work/libusbx/libusbx-1.0.12/mingw64rvb
$ make clean
Making clean in examples
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'

rm -rf .libs _libs
 rm -f listdevs.exe xusb.exe
 rm -f listdevs xusb
rm -f *.o
rm -f *.lo
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'
Making clean in doc
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
rm -rf .libs _libs
rm -f *.lo
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
Making clean in libusb
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
test -z "libusb-1.0.la" || rm -f libusb-1.0.la
rm -f "./so_locations"
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
Making clean in .
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
rm -rf .libs _libs
rm -f *.lo
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'

mcuee@Vista64VM /c/work/libusbx/libusbx-1.0.12/mingw64rvb
$ make
make  all-recursive
make[1]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
Making all in libusb
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
  CC     libusb_1_0_la-core.lo
  CC     libusb_1_0_la-descriptor.lo
  CC     libusb_1_0_la-io.lo
  CC     libusb_1_0_la-sync.lo
  CC     libusb_1_0_la-poll_windows.lo
  CC     libusb_1_0_la-windows_usb.lo
  GEN    libusb-1.0.lo
  CC     libusb_1_0_la-threads_windows.lo
  CCLD   libusb-1.0.la
Creating library file: .libs/libusb-1.0.dll.a
  GEN    libusb-1.0.dll
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/libusb'
Making all in doc
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/doc'
Making all in examples
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'

  CC     listdevs.o
  CCLD   listdevs.exe
  CC     xusb.o
  CCLD   xusb.exe
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb/examples'
make[2]: Entering directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'
make[1]: Leaving directory `/c/work/libusbx/libusbx-1.0.12/mingw64rvb'



-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to