Opened 15 years ago

Closed 15 years ago

#20131 closed defect (fixed)

libusb build fail on intel 10.6

Reported by: nerdling (Jeremy Lavergne) Owned by: rwilcox (Ryan Wilcox)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: libusb

Description

libusb fails to build on intel 10.6. This is likely because warnings are being treated as errors.

Here are the configure and build phases:

Melchior:~ snc$ sudo port -v build libusb
--->  Computing dependencies for libusb.
--->  Configuring libusb
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking build system type... i686-apple-darwin10.0.0b2
checking host system type... i686-apple-darwin10.0.0b2
checking for style of include used by make... GNU
checking for gcc... /usr/bin/gcc-4.2
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 /usr/bin/gcc-4.2 accepts -g... yes
checking for /usr/bin/gcc-4.2 option to accept ANSI C... none needed
checking dependency style of /usr/bin/gcc-4.2... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by /usr/bin/gcc-4.2... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /usr/bin/gcc-4.2 -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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++-4.2 accepts -g... yes
checking dependency style of /usr/bin/g++-4.2... gcc3
checking how to run the C++ preprocessor... /usr/bin/g++-4.2 -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 65536
checking command to parse /usr/bin/nm output from /usr/bin/gcc-4.2 object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if /usr/bin/gcc-4.2 static flag  works... yes
checking if /usr/bin/gcc-4.2 supports -fno-rtti -fno-exceptions... no
checking for /usr/bin/gcc-4.2 option to produce PIC... -fno-common
checking if /usr/bin/gcc-4.2 PIC flag -fno-common works... yes
checking if /usr/bin/gcc-4.2 supports -c -o file.o... yes
checking whether the /usr/bin/gcc-4.2 linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.0.0b2 dyld
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
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by /usr/bin/g++-4.2... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld... no
checking whether the /usr/bin/g++-4.2 linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking for /usr/bin/g++-4.2 option to produce PIC... -fno-common
checking if /usr/bin/g++-4.2 PIC flag -fno-common works... yes
checking if /usr/bin/g++-4.2 supports -c -o file.o... yes
checking whether the /usr/bin/g++-4.2 linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.0.0b2 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for what USB OS support... Darwin and/or MacOS 10
checking for gcc... (cached) /usr/bin/gcc-4.2
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/bin/gcc-4.2 accepts -g... (cached) yes
checking for /usr/bin/gcc-4.2 option to accept ANSI C... (cached) none needed
checking dependency style of /usr/bin/gcc-4.2... (cached) gcc3
checking whether /usr/bin/gcc-4.2 and cc understand -c and -o together... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ANSI C header files... (cached) yes
checking for vprintf... yes
checking for _doprnt... no
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking for memmove... yes
checking for pkg-config... no
checking if we should build the documentation... no
checking for Doxygen tools... checking for dot... not found
checking for doxygen... not found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating libusb.spec
config.status: creating libusb-config
config.status: creating libusb.pc
config.status: creating tests/Makefile
config.status: creating README
config.status: creating INSTALL.libusb
config.status: creating usb.h
config.status: creating Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
--->  Building libusb
/usr/bin/make  all-recursive
Making all in .
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT usb.lo -MD -MP -MF ".deps/usb.Tpo" -c -o usb.lo usb.c; \
	then mv -f ".deps/usb.Tpo" ".deps/usb.Plo"; else rm -f ".deps/usb.Tpo"; exit 1; fi
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF ".deps/error.Tpo" -c -o error.lo error.c; \
	then mv -f ".deps/error.Tpo" ".deps/error.Plo"; else rm -f ".deps/error.Tpo"; exit 1; fi
