Compiling on OSX 10.5

Hi all,

I recently upgraded to osx 10.5 and am in the process of installing
gnuradio.
I’m trying to follow
http://staff.washington.edu/jon/gr-osx/gr-osx.html with os x 10.5 and
today’s gnuradio trunk.

I’m having some trouble, mostly because I’m not sure I fully
understand how this whole configure/pkg-config thing works.

The first problem I have is that macports installs libusb as
libusb-1.0; meaning that I get the following output from configure:

checking for snprintf... (cached) yes checking for USB... no checking usb.h usability... no checking usb.h presence... no checking for usb.h... no USRP requires libusb. usb.h not found. See http://libusb.sf.net checking for library containing usb_bulk_write... no USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net Unable to find dependency libusb. checking for sdcc... sdcc -mmcs51 --no-xinit-opt checking for asx8051... asx8051 -plosgff checking sdcc_version "2.9.0"... 2.9.0 configure: error: Component usrp has errors; stopping.

I can ‘fool’ configure by making a symbolic link from the
pkg_config_path/libusb-1.0.pc to pkg_config_path/libusb.pc

This allows configure to finish, but I assumed it would cause some
problems later on, and it did:

usrp_basic.cc:34:17: error: usb.h: No such file or directory usrp_basic.cc:1367: error: ‘usb_strerror’ was not declared in this scope make[5]: *** [usrp_basic.lo] Error 1 make[4]: *** [all] Error 2 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

There exist ‘similar’ files, like ‘(include_dir)/libusb-1.0/libusb.h’

Did I install the wrong thing? Do I need to make a bunch of symlinks?
Is macports broken?

Thanks
Jason

Thanks

Jason

The first problem I have is that macports installs libusb as
libusb-1.0; meaning that I get the following output from configure:

I was told this is solved by installing the macports package
libusb-compat, it makes libusb-1.0 backwards compatible (and compiling
went great!)

Now there is an issue with make check, I know that the make check for
the usrp and os x has recently been changed because it was throwing
errors, I’m not sure if this is related or not…

make check-TESTS
Traceback (most recent call last):
File “./qa_usrp.py”, line 24, in
import usrp_swig
File “/Users/jason/coderepos/gnuradio/gr-usrp/src/usrp_swig.py”,
line 27, in
import _usrp_swig
ImportError:
dlopen(/Users/jason/coderepos/gnuradio/gr-usrp/src/.libs/_usrp_swig.so,
2): Symbol not found: _usb_error_str
Referenced from:
/Users/jason/coderepos/gnuradio/usrp/host/lib/.libs/libusrp.0.dylib
Expected in: dynamic lookup

FAIL: run_tests

This same error is given when I run usrp_oscope after a make install.

Jason

Jason U. wrote:

/Users/jason/coderepos/gnuradio/usrp/host/lib/.libs/libusrp.0.dylib Expected in: dynamic lookup

FAIL: run_tests

This same error is given when I run usrp_oscope after a make install.

GNURadio uses a variable from the internals of libusb. libusb-compat
changes the private libusb struct that gnuradio has a local copy off.

Bottom line: libusb-compat only works for programs that use the
published API of libusb. GNU Radio goes beyond the public API.

Philip

Some of us were just talking about LIBUSB 1.0 & compat libraries off-
list a few days ago w/r.t. GNU Radio; I had updated MacPorts & tried
to “make check” on the latest trunk of GNU Radio & came up with the
same error Jason found. What we both found is an incompatibility
between LIBUSB 0.1 and compat 0.1 … well, sort of: the error in on
an internal structure that the external API doesn’t provide, so really
it’s our bad for using internal variables and structures and not just
the external API.

I’m going to take a look at this today & see if I can correct it far
enough so that the USRP library works with the LIBUSB compat library
as well as the legacy LIBUSB for OSX only. I don’t think it’ll be
very difficult, which is why I’m willing to try the fix.

I am NOT going to look into updating GNU Radio’s overall FUSB code to
work with LIBUSB 1.0 … not enough time in the day / week / month
right now … but that would make an interesting project for someone
else …

More later. - MLD

On Fri, Jul 24, 2009 at 06:22, Michael D.[email protected] wrote:

I’m going to take a look at this today & see if I can correct it far enough
so that the USRP library works with the LIBUSB compat library as well as the
legacy LIBUSB for OSX only. I don’t think it’ll be very difficult, which is
why I’m willing to try the fix.

Thanks!

Johnathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs