> Hi Michael - I'm glad you're having success with at least the MacPorts part of things; > and, thanks! I'm glad to be back on top of UHD and GNU Radio within MacPorts again. > Alexandru Csete already replied about what he has done with regard to your questions > about gr-osmosdr and rtl-sdr; so, I won't replicate those. Let me instead discuss the > non-MacPorts parts a bit here; this is generic advice regarding developing on the UNIX-y > side of Mac OS X. Yes, his advise helped. I got the gr-osmosdr blocks showing up in gnu radio-companion sources group now. I am still having one final problem, will note it below where you discuss something that is probably related. > > * I highly recommend you NOT install non-MacPorts files into your MacPorts > prefix (by default, /opt/local). Just good programming practice, and there are > environment variables available for handling this situation. So in the case of rtl-sdr and gr-osmosdr is it suggested to still use the MacPorts rtl-sdr but as you say above install non-MacPorts gr-osmosdr in /usr/local? Or would it be better to be consistent and not install rtl-sdr from MacPorts and install them both the non-MacPorts way? > > export PYTHONPATH=/usr/local/lib/python2.7/site-packages:${PYTHONPATH} Getting the PYTHONPATH correct seems to be what got the blocks showing up in gnuradio-companion, along with the suggestion that Alex also had. > > * Mac OS X does not use "ldconfig" or the like. You just use what's installed > by setting PATH and maybe other environment variables, and they refer to what > each executable and/or library needs internally, which allows the dynamic > library loader to do its thing. Yes I figured out that that was not supported. I did wonder though if that last step when I install gnuradio via MacPorts at the very end where is scans and resolves something might be an issue. Is there a way to just rerun that? Would it help? Sorry I am being abstract on this question, it takes a long time to build on my machine so I have not reran it to specifically note what it was scanning. > > * I highly recommend NOT using the DYLD_* environment variables as a standard > part of your shell environment. These work well for testing after a project > has been built but before it is installed. But, setting one of them will > invariably end up messing up some executable sooner or later; and, you won't > have any idea why (or, that's my experience). Yes I figured this out the hard way. Some people on the net suggested doing this but on my system it generally messed up something else until I got rid of it again. Other people had the advise you gave above and said DONT DO IT. I have one remaining issue, when I build the flow graph and then attempt to execute it I get the following error that feels would would have been an ldconfig, DYLD*, or maybe even the scan thing I noted above. See problem loading the dylib below: Generating: "/Users/mlk/bin/top_block.py" Executing: "/Users/mlk/bin/top_block.py" Traceback (most recent call last): File "/Users/mlk/bin/top_block.py", line 16, in <module> import osmosdr File "/opt/local/lib/python2.7/site-packages/osmosdr/__init__.py", line 45, in <module> from osmosdr_swig import * File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 26, in <module> _osmosdr_swig = swig_import_helper() File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 22, in swig_import_helper _mod = imp.load_module('_osmosdr_swig', fp, pathname, description) 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? Also note: PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/MacGPG2/bin:/opt/local/bin:/usr/local/git/bin:/usr/X11/bin PYTHONPATH=/Users/mlk/bin:/opt/local/lib/python2.7/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.7: > > I hope this helps! - MLD Thanks, mlk
on 2013-01-14 23:59
on 2013-01-16 03:57
Hi Michael - On Jan 14, 2013, at 5:58 PM, Michael L Kornegay <mlk@mlksys.atlanta.ga.us> wrote: > So in the case of rtl-sdr and gr-osmosdr is it suggested to still use the MacPorts > rtl-sdr but as you say above install non-MacPorts gr-osmosdr in /usr/local? > > Or would it be better to be consistent and not install rtl-sdr from MacPorts and > install them both the non-MacPorts way? I find that I can mix MacPorts and local installs just fine. So, rtl-sdr using MacPorts and then gr-osmosdr into /usr/local should work fine with the proper environment variables settings. > I did wonder though if that last step when I install gnuradio via MacPorts at the very > end where is scans and resolves something might be an issue. Is there a way to just > rerun that? Would it help? Sorry I am being abstract on this question, it takes a long > time to build on my machine so I have not reran it to specifically note what it was > scanning. That phase is called the "rev-upgrade" part. "port" checks the newly installed libraries and those ports that explicitly depend on the just installed ports to make sure all references are valid (use "otool -L LIBNAME" to see what I mean). When port finds broken references, it tries to reinstall the owning port. This has nothing to do with "ldconfig", but it does find and fix many errors that come up when handling installing projects. > I have one remaining issue, when I build the flow graph and then attempt to execute > it I get the following error that feels would would have been an ldconfig, DYLD*, or > maybe even the scan thing I noted above. See problem loading the dylib below: > > 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? I'm wondering where "libgnuradio-osmosdr.0.dylib" is located. Usually this would be installed into ${prefix}/lib (so, /opt/local/lib in your case). > PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/MacGPG2/bin:/opt/local/bin:/usr/local/git/bin:/usr/X11/bin > PYTHONPATH=/Users/mlk/bin:/opt/local/lib/python2.7/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.7: Your environment looks OK to me. - MLD
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.