mkdir .libs
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -fno-common -DPIC -o .libs/error.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT usb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c  -fno-common -DPIC -o .libs/usb.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF ".deps/descriptors.Tpo" -c -o descriptors.lo descriptors.c; \
	then mv -f ".deps/descriptors.Tpo" ".deps/descriptors.Plo"; else rm -f ".deps/descriptors.Tpo"; exit 1; fi
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT usb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c -o usb.o >/dev/null 2>&1
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c  -fno-common -DPIC -o .libs/descriptors.o
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT darwin.lo -MD -MP -MF ".deps/darwin.Tpo" -c -o darwin.lo darwin.c; \
	then mv -f ".deps/darwin.Tpo" ".deps/darwin.Plo"; else rm -f ".deps/darwin.Tpo"; exit 1; fi
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT darwin.lo -MD -MP -MF .deps/darwin.Tpo -c darwin.c  -fno-common -DPIC -o .libs/darwin.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c -o descriptors.o >/dev/null 2>&1
cc1: warnings being treated as errors
darwin.c: In function 'usb_get_next_device':
darwin.c:260: warning: passing argument 5 of 'IOCreatePlugInInterfaceForService' from incompatible pointer type
darwin.c: In function 'claim_interface':
darwin.c:563: warning: passing argument 5 of 'IOCreatePlugInInterfaceForService' from incompatible pointer type
darwin.c: In function 'rw_completed':
darwin.c:775: warning: cast from pointer to integer of different size
darwin.c:775: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'
darwin.c:777: warning: cast from pointer to integer of different size
darwin.c: In function 'usb_os_find_devices':
darwin.c:1064: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'UInt32'
darwin.c:1092: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'UInt32'
make[2]: *** [darwin.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libusb/work/libusb-0.1.12" && /usr/bin/make -j2 all " returned error 2
Command output: if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF ".deps/error.Tpo" -c -o error.lo error.c; \
	then mv -f ".deps/error.Tpo" ".deps/error.Plo"; else rm -f ".deps/error.Tpo"; exit 1; fi
mkdir .libs
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -fno-common -DPIC -o .libs/error.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT usb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c  -fno-common -DPIC -o .libs/usb.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF ".deps/descriptors.Tpo" -c -o descriptors.lo descriptors.c; \
	then mv -f ".deps/descriptors.Tpo" ".deps/descriptors.Plo"; else rm -f ".deps/descriptors.Tpo"; exit 1; fi
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT usb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c -o usb.o >/dev/null 2>&1
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c  -fno-common -DPIC -o .libs/descriptors.o
if /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H   -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT darwin.lo -MD -MP -MF ".deps/darwin.Tpo" -c -o darwin.lo darwin.c; \
	then mv -f ".deps/darwin.Tpo" ".deps/darwin.Plo"; else rm -f ".deps/darwin.Tpo"; exit 1; fi
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT darwin.lo -MD -MP -MF .deps/darwin.Tpo -c darwin.c  -fno-common -DPIC -o .libs/darwin.o
 /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -Werror -no-cpp-precomp -pipe -O2 -arch x86_64 -Wall -MT descriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c -o descriptors.o >/dev/null 2>&1
cc1: warnings being treated as errors
darwin.c: In function 'usb_get_next_device':
darwin.c:260: warning: passing argument 5 of 'IOCreatePlugInInterfaceForService' from incompatible pointer type
darwin.c: In function 'claim_interface':
darwin.c:563: warning: passing argument 5 of 'IOCreatePlugInInterfaceForService' from incompatible pointer type
darwin.c: In function 'rw_completed':
darwin.c:775: warning: cast from pointer to integer of different size
darwin.c:775: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'
darwin.c:777: warning: cast from pointer to integer of different size
darwin.c: In function 'usb_os_find_devices':
darwin.c:1064: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'UInt32'
darwin.c:1092: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'UInt32'
make[2]: *** [darwin.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Warning: the following items did not execute (for libusb): org.macports.build
Error: Status 1 encountered during processing.

Change History (1)

comment:1 Changed 15 years ago by tobypeterson

Resolution: fixed
Status: newclosed

quick fix committed in r53249

port is really out of date though

Note: See TracTickets for help on using tickets.