Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Ok that sounds plausible. I have previously tried to compile both libusb 0.1.12Legacy AND libusb 1.0.6(current stable). Unfortunately, libusb 0.1 does not want to compile. so i started copying some of the libusb library files from my ubuntu install. I did also use macports, so I have now cleared out all installed libusb files to remove any related issues.

Device::USB seems to require the usb.h header from libusb legacy(0.1) as i compiled the latest libusb(1.0.6) on ubuntu but Device::USB would not compile, looking for the usb.h header. I then cleaned out the installed files and built libusb legacy v0.1.12. I then got a compiler error and had to install g++ from apt. It then compiled fine.

I have not installed g++ or any other compilers on my macbook. Trying to compile libusb 0.1 results in the make error that i put in my original post.(see top of thread).

Broomduster / Corion; The makefile does allow an environment var to be set with the location of the lib and include directories to use. I have tried setting this to /usr/local/ (libusb 1.0x) and /opt/local/ (macports) but still compile errors occur.

Im now assuming there is some compiler related issue with building libusb 0.1.12 on snow leopard. unfortunately this is as far as my compiler knowledge extends. thanks for all this help by the way. ive been at this for days!

libusb legacy v0.1.12 compile time error..

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.2.0 checking host system type... i686-apple-darwin10.2.0 checking for style of include used by make... GNU checking for gcc... gcc 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 gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for egrep... grep -E checking for ld used by gcc... /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 r +eload 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... 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 dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes rm: conftest.dSYM: is a directory checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -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 gcc object... rm: co +nftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... rm: conftest.dSYM: is a director +y yes checking if gcc supports -fno-rtti -fno-exceptions... rm: conftest.dSY +M: is a directory no checking for gcc option to produce PIC... -fno-common checking if gcc PIC flag -fno-common works... rm: conftest.dSYM: is a +directory yes checking if gcc supports -c -o file.o... rm: conftest.dSYM: is a direc +tory yes checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin10/ +4.2.1/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin10.2.0 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 g++... /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 g++ linker (/usr/libexec/gcc/i686-apple-darwin10/ +4.2.1/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fno-common checking if g++ PIC flag -fno-common works... rm: conftest.dSYM: is a +directory yes checking if g++ supports -c -o file.o... rm: conftest.dSYM: is a direc +tory yes checking whether the g++ linker (/usr/libexec/gcc/i686-apple-darwin10/ +4.2.1/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin10.2.0 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) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ANSI C... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking whether gcc and cc understand -c and -o together... rm: conft +est.dSYM: is a directory 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... /opt/local/bin/pkg-config checking if we should build the documentation... auto checking for jade... no checking for openjade... no checking for Doxygen tools... checking for dot... not found checking for doxygen... not found configure: WARNING: Documentation build components not installed. sgml + docs will not be built 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 make all-recursive Making all in . if /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -Werror + -no-cpp-precomp -g -O2 -g -Wall -MT usb.lo -MD -MP -MF ".deps/usb.Tp +o" -c -o usb.lo usb.c; \ then mv -f ".deps/usb.Tpo" ".deps/usb.Plo"; else rm -f ".deps/usb. +Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT u +sb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c -fno-common -DPIC -o .libs/ +usb.o gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT u +sb.lo -MD -MP -MF .deps/usb.Tpo -c usb.c -o usb.o >/dev/null 2>&1 if /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -Werror + -no-cpp-precomp -g -O2 -g -Wall -MT error.lo -MD -MP -MF ".deps/erro +r.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 gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT e +rror.lo -MD -MP -MF .deps/error.Tpo -c error.c -fno-common -DPIC -o +.libs/error.o gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT e +rror.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null +2>&1 if /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -Werror + -no-cpp-precomp -g -O2 -g -Wall -MT descriptors.lo -MD -MP -MF ".dep +s/descriptors.Tpo" -c -o descriptors.lo descriptors.c; \ then mv -f ".deps/descriptors.Tpo" ".deps/descriptors.Plo"; else r +m -f ".deps/descriptors.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT d +escriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c -fn +o-common -DPIC -o .libs/descriptors.o gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT d +escriptors.lo -MD -MP -MF .deps/descriptors.Tpo -c descriptors.c -o d +escriptors.o >/dev/null 2>&1 if /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -Werror + -no-cpp-precomp -g -O2 -g -Wall -MT darwin.lo -MD -MP -MF ".deps/dar +win.Tpo" -c -o darwin.lo darwin.c; \ then mv -f ".deps/darwin.Tpo" ".deps/darwin.Plo"; else rm -f ".dep +s/darwin.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -Werror -no-cpp-precomp -g -O2 -g -Wall -MT d +arwin.lo -MD -MP -MF .deps/darwin.Tpo -c darwin.c -fno-common -DPIC +-o .libs/darwin.o cc1: warnings being treated as errors darwin.c: In function 'usb_get_next_device': darwin.c:257: warning: passing argument 5 of 'IOCreatePlugInInterfaceF +orService' from incompatible pointer type darwin.c: In function 'claim_interface': darwin.c:560: warning: passing argument 5 of 'IOCreatePlugInInterfaceF +orService' from incompatible pointer type darwin.c: In function 'rw_completed': darwin.c:772: warning: cast from pointer to integer of different size darwin.c:772: warning: format '%lu' expects type 'long unsigned int', +but argument 4 has type 'unsigned int' darwin.c:774: warning: cast from pointer to integer of different size darwin.c: In function 'usb_os_find_devices': darwin.c:1067: warning: format '%08lx' expects type 'long unsigned int +', but argument 3 has type 'UInt32' darwin.c:1095: warning: format '%08lx' expects type 'long unsigned int +', but argument 5 has type 'UInt32' make[2]: *** [darwin.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 </readmore>

I realise this is not directly a perl issue so let me know if im stepping over the boundary here


In reply to Re^4: Problem make'ing Device::USB on osx Snow Leopard 10.6.2 by nick.fox
in thread Problem make'ing Device::USB on osx Snow Leopard 10.6.2 by nick.fox

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-25 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found