Problem finding gnuradio libraries on Mac OSX 10.6

Hello,

I am very new to gnuradio, and I have been trying to build gnuradio on
Mac
OSX 10.6.8 on a 2.4 GHz Intel Core Duo Macbook Pro. I tried the Macports
gnuradio, and it worked for me, but I couldn’t get it to work with UHD
which (I think) I need for my B100 USRP.

I installed the dependencies from Macports. I downloaded gnuradio from
git
into /opt. I run cmake in /opt/gnuradio/build with the following
options:

sudo cmake -LAH -DCMAKE_INSTALL_PREFIX=/opt/local
-DQWT_LIBRARIES=/opt/local/lib/libqwt.dylib
-DQWT_INCLUDE_DIRS=/opt/local/include/qwt
-DCMAKE_MAKE_PROGRAM=/usr/bin/make
-DPYTHON_EXECUTABLE=/opt/local/bin/python2.6
-DPYTHON_LIBRARY=/opt/local/lib/libpython2.6.dylib
-DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6

…/

then sudo make, then sudo make test (all but one test passes). Not sure
if
it’s important, but I must use sudo even for cmake and make

When I try to run dial_tone, however, I get the following:

/opt/local/share/gnuradio/examples/audio> ./dial_tone.py
Traceback (most recent call last):
File “./dial_tone.py”, line 24, in
from gnuradio import gr
File “/opt/local/lib/python2.6/site-packages/gnuradio/gr/init.py”,
line 43, in
from gnuradio_core import *
File
“/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core.py”,
line
23, in
from gnuradio_core_runtime import *
File
“/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 26, in
_gnuradio_core_runtime = swig_import_helper()
File
“/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 22, in swig_import_helper
_mod = imp.load_module(’_gnuradio_core_runtime’, fp, pathname,
description)
ImportError:
dlopen(/opt/local/lib/python2.6/site-packages/gnuradio/gr/_gnuradio_core_runtime.so,
2): Library not loaded: libgnuradio-core.3.5.2git.dylib
Referenced from:
/opt/local/lib/python2.6/site-packages/gnuradio/gr/_gnuradio_core_runtime.so
Reason: image not found

When I run gnuradio-companion, I get an error window that says I should
check PYTHONPATH and LD_LIBRARY_PATH which are set in my .profile to be
the
following:

export
PYTHONPATH=/opt/local/lib/python2.6/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:$PYTHONPATH

export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

I am at a loss at this point, and I would be grateful for any help.

Regards,

Scott

export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

I believe OSX uses DYLD_LIBRARY_PATH

-Josh

Hi Scott - You shouldn’t need to set the DYLD path. Have you verified
that the file “/opt/local/lib/libgnuradio-core.3.5.2git.dylib” exists?
Did you use /opt/local for the MacPorts install? I would -highly-
recommend keeping MacPorts and any local installs separate – e.g., use
/opt/local for MacPorts and /usr/local for anything installed by hand.
You shouldn’t need to do “sudo make” to get everything to compile, no
matter if using CMake or GNU Autotools. All of this says to me that
your OS install is odd. - MLD

I followed your advice, cleared everything out and started from scratch.
Installing to /usr/local from my home directory appears to work (both
dial_tone.py and my usrp B100) once I got my PYTHONPATH pointing in the
right direction.

For any total newbies out there (like me) running cmake with -LAH helped
a
lot to get things pointed to the right libraries and directories.

Thanks again for the help.

On , Michael D. [email protected] wrote:

Hi Scott - You shouldn’t need to set the DYLD path. Have you verified
that the file “/opt/local/lib/libgnuradio-core.3.5.2git.dylib” exists?
Did you use /opt/local for the MacPorts install? I would -highly-
recommend keeping MacPorts and any local installs separate – eg, use
/opt/local for MacPorts and /usr/local for anything installed by hand.
You shouldn’t need to do “sudo make” to get everything to compile, no
matter if using CMake or GNU Autotools. All of this says to me that your
OS install is odd. - MLD

On Jan 29, 2012, at 9:53 PM, Scott Kovaleski wrote:

Hello,

I am very new to gnuradio, and I have been trying to build gnuradio on
Mac OSX 10.6.8 on a 2.4 GHz Intel Core Duo Macbook Pro. I tried the
Macports gnuradio, and it worked for me, but I couldn’t get it to work
with UHD which (I think) I need for my B100 USRP.

I installed the dependencies from Macports. I downloaded gnuradio from
git into /opt. I run cmake in /opt/gnuradio/build with the following
options:

sudo cmake -LAH -DCMAKE_INSTALL_PREFIX=/opt/local \

-DQWT_LIBRARIES=/opt/local/lib/libqwt.dylib \

-DQWT_INCLUDE_DIRS=/opt/local/include/qwt \

-DCMAKE_MAKE_PROGRAM=/usr/bin/make \

-DPYTHON_EXECUTABLE=/opt/local/bin/python2.6 \

-DPYTHON_LIBRARY=/opt/local/lib/libpython2.6.dylib \

-DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6

\

…/

then sudo make, then sudo make test (all but one test passes). Not sure
if it’s important, but I must use sudo even for cmake and make

When I try to run dial_tone, however, I get the following:

/opt/local/share/gnuradio/examples/audio> ./dial_tone.py

Traceback (most recent call last):

File “./dial_tone.py”, line 24, in

from gnuradio import gr

File “/opt/local/lib/python2.6/site-packages/gnuradio/gr/init.py”,
line 43, in

from gnuradio_core import *

File “/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core.py”,
line 23, in

from gnuradio_core_runtime import *

File
“/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 26, in

_gnuradio_core_runtime = swig_import_helper()

File
“/opt/local/lib/python2.6/site-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 22, in swig_import_helper

_mod = imp.load_module(‘_gnuradio_core_runtime’, fp, pathname,
description)

ImportError:

dlopen(/opt/local/lib/python2.6/site-packages/gnuradio/gr/_gnuradio_core_runtime.so,

2): Library not loaded: libgnuradio-core.3.5.2git.dylib

Referenced from:
/opt/local/lib/python2.6/site-packages/gnuradio/gr/_gnuradio_core_runtime.so

Reason: image not found

When I run gnuradio-companion, I get an error window that says I should
check PYTHONPATH and LD_LIBRARY_PATH which are set in my .profile to be
the following:

export

PYTHONPATH=/opt/local/lib/python2.6/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:$PYTHONPATH

export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

I am at a loss at this point, and I would be grateful for any help.

Regards,

Scott


Discuss-gnuradio mailing list

[email protected]