Opened 13 years ago

Closed 13 years ago

#31531 closed defect (fixed)

sane-backends: USB support requested but required libraries not found

Reported by: sjd4@… Owned by: aguynamedryan+sane@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: drkp (Dan Ports), KNIZEK.MILAN@…
Port: sane-backends

Description (last modified by ryandesign (Ryan Carsten Schmidt))

:info:configure configure: error: USB support requested but required libraries not found.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_sane-backends/sane-backends/work/sane-backends-1.0.22" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with-docdir=/opt/local/share/doc/sane-backends --enable-local-backends --enable-libusb --disable-latex --without-gphoto2 " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for sane-backends): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for sane-backends is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_sane-backends/sane-backends/main.log

Attachments (4)

main.log (31.5 KB) - added by sjd4@… 13 years ago.
main.log
good_main.log (42.0 KB) - added by aguynamedryan+macports@… 13 years ago.
Successful configure under 10.6
diff.log (29.8 KB) - added by sjd4@… 13 years ago.
diff good_main.log main.log
config.log (226.1 KB) - added by sjd4@… 13 years ago.

Download all attachments as: .zip

Change History (23)

Changed 13 years ago by sjd4@…

Attachment: main.log added

main.log

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: sane-backends removed
Owner: changed from macports-tickets@… to aguynamedryan+sane@…
Summary: sane-backends fails configuringsane-backends: USB support requested but required libraries not found

Remember to use WikiFormatting, please.

comment:2 Changed 13 years ago by aguynamedryan+macports@…

sjd4, I see you're using Lion (Mac OS X 10.7). I have yet to upgrade so I'm (successfully) configuring under Snow Leopard (Mac OS X 10.6).

I have three guesses:

  1. Does Lion include its own libusb? If so, maybe it's missing usb_interrupt_read? Seems unlikely, but it's my best first guess.
  2. Maybe configure's test usb_interrupt_read isn't happy working under llvm-gcc?
  3. Some of your libraries have been built with +universal and maybe there's a problem there?

I'm attaching my main.log if you want to diff the two...

Changed 13 years ago by aguynamedryan+macports@…

Attachment: good_main.log added

Successful configure under 10.6

comment:3 Changed 13 years ago by sjd4@…

aguynamedryan, sorry, I'm a bit of a n00b. How do I answer those questions effectively?

1.) I did a "sudo find / | grep libusb". It looks like I have libusb in: /opt/local/lib/ and /Library/Image Capture/Devices/Lexmark Scanner.app/Contents/Plugins/Laser Printers/X342nScannerLib.bundle/Contents/Frameworks/libusb.framework

2.) No idea how to confirm.

3.) How do I check what +universal packages are installed? I did a "sudo port list installed | grep universal" and it came back with no results.

I'll diff the log when I get a chance later.

Thanks, sjd4

Changed 13 years ago by sjd4@…

Attachment: diff.log added

diff good_main.log main.log

comment:4 Changed 13 years ago by sjd4@…

aguynamedryan,

Is there someway I can address your 2nd and 3rd comments in your initial request?

sjd4

comment:5 in reply to:  4 Changed 13 years ago by aguynamedryan+macports@…

Replying to sjd4@…:

Sorry for the delayed response. I'm not really sure how you can answer those questions either.

Would you please attach your config.log file? That might give me some more clues.

Changed 13 years ago by sjd4@…

Attachment: config.log added

comment:6 Changed 13 years ago by sjd4@…

aguynamedryan,

Config.log attached. There is no immediate rush or anything for this; I just wanted to stay in contact. Let me know if there is anything else I can do to help. Thanks.

sjd4

comment:7 in reply to:  6 Changed 13 years ago by aguynamedryan+macports@…

Replying to sjd4@…:

From your config.log:

ld: warning: ignoring file /opt/local/lib/libusb.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

There's yer problem!

I think we're back to the whole "+universal" thing being a problem, but to be honest, I haven't grokked what is going one with architectures and how MacPorts works with them.

When I ran into the problem when I switched from PPC to x86, I just trashed my whole /opt/local directory and reinstalled MacPorts fresh and built without universal. Did the same thing when I migrated to Snow Leopard. There is probably a better solution, but I don't know what it is. Maybe someone else can jump into this discussion and give you better advice.

comment:8 Changed 13 years ago by jmroot (Joshua Root)

Check the archs of libusb-compat:

port -v installed libusb-compat
lipo -info /opt/local/lib/libusb.dylib

comment:9 Changed 13 years ago by jmroot (Joshua Root)

Actually, the problem appears to be the flags that are added from net-snmp-config, which include -arch i386. That may in turn come from perl. So check the archs on both of those. Whatever the source of the -arch flag is needs to be fixed not to list it.

comment:10 Changed 13 years ago by sjd4@…

Output from each command

port -v installed libusb-compat The following ports are currently installed:

libusb-compat @0.1.3_0 (active) platform='darwin 11' archs='x86_64'

