Trouble Linking to libusrp

Hi all,

I’m working in Ubuntu 8.04 writing code in C++ that access the USRP.
I’m trying to link to the usrp library (libusrp) with the -lusrp flag,
but g++ spits out the following error:

/usr/bin/ld: cannot find -lusrp
collect2: ld returned 1 exit status

In /usr/lib/ I find the following associated files:

libusrp.la
libusrp.so.0
libusrp.so.0.0.0

Previously, I had downloaded the gnuradio source code and compiled it to
gain access to the library in gnuradio/usrp/host/lib/legacy/.libs, and
in that case there’s also a libusrp.so file that’s absent in the above
directory. I don’t have a very deep understanding of shared libraries,
but it seems to me that my installation in /usr/lib is missing a file.
Is this an inadvertent omission from the libusrp0c2a package for Debian?

Thanks,
Paul

On Tue, Sep 30, 2008 at 11:17 AM, Paul C. [email protected]
wrote:

Previously, I had downloaded the gnuradio source code and compiled it to
gain access to the library in gnuradio/usrp/host/lib/legacy/.libs, and in
that case there’s also a libusrp.so file that’s absent in the above
directory. I don’t have a very deep understanding of shared libraries, but
it seems to me that my installation in /usr/lib is missing a file. Is this
an inadvertent omission from the libusrp0c2a package for Debian?

This is a known bug in the 3.1.1 packages for Ubuntu that was fixed in
release 3.1.2. What version of the deb files are you installing?

The short-term solution for you is to add a symlink:

$ cd /usr/lib
$ sudo ln -s libusrp.so.0.0.0 libusrp.so
$ sudo ldconfig


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com/

Paul C. wrote:

I very recently installed with the most up-to-date packages available.
dpkg tells me that my libusrp0c2a package is version 3.1.3.

Okay, well, the short-term fix will work for now, and I’ll go figure
this out. Thanks for the bug report.

On Tue, Sep 30, 2008 at 1:30 PM, Johnathan C.
[email protected] wrote:

Okay, well, the short-term fix will work for now, and I’ll go figure
this out. Thanks for the bug report.

It turns out the issue was fixed on the trunk, but never propagated to
the release branch. This will be fixed for release 3.1.4.


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com/

Johnathan C. wrote:

This is a known bug in the 3.1.1 packages for Ubuntu that was fixed in
release 3.1.2. What version of the deb files are you installing?

The short-term solution for you is to add a symlink:

$ cd /usr/lib
$ sudo ln -s libusrp.so.0.0.0 libusrp.so
$ sudo ldconfig

I very recently installed with the most up-to-date packages available.
dpkg tells me that my libusrp0c2a package is version 3.1.3.

Thanks,
Paul