discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] libusb not recognized by configure (Mac OS X)


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] libusb not recognized by configure (Mac OS X)
Date: Fri, 9 Sep 2005 12:56:22 -0700
User-agent: Mutt/1.5.6i

On Thu, Sep 08, 2005 at 04:38:59PM -0700, Jonathan Jacky wrote:
> 
> I am trying to build usrp (from CVS on sourceforge, checked out Sep 8)
> on Mac OS X (10.3.8 Panther).  I have installed libusb but configure
> doesn't recognize it.
> 
> I got libusb-0.1.10a.tar.gz from libusb.sourceforge.net and built it
> without any apparent problems.  It installed under /usr/local.  I have
> /usr/local/include/usb.h and usbpp.h, /usr/local/bin/libusb-config, and
> /usr/local/lib/libusb.a, libusb.dylib, libusbpp.a, and libusbpp.dylib.
> 
> I have GNU autoconf 2.59 and automake 1.9.4 from darwinports.
> 
> Here is what happens when I try configure:
> 
> % ./configure --prefix=$GR --enable-maintainer-mode 
> --with-boost-include-dir=/opt/local/include/boost-1_31
> ...
> ... lots of benign messages
> ...
> checking usb.h usability... yes
> checking usb.h presence... yes
> checking for usb.h... yes
> checking for library containing usb_bulk_write... no
> configure: error: USRP requires libusb. usb_bulk_write not found, stop. See 
> http://libusb.sf.net

I've seen this problem too on Panther, but don't know how to fix it.
I don't think I've got a full understanding of how OS/X finds shared
libraries, etc.  Enlightenment welcome.

Perhaps the library check is failing to pass the right options, etc to
the linker to get it happy.  Not sure.  If you try to compile the
small test program by hand, does it link OK?  If not, what does it
take to get it to link?

> My usb.h does declare usb_bulk_write, and the output from nm libusb.a
> and nm libusb.dylib both have a line that contains T _usb_bulk_write.
> So libusb is there and contains usb_bulk_write, contrary to
> configure's complaint.
>
> config.log seems to indicate that configure failed to link a small
> test program that invokes usb_bulk_write, for reasons that aren't
> clear to me.  I've included the pertinent parts of config.log at the
> end of this message (below).
> 
> Can anyone suggest a solution or workaround to this problem?
> 
> Jon Jacky
> 
> PS  A different issue involving USB and OS X was addressed quite a while ago
> http://lists.gnu.org/archive/html/discuss-gnuradio/2004-01/msg00044.html
> 
> PPS I have already worked around another problem with libusb and
> configure.  I had initially installed libusb under /opt/local (by
> using configure --prefix.  /opt/local is where I put the other
> gnuradio prerequisite libraries: boost, fftw3f, and cppunit.  This is
> the convention used by darwinports).  The usrp configure could not
> find /opt/local/include/usb.h (it says "checking for usb.h ... no"
> even though the gnuradio-core configure can find
> /opt/local/include/fftw3.h etc.)

I would hazard a guess that this is because fftw uses pkg-config
while libusb does not.  pkg-config really helps in these situations.
Perhaps we should submit an upstream patch to libusb...

> I tried --includedir=/opt/local/include, CCFLAGS=-I/opt/local/include and
> several other maneuvers but none worked.  I finally uninstalled libusb
> from /opt/local and installed it under /usr/local (no --prefix)
> instead, then configure stopped complaining about no usb.h.  Can
> anyone advise me how to tell configure to find libusb under /opt/local?
> 
> PPPS  Here are the relevant excerpts from config.log.  Configure tries
> to link the conftest program twice, the first time _usb_bulk_write is
> an undefined symbol, but the second time a bunch of seemingly
> unrelated symbols are undefined.

[snip]

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]