lipo -info /opt/local/lib/libusb.dylib Non-fat file: /opt/local/lib/libusb.dylib is architecture: x86_64

port -v installed net-snmp-config None of the specified ports are installed.

port -v installed perl5 The following ports are currently installed:

perl5 @5.12.3_1+perl5_12 (active) platform='darwin 11' archs='noarch'

Is this what your looking for? "archs='no arch'" under perl5?

comment:11 Changed 13 years ago by sjd4@…

Any more information you need from me? Also, do you guys have a donation link or anything so that I can help contribute? I appreciate all the work you've done on this. Thanks.

comment:12 Changed 13 years ago by jmroot (Joshua Root)

The perl5 port only installs some symlinks and depends on a specific perl 5.x, and net-snmp-config is a file installed by net-snmp. So the relevant commands would be:

port -v installed net-snmp
port -v installed perl5.12

If the -arch flags do come from perl then this is the same as #24779.

comment:13 Changed 13 years ago by drkp (Dan Ports)

Cc: dports@… added

I'm seeing this too, but the archflags aren't coming from net-snmp (I don't have net-snmp installed universal, and net-snmp-config --cflags or --libs don't include any archflags).

Not sure where they are coming from. I wouldn't be surprised if they were coming from perl, which I do have installed universal, but I'm not clear on how.

comment:14 Changed 13 years ago by sjd4@…

port -v installed net-snmp The following ports are currently installed:

net-snmp @5.7_0 (active) platform='darwin 11' archs='x86_64'

port -v installed perl5.12 The following ports are currently installed:

perl5.12 @5.12.3_2+universal (active) platform='darwin 11' archs='i386 x86_64'

So does that mean that this is the same as #24779?

comment:15 Changed 13 years ago by erniefourman@…

I'm seeing the same problem, but with perl5.12 -universal active. I took a look in the libusb libraries, and the _usb_interrupt_read symbol is listed as defined. Perhaps a stupid question, but why does libusb-compat@0.1.3 give me libusb-0.1.4.dylib rather than libusb-0.1.3.dylib?

nm /opt/local/lib/libusb-0.1.4.dylib | grep _read 0000000000001770 T _usb_bulk_read 00000000000014d0 T _usb_interrupt_read

nm /opt/local/lib/libusb.a | grep _read 0000000000000c10 T _usb_bulk_read 0000000000002de8 S _usb_bulk_read.eh 0000000000000970 T _usb_interrupt_read 0000000000002d78 S _usb_interrupt_read.eh

<snip> checking usb.h presence... yes checking for usb.h... yes checking for usb_interrupt_read in -lusb... no configure: error: USB support requested but required libraries not found. shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_sane-backends/sane-backends/work/sane-backends-1.0.22" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with-docdir=/opt/local/share/doc/sane-backends --enable-local-backends --enable-libusb --disable-latex --without-gphoto2 " returned error 1 </snip>

port -v installed perl5.12 The following ports are currently installed:

perl5.12 @5.12.3_1 platform='darwin 10' archs='x86_64' perl5.12 @5.12.3_1+universal platform='darwin 11' archs='i386 x86_64' perl5.12 @5.12.3_2-universal (active) platform='darwin 11' archs='x86_64' perl5.12 @5.12.3_2+universal platform='darwin 11' archs='i386 x86_64'

port -v installed net-snmp The following ports are currently installed:

net-snmp @5.7_0 (active) platform='darwin 11' archs='x86_64'

comment:16 Changed 13 years ago by KNIZEK.MILAN@…

Cc: KNIZEK.MILAN@… added

Cc Me!

comment:17 Changed 13 years ago by sjd4@…

I installed "net-snmp @5.7.1_1" today and tried to upgrade sane-backends @1.0.22_1 and gimp @2.6.11_1 and both worked today! As long as this is working for everyone else I guess this ticket can be closed. Someone must have addressed this issue in net-snmp? I'm not exactly sure why it's working, but I'm glad that it is.

output from: port -v installed perl5.12 perl5.12 @5.12.3_2+universal (active) platform='darwin 11' archs='i386 x86_64'

port -v installed net-snmp net-snmp @5.7.1_1 (active) platform='darwin 11' archs='x86_64'

port -v installed libusb-compat libusb-compat @0.1.3_0 (active) platform='darwin 11' archs='x86_64'

lipo -info /opt/local/lib/libusb.dylib Non-fat file: /opt/local/lib/libusb.dylib is architecture: x86_64

comment:18 in reply to:  17 Changed 13 years ago by aguynamedryan+macports@…

Replying to sjd4@…:

Probably a result of this ticket: #32507

Thanks, ryandesign!

comment:19 Changed 13 years ago by drkp (Dan Ports)

Resolution: fixed
Status: newclosed

#24779 is also fixed now, so between that and #32507 this shouldn't be an issue anymore.

Note: See TracTickets for help on using tickets.