Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Problem make'ing Device::USB on osx Snow Leopard 10.6.2

by nick.fox (Novice)
on Jan 17, 2010 at 14:15 UTC ( [id://817862]=note: print w/replies, xml ) Need Help??


in reply to Re: Problem make'ing Device::USB on osx Snow Leopard 10.6.2
in thread Problem make'ing Device::USB on osx Snow Leopard 10.6.2

You are indeed correct, i copied from the wrong terminal. the following is the correct make error from Device::USB. sorry about that.

Checking if your kit is complete... Looks good Writing Makefile for Device::USB cp USB.pm blib/lib/Device/USB.pm cp lib/Device/USB/DevEndpoint.pm blib/lib/Device/USB/DevEndpoint.pm cp lib/Device/USB/Device.pm blib/lib/Device/USB/Device.pm Skip blib/lib/Device/USB.pm (unchanged) cp lib/Device/USB/Bus.pm blib/lib/Device/USB/Bus.pm cp lib/Device/USB/DevInterface.pm blib/lib/Device/USB/DevInterface.pm cp lib/Device/USB/FAQ.pod blib/lib/Device/USB/FAQ.pod cp dump_usb.pl blib/lib/Device/dump_usb.pl cp lib/Device/USB/DevConfig.pm blib/lib/Device/USB/DevConfig.pm /usr/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MDevice::USB -e1 0.31 b +lib/arch Starting Build Preprocess Stage Finished Build Preprocess Stage Starting Build Parse Stage Finished Build Parse Stage Starting Build Glue 1 Stage Finished Build Glue 1 Stage Starting Build Glue 2 Stage Finished Build Glue 2 Stage Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage Note (probably harmless): No library found for -lusb Writing Makefile for Device::USB Finished "perl Makefile.PL" Stage Starting "make" Stage /usr/bin/perl /System/Library/Perl/5.10.0/ExtUtils/xsubpp -typemap /S +ystem/Library/Perl/5.10.0/ExtUtils/typemap USB.xs > USB.xsc && mv U +SB.xsc USB.c gcc-4.2 -c -I/Users/nick/.cpan/build/Device-USB-0.31-TDsdQM -I"/opt/l +ocal/include/libusb-1.0/" -arch x86_64 -arch i386 -arch ppc -g -pipe +-fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include - +Os -DVERSION=\"0.31\" -DXS_VERSION=\"0.31\" "-I/System/Library/Per +l/5.10.0/darwin-thread-multi-2level/CORE" USB.c USB.xs:16: error: conflicting types for ‘libusb_init’ /opt/local/include/libusb-1.0/usb.h:768: error: previous declaration o +f ‘libusb_init’ was here USB.xs: In function ‘libusb_get_busses’: USB.xs:32: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:36: error: conflicting types for ‘libusb_open’ /opt/local/include/libusb-1.0/usb.h:792: error: previous declaration o +f ‘libusb_open’ was here USB.xs: In function ‘libusb_open’: USB.xs:37: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:41: error: conflicting types for ‘libusb_close’ /opt/local/include/libusb-1.0/usb.h:793: error: previous declaration o +f ‘libusb_close’ was here USB.xs: In function ‘libusb_close’: USB.xs:42: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:42: error: (Each undeclared identifier is reported only once USB.xs:42: error: for each function it appears in.) USB.xs:42: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:46: error: conflicting types for ‘libusb_set_configuration’ /opt/local/include/libusb-1.0/usb.h:796: error: previous declaration o +f ‘libusb_set_configuration’ was here USB.xs: In function ‘libusb_set_configuration’: USB.xs:51: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:51: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_set_altinterface’: USB.xs:60: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:60: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:64: error: conflicting types for ‘libusb_clear_halt’ /opt/local/include/libusb-1.0/usb.h:805: error: previous declaration o +f ‘libusb_clear_halt’ was here USB.xs: In function ‘libusb_clear_halt’: USB.xs:69: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:69: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_reset’: USB.xs:74: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:74: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:107: error: conflicting types for ‘libusb_claim_interface’ /opt/local/include/libusb-1.0/usb.h:797: error: previous declaration o +f ‘libusb_claim_interface’ was here USB.xs: In function ‘libusb_claim_interface’: USB.xs:112: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:112: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:116: error: conflicting types for ‘libusb_release_interface’ /opt/local/include/libusb-1.0/usb.h:798: error: previous declaration o +f ‘libusb_release_interface’ was here USB.xs: In function ‘libusb_release_interface’: USB.xs:121: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:121: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_control_msg’: USB.xs:138: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:138: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string’: USB.xs:172: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 5 has type ‘size_t’ USB.xs:174: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:174: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string_simple’: USB.xs:183: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 4 has type ‘size_t’ USB.xs:185: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:185: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:189: error: conflicting types for ‘libusb_get_descriptor’ /opt/local/include/libusb-1.0/usb.h:1140: error: previous definition o +f ‘libusb_get_descriptor’ was here USB.xs: In function ‘libusb_get_descriptor’: USB.xs:190: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:190: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_descriptor_by_endpoint’: USB.xs:195: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:195: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_write’: USB.xs:200: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:200: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_read’: USB.xs:205: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:205: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_write’: USB.xs:210: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:210: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_read’: USB.xs:215: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:215: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:269: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs:269: warning: its scope is only this definition or declaration, + which is probably not what you want USB.xs: In function ‘build_descriptor’: USB.xs:273: error: dereferencing pointer to incomplete type USB.xs:274: error: dereferencing pointer to incomplete type USB.xs:275: error: dereferencing pointer to incomplete type USB.xs:276: error: dereferencing pointer to incomplete type USB.xs:277: error: dereferencing pointer to incomplete type USB.xs:278: error: dereferencing pointer to incomplete type USB.xs:279: error: dereferencing pointer to incomplete type USB.xs:280: error: dereferencing pointer to incomplete type USB.xs:281: error: dereferencing pointer to incomplete type USB.xs:282: error: dereferencing pointer to incomplete type USB.xs:283: error: dereferencing pointer to incomplete type USB.xs:284: error: dereferencing pointer to incomplete type USB.xs:285: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:294: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘build_endpoint’: USB.xs:298: error: dereferencing pointer to incomplete type USB.xs:299: error: dereferencing pointer to incomplete type USB.xs:300: error: dereferencing pointer to incomplete type USB.xs:301: error: dereferencing pointer to incomplete type USB.xs:302: error: dereferencing pointer to incomplete type USB.xs:303: error: dereferencing pointer to incomplete type USB.xs:304: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:315: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘list_endpoints’: USB.xs:322: error: invalid use of undefined type ‘struct usb_endpoint_ +descriptor’ USB.xs:322: warning: passing argument 1 of ‘build_endpoint’ from incom +patible pointer type USB.xs: At top level: USB.xs:336: warning: ‘struct usb_interface_descriptor’ declared inside + parameter list USB.xs: In function ‘build_interface’: USB.xs:340: error: dereferencing pointer to incomplete type USB.xs:341: error: dereferencing pointer to incomplete type USB.xs:342: error: dereferencing pointer to incomplete type USB.xs:343: error: dereferencing pointer to incomplete type USB.xs:344: error: dereferencing pointer to incomplete type USB.xs:345: error: dereferencing pointer to incomplete type USB.xs:346: error: dereferencing pointer to incomplete type USB.xs:347: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:362: warning: ‘struct usb_interface’ declared inside parameter +list USB.xs: In function ‘list_interfaces’: USB.xs:371: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:371: error: dereferencing pointer to incomplete type USB.xs:373: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:373: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:385: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘build_configuration’: USB.xs:388: error: dereferencing pointer to incomplete type USB.xs:389: error: dereferencing pointer to incomplete type USB.xs:390: error: dereferencing pointer to incomplete type USB.xs:391: error: dereferencing pointer to incomplete type USB.xs:392: error: dereferencing pointer to incomplete type USB.xs:393: error: dereferencing pointer to incomplete type USB.xs:394: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:408: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘list_configurations’: USB.xs:415: error: invalid use of undefined type ‘struct usb_config_de +scriptor’ USB.xs:415: warning: passing argument 1 of ‘build_configuration’ from +incompatible pointer type USB.xs: At top level: USB.xs:425: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘build_device’: USB.xs:429: error: dereferencing pointer to incomplete type USB.xs:430: warning: passing argument 1 of ‘build_descriptor’ from inc +ompatible pointer type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:445: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘list_devices’: USB.xs:449: error: dereferencing pointer to incomplete type USB.xs:451: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type USB.xs: At top level: USB.xs:458: warning: ‘struct usb_bus’ declared inside parameter list USB.xs: In function ‘build_bus’: USB.xs:462: error: dereferencing pointer to incomplete type USB.xs:463: error: dereferencing pointer to incomplete type USB.xs:464: error: dereferencing pointer to incomplete type USB.xs: In function ‘lib_get_usb_busses’: USB.xs:484: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:484: error: dereferencing pointer to incomplete type USB.xs:486: warning: passing argument 1 of ‘build_bus’ from incompatib +le pointer type USB.xs: In function ‘lib_find_usb_device’: USB.xs:522: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:522: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:527: error: dereferencing pointer to incomplete type USB.xs:528: error: dereferencing pointer to incomplete type USB.xs:530: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type USB.xs:16: error: conflicting types for ‘libusb_init’ /opt/local/include/libusb-1.0/usb.h:768: error: previous declaration o +f ‘libusb_init’ was here USB.xs: In function ‘libusb_get_busses’: USB.xs:32: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:36: error: conflicting types for ‘libusb_open’ /opt/local/include/libusb-1.0/usb.h:792: error: previous declaration o +f ‘libusb_open’ was here USB.xs: In function ‘libusb_open’: USB.xs:37: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:41: error: conflicting types for ‘libusb_close’ /opt/local/include/libusb-1.0/usb.h:793: error: previous declaration o +f ‘libusb_close’ was here USB.xs: In function ‘libusb_close’: USB.xs:42: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:42: error: (Each undeclared identifier is reported only once USB.xs:42: error: for each function it appears in.) USB.xs:42: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:46: error: conflicting types for ‘libusb_set_configuration’ /opt/local/include/libusb-1.0/usb.h:796: error: previous declaration o +f ‘libusb_set_configuration’ was here USB.xs: In function ‘libusb_set_configuration’: USB.xs:51: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:51: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_set_altinterface’: USB.xs:60: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:60: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:64: error: conflicting types for ‘libusb_clear_halt’ /opt/local/include/libusb-1.0/usb.h:805: error: previous declaration o +f ‘libusb_clear_halt’ was here USB.xs: In function ‘libusb_clear_halt’: USB.xs:69: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:69: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_reset’: USB.xs:74: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:74: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:107: error: conflicting types for ‘libusb_claim_interface’ /opt/local/include/libusb-1.0/usb.h:797: error: previous declaration o +f ‘libusb_claim_interface’ was here USB.xs: In function ‘libusb_claim_interface’: USB.xs:112: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:112: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:116: error: conflicting types for ‘libusb_release_interface’ /opt/local/include/libusb-1.0/usb.h:798: error: previous declaration o +f ‘libusb_release_interface’ was here USB.xs: In function ‘libusb_release_interface’: USB.xs:121: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:121: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_control_msg’: USB.xs:138: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:138: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string’: USB.xs:172: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 5 has type ‘size_t’ USB.xs:174: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:174: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string_simple’: USB.xs:183: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 4 has type ‘size_t’ USB.xs:185: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:185: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:189: error: conflicting types for ‘libusb_get_descriptor’ /opt/local/include/libusb-1.0/usb.h:1140: error: previous definition o +f ‘libusb_get_descriptor’ was here USB.xs: In function ‘libusb_get_descriptor’: USB.xs:190: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:190: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_descriptor_by_endpoint’: USB.xs:195: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:195: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_write’: USB.xs:200: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:200: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_read’: USB.xs:205: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:205: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_write’: USB.xs:210: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:210: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_read’: USB.xs:215: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:215: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:269: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs:269: warning: its scope is only this definition or declaration, + which is probably not what you want USB.xs: In function ‘build_descriptor’: USB.xs:273: error: dereferencing pointer to incomplete type USB.xs:274: error: dereferencing pointer to incomplete type USB.xs:275: error: dereferencing pointer to incomplete type USB.xs:276: error: dereferencing pointer to incomplete type USB.xs:277: error: dereferencing pointer to incomplete type USB.xs:278: error: dereferencing pointer to incomplete type USB.xs:279: error: dereferencing pointer to incomplete type USB.xs:280: error: dereferencing pointer to incomplete type USB.xs:281: error: dereferencing pointer to incomplete type USB.xs:282: error: dereferencing pointer to incomplete type USB.xs:283: error: dereferencing pointer to incomplete type USB.xs:284: error: dereferencing pointer to incomplete type USB.xs:285: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:294: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘build_endpoint’: USB.xs:298: error: dereferencing pointer to incomplete type USB.xs:299: error: dereferencing pointer to incomplete type USB.xs:300: error: dereferencing pointer to incomplete type USB.xs:301: error: dereferencing pointer to incomplete type USB.xs:302: error: dereferencing pointer to incomplete type USB.xs:303: error: dereferencing pointer to incomplete type USB.xs:304: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:315: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘list_endpoints’: USB.xs:322: error: invalid use of undefined type ‘struct usb_endpoint_ +descriptor’ USB.xs:322: warning: passing argument 1 of ‘build_endpoint’ from incom +patible pointer type USB.xs: At top level: USB.xs:336: warning: ‘struct usb_interface_descriptor’ declared inside + parameter list USB.xs: In function ‘build_interface’: USB.xs:340: error: dereferencing pointer to incomplete type USB.xs:341: error: dereferencing pointer to incomplete type USB.xs:342: error: dereferencing pointer to incomplete type USB.xs:343: error: dereferencing pointer to incomplete type USB.xs:344: error: dereferencing pointer to incomplete type USB.xs:345: error: dereferencing pointer to incomplete type USB.xs:346: error: dereferencing pointer to incomplete type USB.xs:347: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:362: warning: ‘struct usb_interface’ declared inside parameter +list USB.xs: In function ‘list_interfaces’: USB.xs:371: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:371: error: dereferencing pointer to incomplete type USB.xs:373: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:373: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:385: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘build_configuration’: USB.xs:388: error: dereferencing pointer to incomplete type USB.xs:389: error: dereferencing pointer to incomplete type USB.xs:390: error: dereferencing pointer to incomplete type USB.xs:391: error: dereferencing pointer to incomplete type USB.xs:392: error: dereferencing pointer to incomplete type USB.xs:393: error: dereferencing pointer to incomplete type USB.xs:394: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:408: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘list_configurations’: USB.xs:415: error: invalid use of undefined type ‘struct usb_config_de +scriptor’ USB.xs:415: warning: passing argument 1 of ‘build_configuration’ from +incompatible pointer type USB.xs: At top level: USB.xs:425: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘build_device’: USB.xs:429: error: dereferencing pointer to incomplete type USB.xs:430: warning: passing argument 1 of ‘build_descriptor’ from inc +ompatible pointer type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:445: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘list_devices’: USB.xs:449: error: dereferencing pointer to incomplete type USB.xs:451: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type USB.xs: At top level: USB.xs:458: warning: ‘struct usb_bus’ declared inside parameter list USB.xs: In function ‘build_bus’: USB.xs:462: error: dereferencing pointer to incomplete type USB.xs:463: error: dereferencing pointer to incomplete type USB.xs:464: error: dereferencing pointer to incomplete type USB.xs: In function ‘lib_get_usb_busses’: USB.xs:484: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:484: error: dereferencing pointer to incomplete type USB.xs:486: warning: passing argument 1 of ‘build_bus’ from incompatib +le pointer type USB.xs: In function ‘lib_find_usb_device’: USB.xs:522: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:522: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:527: error: dereferencing pointer to incomplete type USB.xs:528: error: dereferencing pointer to incomplete type USB.xs:530: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type USB.xs:16: error: conflicting types for ‘libusb_init’ /opt/local/include/libusb-1.0/usb.h:768: error: previous declaration o +f ‘libusb_init’ was here USB.xs: In function ‘libusb_get_busses’: USB.xs:32: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:36: error: conflicting types for ‘libusb_open’ /opt/local/include/libusb-1.0/usb.h:792: error: previous declaration o +f ‘libusb_open’ was here USB.xs: In function ‘libusb_open’: USB.xs:37: warning: return makes pointer from integer without a cast USB.xs: At top level: USB.xs:41: error: conflicting types for ‘libusb_close’ /opt/local/include/libusb-1.0/usb.h:793: error: previous declaration o +f ‘libusb_close’ was here USB.xs: In function ‘libusb_close’: USB.xs:42: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:42: error: (Each undeclared identifier is reported only once USB.xs:42: error: for each function it appears in.) USB.xs:42: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:46: error: conflicting types for ‘libusb_set_configuration’ /opt/local/include/libusb-1.0/usb.h:796: error: previous declaration o +f ‘libusb_set_configuration’ was here USB.xs: In function ‘libusb_set_configuration’: USB.xs:51: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:51: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_set_altinterface’: USB.xs:60: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:60: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:64: error: conflicting types for ‘libusb_clear_halt’ /opt/local/include/libusb-1.0/usb.h:805: error: previous declaration o +f ‘libusb_clear_halt’ was here USB.xs: In function ‘libusb_clear_halt’: USB.xs:69: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:69: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_reset’: USB.xs:74: error: ‘usb_dev_handle’ undeclared (first use in this funct +ion) USB.xs:74: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:107: error: conflicting types for ‘libusb_claim_interface’ /opt/local/include/libusb-1.0/usb.h:797: error: previous declaration o +f ‘libusb_claim_interface’ was here USB.xs: In function ‘libusb_claim_interface’: USB.xs:112: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:112: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:116: error: conflicting types for ‘libusb_release_interface’ /opt/local/include/libusb-1.0/usb.h:798: error: previous declaration o +f ‘libusb_release_interface’ was here USB.xs: In function ‘libusb_release_interface’: USB.xs:121: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:121: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_control_msg’: USB.xs:138: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:138: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string’: USB.xs:172: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 5 has type ‘size_t’ USB.xs:174: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:174: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_string_simple’: USB.xs:183: warning: format ‘%u’ expects type ‘unsigned int’, but argu +ment 4 has type ‘size_t’ USB.xs:185: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:185: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:189: error: conflicting types for ‘libusb_get_descriptor’ /opt/local/include/libusb-1.0/usb.h:1140: error: previous definition o +f ‘libusb_get_descriptor’ was here USB.xs: In function ‘libusb_get_descriptor’: USB.xs:190: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:190: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_get_descriptor_by_endpoint’: USB.xs:195: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:195: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_write’: USB.xs:200: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:200: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_bulk_read’: USB.xs:205: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:205: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_write’: USB.xs:210: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:210: error: expected expression before ‘)’ token USB.xs: In function ‘libusb_interrupt_read’: USB.xs:215: error: ‘usb_dev_handle’ undeclared (first use in this func +tion) USB.xs:215: error: expected expression before ‘)’ token USB.xs: At top level: USB.xs:269: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs:269: warning: its scope is only this definition or declaration, + which is probably not what you want USB.xs: In function ‘build_descriptor’: USB.xs:273: error: dereferencing pointer to incomplete type USB.xs:274: error: dereferencing pointer to incomplete type USB.xs:275: error: dereferencing pointer to incomplete type USB.xs:276: error: dereferencing pointer to incomplete type USB.xs:277: error: dereferencing pointer to incomplete type USB.xs:278: error: dereferencing pointer to incomplete type USB.xs:279: error: dereferencing pointer to incomplete type USB.xs:280: error: dereferencing pointer to incomplete type USB.xs:281: error: dereferencing pointer to incomplete type USB.xs:282: error: dereferencing pointer to incomplete type USB.xs:283: error: dereferencing pointer to incomplete type USB.xs:284: error: dereferencing pointer to incomplete type USB.xs:285: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:294: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘build_endpoint’: USB.xs:298: error: dereferencing pointer to incomplete type USB.xs:299: error: dereferencing pointer to incomplete type USB.xs:300: error: dereferencing pointer to incomplete type USB.xs:301: error: dereferencing pointer to incomplete type USB.xs:302: error: dereferencing pointer to incomplete type USB.xs:303: error: dereferencing pointer to incomplete type USB.xs:304: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:315: warning: ‘struct usb_endpoint_descriptor’ declared inside +parameter list USB.xs: In function ‘list_endpoints’: USB.xs:322: error: invalid use of undefined type ‘struct usb_endpoint_ +descriptor’ USB.xs:322: warning: passing argument 1 of ‘build_endpoint’ from incom +patible pointer type USB.xs: At top level: USB.xs:336: warning: ‘struct usb_interface_descriptor’ declared inside + parameter list USB.xs: In function ‘build_interface’: USB.xs:340: error: dereferencing pointer to incomplete type USB.xs:341: error: dereferencing pointer to incomplete type USB.xs:342: error: dereferencing pointer to incomplete type USB.xs:343: error: dereferencing pointer to incomplete type USB.xs:344: error: dereferencing pointer to incomplete type USB.xs:345: error: dereferencing pointer to incomplete type USB.xs:346: error: dereferencing pointer to incomplete type USB.xs:347: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs:349: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:362: warning: ‘struct usb_interface’ declared inside parameter +list USB.xs: In function ‘list_interfaces’: USB.xs:371: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:371: error: dereferencing pointer to incomplete type USB.xs:373: error: invalid use of undefined type ‘struct usb_interface +’ USB.xs:373: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:385: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘build_configuration’: USB.xs:388: error: dereferencing pointer to incomplete type USB.xs:389: error: dereferencing pointer to incomplete type USB.xs:390: error: dereferencing pointer to incomplete type USB.xs:391: error: dereferencing pointer to incomplete type USB.xs:392: error: dereferencing pointer to incomplete type USB.xs:393: error: dereferencing pointer to incomplete type USB.xs:394: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs:396: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:408: warning: ‘struct usb_config_descriptor’ declared inside pa +rameter list USB.xs: In function ‘list_configurations’: USB.xs:415: error: invalid use of undefined type ‘struct usb_config_de +scriptor’ USB.xs:415: warning: passing argument 1 of ‘build_configuration’ from +incompatible pointer type USB.xs: At top level: USB.xs:425: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘build_device’: USB.xs:429: error: dereferencing pointer to incomplete type USB.xs:430: warning: passing argument 1 of ‘build_descriptor’ from inc +ompatible pointer type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs:432: error: dereferencing pointer to incomplete type USB.xs: At top level: USB.xs:445: warning: ‘struct usb_device’ declared inside parameter lis +t USB.xs: In function ‘list_devices’: USB.xs:449: error: dereferencing pointer to incomplete type USB.xs:451: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type USB.xs: At top level: USB.xs:458: warning: ‘struct usb_bus’ declared inside parameter list USB.xs: In function ‘build_bus’: USB.xs:462: error: dereferencing pointer to incomplete type USB.xs:463: error: dereferencing pointer to incomplete type USB.xs:464: error: dereferencing pointer to incomplete type USB.xs: In function ‘lib_get_usb_busses’: USB.xs:484: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:484: error: dereferencing pointer to incomplete type USB.xs:486: warning: passing argument 1 of ‘build_bus’ from incompatib +le pointer type USB.xs: In function ‘lib_find_usb_device’: USB.xs:522: error: ‘usb_busses’ undeclared (first use in this function +) USB.xs:522: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:525: error: dereferencing pointer to incomplete type USB.xs:527: error: dereferencing pointer to incomplete type USB.xs:528: error: dereferencing pointer to incomplete type USB.xs:530: warning: passing argument 1 of ‘build_device’ from incompa +tible pointer type lipo: can't open input file: /var/tmp//ccRH2UN9.out (No such file or d +irectory) make[1]: *** [USB.o] Error 1 A problem was encountered while attempting to compile and install your + Inline C code. The command that failed was: make The build directory was: /Users/nick/.cpan/build/Device-USB-0.31-TDsdQM/_Inline/build/Device/US +B To debug the problem, cd to the build directory, and inspect the outpu +t files. at /Users/nick/.cpan/build/Device-USB-0.31-TDsdQM/blib/lib/Device/USB +.pm line 20 Compilation failed in require. BEGIN failed--compilation aborted. make: *** [USB.inl] Error 25 sh-3.2#

Also, Just to elaborate a little, when building Device::USB on ubuntu 9.10 it requires libusb v0.1.12 LEGACY. it seems that Device::USB requires the usb.h C header which is either not present in the latest version of libusb or has a different name.

im starting to think my problems are more to do with this dependency than Device::USB itself.

Replies are listed 'Best First'.
Re^3: Problem make'ing Device::USB on osx Snow Leopard 10.6.2
by Corion (Patriarch) on Jan 17, 2010 at 14:36 UTC

    I think you are correct, because this:

    Note (probably harmless): No library found for -lusb

    indicates that libusb was not found at all.

Re^3: Problem make'ing Device::USB on osx Snow Leopard 10.6.2
by broomduster (Priest) on Jan 17, 2010 at 14:47 UTC
    ...requires the usb.h C header which is either not present in the latest version of libusb or has a different name.
    Actually, it looks as if you have multiple versions of usb.h (hence, multiple installs of libusb) that are being detected. Look carefully through the output you posted and you see lots of things like this:
    USB.xs:16: error: conflicting types for ‘libusb_init’ /opt/local/include/libusb-1.0/usb.h:768: error: previous declaration o +f ‘libusb_init’ was here
    Now you just need to find the competing version, but I don't see anything in your posted output to help solve that problem.

    Update: I looked right past the point Corion mentions, so obviously I don't have the full story. You may need to tweak some settings in Makefile.PL to properly detect the one version of libusb that you want to use.

    Update 2: It looks like you are using MacPorts to supply libusb. Since MacPorts has multiple versions available, I'm betting that you have both the "stable" and the "legacy" versions installed, which is why usb.h is found more than once. I don't use MacPorts, so I can't offer any advice about what's the best way out of this, but I do think you need to tell Makefile.PL where to find what it's looking for.

      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..

        so i started copying some of the libusb library files from my ubuntu install.
        That is usually not a good idea. Library packages (such as libusb) really need to be installed via their own make procedures to be sure that all files are installed in their proper places so that they all know where to find each other and so that other library packages (such as Device::USB) can know where to find all of them.
        I did also use macports, so I have now cleared out all installed libusb files to remove any related issues.
        What did you use from MacPorts? The libusb port or the libusb-legacy port?
        Device::USB seems to require the usb.h header from libusb legacy(0.1)
        Fair enough.... so you need the "legacy" version on Snow Leopard.
        I have not installed g++ or any other compilers on my macbook.
        Apple's Developer Tools are installed by default on Snow Leopard; so you should have all the compilers you (usually) need for this kind of task. One way to see this is at the 11th line of your output where you see:
        checking for gcc... gcc
        Otherwise, it should have died at that point.

        Update: I stand corrected about Developer Tools on Snow Leopard (thanks dHarry). Nevertheless, it looks like you have some version Developer Tools installed, as some version of gcc is being detected (perhaps from a previous version of Mac OS X?). Make sure you have the latest Developer Tools to ensure compatibility.

        Trying to compile libusb 0.1 results in the make error that i put in my original post.(see top of thread).
        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.
        May I suggest that you use MacPorts to install the libusb-legacy port? If I understand you correctly, you are trying to build it by hand. If you let MacPorts do the heavy lifting, it will (or should) ensure that you have all necessary prerequisites installed and (most important) that the compilations are done with the proper flags to avoid all those warnings about incompatible pointers and such.

        To summarize:

        • Use MacPorts to install libusb-legacy
        • Set the environment variables to build Device::USB to point at the MacPorts install (I think these will be correct for MacPorts):
          • LIBUSB_LIBDIR=/opt/local/lib
          • LIBUSB_INCDIR=/opt/local/include
        Good Luck!

        Disclaimers: I'm not using MacPorts and I'm not running Snow Leopard. YMMV, but HTH.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://817862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found