discuss-gnuradio
[Top][All Lists]
Advanced

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

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


From: Jonathan Jacky
Subject: [Discuss-gnuradio] libusb not recognized by configure (Mac OS X)
Date: Thu, 8 Sep 2005 16:38:59 -0700 (PDT)


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

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

...
configure:21626: checking for library containing usb_bulk_write
configure:21656: gcc -o conftest -g -O2   conftest.c  >&5
ld: Undefined symbols:
_usb_bulk_write
configure:21662: $? = 1
configure: failed program was:
| /* confdefs.h.  */
.. etc.
| char usb_bulk_write ();
| int
| main ()
| {
| usb_bulk_write ();
|   ;
|   return 0;
| }
configure:21711: gcc -o conftest -g -O2   conftest.c -lusb   >&5
ld: Undefined symbols:
_CFRunLoopAddSource
...
... usb_bulk_write does NOT appear in this list!
...
_kCFRunLoopDefaultMode
configure:21717: $? = 1
configure: failed program was:
| /* confdefs.h.  */
...
| main ()
| {
| usb_bulk_write ();
|   ;
|   return 0;
| }
configure:21745: result: no
configure:21751: error: USRP requires libusb. usb_bulk_write not found, stop. 
See http://libusb.sf.net




reply via email to

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