discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GNU Radio release 3.6.3 available for download


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] GNU Radio release 3.6.3 available for download
Date: Fri, 18 Jan 2013 11:28:14 -0500

> ImportError: 
> dlopen(/opt/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so, 2): 
> Library not loaded: libgnuradio-osmosdr.0.dylib
> Referenced from: 
> /opt/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
> Reason: image not found
> 
> Seems like I am missing one final detail that glues the proper loading of the 
> dynamic libraries?  

To follow up:  I installed rtl-sdr using MacPorts, cloned gr-osmosdr and did 
the usual build.  After installing (into ${PREFIX}=/usr/local, of course, to 
keep it in its own install space away from MacPorts), I checked "otool -L 
${PREFIX}/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so" and the 
reference to "libgnuradio-osmosdr" is not correct; it reads 
"libgnuradio-osmosdr.0.dylib" and should read 
"${PREFIX}/lib/libgnuradio-osmosdr.0.dylib".  So, I checked "otool -L 
${PREFIX}/lib/libgnuradio-osmosdr.0.dylib", and it's self-id [1] is not 
correct; it reads "libgnuradio-osmosdr.0.dylib" and should be 
"${PREFIX}/lib/libgnuradio-osmosdr.0.dylib".

Now, when I check the version of this library from the top build directory of 
osmosdr (call this ${OSMOSDR_BUILD_DIR}, "otool -L 
lib/libgnuradio-osmosdr.dylib", I get back the self-id of 
"${OSMOSDR_BUILD_DIR}/lib/libgnuradio-osmosdr.0.dylib" -- which is correct.  
So, CMake when it is installing this library is not getting its self-id 
correct, which in turn is messing up this library's reference in the SWIG 
library.

I looked at "gr-osmosdr/lib/CMakeLists.txt", and nothing sticks out to me as 
being really wrong.  Maybe someone else with more time than me can figure this 
one out? - MLD

ps> To rectify this issue, post install, you can always do the following [with 
${PREFIX} substituted correctly; you might need to "sudo" these, depending on 
how you installed them in the first place]:

{{{
install_name_tool -change libgnuradio-osmosdr.0.dylib 
${PREFIX}/lib/libgnuradio-osmosdr.0.dylib 
${PREFIX}/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
install_name_tool -id ${PREFIX}/lib/libgnuradio-osmosdr.0.dylib 
${PREFIX}/lib/libgnuradio-osmosdr.0.dylib
}}}

[1] In Mac OS X, a library's "self-id" is how it refers to itself, generally 
including the full path; it can be set via "/usr/bin/install_name_tool -id 
<NEW_ID> <FILE>".  So, for example, gnuradio-core's self-id for a given 
${PREFIX} will be something like "${PREFIX}/lib/libgnuradio-core.dylib".  The 
self-id is used only when the library is being used for linking purposes; it is 
otherwise ignored by the DYLD subsystem.




reply via email to

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