I'm trying to install libusb-devel using Macports on a friend's Mac (we need it in order to install Osceleton). On my computer, the installation went perfectly well, but I'm stuck while installing it on his.

One of the dependencies of libusb-devel is curl. However, installing curl seems to fail. During the configuration of curl, an error message is shown and the installation quits. I'm referred to the log, where this is the relevant part for the error:

:info:configure configure: found both libz and libz.h header
:info:configure checking for "/dev/urandom"... configure: error: cannot check for file existence when cross compiling
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_curl/work/curl-7.21.4-ppc" && ./configure --prefix=/opt/local --disable-dependency-tracking --disable-dependency-tracking --enable-ipv6 --without-gnutls --without-gssapi --without-librtmp --without-libssh2 --without-nss --without-polarssl --without-spnego --with-ssl --disable-ares --disable-ldap --disable-ldaps --with-libidn --with-zlib=/opt/local --disable-dependency-tracking --with-ca-bundle=/opt/local/share/curl/curl-ca-bundle.crt --host=powerpc-apple-darwin10.7.0 " 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 curl): org.macports.destroot org.macports.configure org.macports.build
:notice:configure Log for curl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_curl/main.log

If I run the configure-script myself, using the command given in the log, all goes well and curl is perfectly installed. However, Macports is not happy with this, because I get errors telling me that certain files already exist etc. Also, installing curl directly using Macports seems to give trouble.

Because of this, I can't continue the installation of libusb-devel, and we need it quite soon for a school project. Can anyone help?


EDIT: the entire logfile can be found here: http://pastebin.com/2XAMHv5M . He's running Mac OS X 10.6.6.

  • 1
    Im no expert about MacPorts, and very likeley it doesent solve your question, but have you ever tried homebrew? Its another mananger, but to my opinion its faster, easier and fails much less. Check if curl is available for homebrew, and if it is, I recomend it much more than MacPorts. – kevin9794 Apr 17 '11 at 19:46
  • Macs come with curl. Type man curl in Terminal. – Nathan Greenstein Apr 17 '11 at 20:49
  • @Nathan Be that as it may, MacPorts/libusb-devel wants to install its own curl. – user5077 Apr 19 '11 at 2:10

The issue is that you are trying to compile for the ppc architecture thus the error in cross-compiling.

Did you upgrade to Snow Leopard leaving macports on - the only way to upgrade macports across operating systems is to reinstall.

Otherwise did you choose the correct dmg to install from - it is OS dependant.

Otherwise you need to look at /opt/local/etc/macports/macports.conf and see what build_arch is set to. The default (or not set) on a new Snow Leopard macports install is 32 or 64 bit Intel code depending on the CPU you have.

You must log in to answer this question.