Opened 9 years ago

Closed 9 years ago

#49919 closed defect (worksforme)

gr-osmosdr is still broken after rebuilding it more than 3 times.

Reported by: ton@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: njm7176@…
Port: gr-osmosdr

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I am trying to install gr-osmosdr using MacPorts but i run into broken file errors. I have removed all the leaves and unused from my system to have it as clean as possible. I have forced to clean any old gr-osmosdr as well. But still when i "sudo port install gr-osmocom" i run into broken file errors.

Any ideas? This is OSX 10.10.5, MacPorts 2.3.4 ports tree updated today.

Here is the console log so far:

TM-MBP:~ Ton$ sudo port install gr-osmosdr
--->  Computing dependencies for gr-osmosdr
--->  Dependencies to be installed: airspy libusb bladeRF tecla cmake curl libarchive doxygen gnuradio boost cppunit graphviz gd2 xpm xorg-libXt xorg-libsm xorg-libice gts libnetpbm libLASi urw-fonts xorg-libXaw xorg-libXmu gsl jack libsamplerate libsndfile flac libogg libvorbis libsdl log4cpp pkgconfig py27-cheetah py27-lxml py27-numpy libgcc cctools llvm-3.7 llvm_select isl ld64 ld64-latest libmpc mpfr py27-cython cython_select py27-nose nosetests_select py27-opengl py27-Pillow lcms2 openjpeg jbigkit py27-tkinter tk tcl xorg-libXScrnSaver xorg-scrnsaverproto py27-opengl-accelerate py27-pygtk libglade2 py27-cairo py27-gobject py27-pyqt4 dbus-python27 dbus-glib py27-sip py27-pyqwt qwt52 py27-scipy swig-python swig py27-sphinx py27-alabaster py27-babel py27-tz py27-docutils py27-roman py27-jinja2 py27-pygments py27-six py27-snowballstemmer py27-sphinx_rtd_theme sphinx_select py27-wxpython-3.0 wxPython-3.0 qwtplot3d uhd gzip py27-requests volk orc xmlto coreutils docbook-xml docbook-xml-4.1.2 docbook-xml-4.2 xmlcatmgr docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 docbook-xml-5.0 docbook-xsl findutils fop getopt libpaper gr-fcdproplus hackrf rtl-sdr
--->  Fetching archive for libusb
--->  Attempting to fetch libusb-1.0.20_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/libusb
--->  Attempting to fetch libusb-1.0.20_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libusb
--->  Installing libusb @1.0.20_0
--->  Activating libusb @1.0.20_0
--->  Cleaning libusb

<building lots of stuff>

--->  Fetching archive for gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/gr-osmosdr
--->  Fetching distfiles for gr-osmosdr
--->  Verifying checksums for gr-osmosdr
--->  Extracting gr-osmosdr
--->  Configuring gr-osmosdr
--->  Building gr-osmosdr
--->  Staging gr-osmosdr into destroot
--->  Installing gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Activating gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  Found 2 broken file(s), matching files to ports    
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     gr-osmosdr @20150716 +airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Computing dependencies for gr-osmosdr
--->  Cleaning gr-osmosdr
--->  Scanning binaries for linking errors
--->  Found 2 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     gr-osmosdr @20150716 +airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Computing dependencies for gr-osmosdr
--->  Fetching distfiles for gr-osmosdr
--->  Verifying checksums for gr-osmosdr
--->  Extracting gr-osmosdr
--->  Configuring gr-osmosdr
--->  Building gr-osmosdr
--->  Staging gr-osmosdr into destroot
--->  Deactivating gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Uninstalling gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Computing dependencies for gr-osmosdr
--->  Installing gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Activating gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  Found 2 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     gr-osmosdr @20150716 +airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Computing dependencies for gr-osmosdr
--->  Fetching distfiles for gr-osmosdr
--->  Verifying checksums for gr-osmosdr
--->  Extracting gr-osmosdr
--->  Configuring gr-osmosdr
--->  Building gr-osmosdr
--->  Staging gr-osmosdr into destroot
--->  Deactivating gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Uninstalling gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Computing dependencies for gr-osmosdr
--->  Installing gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Activating gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  Found 2 broken file(s), matching files to ports
Error: Port gr-osmosdr is still broken after rebuilding it more than 3 times.
Error: Please run port -d -y rev-upgrade and use the output to report a bug.
Port gr-osmosdr still broken after rebuilding 3 time(s)
    while executing
"error "Port $portname still broken after rebuilding [expr {$broken_port_counts($portname) - 1}] time(s)""
    (procedure "revupgrade_scanandrebuild" line 280)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5268)
TM-MBP:~ Ton$ 

Change History (16)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michaelld@… removed
Description: modified (diff)
Owner: changed from macports-tickets@… to michaelld@…
Summary: Issue building gr-osmosdrgr-osmosdr is still broken after rebuilding it more than 3 times.

You should probably do what it says:

Error: Port gr-osmosdr is still broken after rebuilding it more than 3 times.
Error: Please run port -d -y rev-upgrade and use the output to report a bug.

using, of course, "sudo" as usual if you're not already root.

comment:2 Changed 9 years ago by ton@…

Done that. Didn't help. OTherwise i would not have opened the ticket.

DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: No need to upgrade! airspy 20151203_0 >= airspy 20151203_0
Skipping deactivate gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd (dry run)
Skipping activate gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd (dry run)
DEBUG: Rebuilding port gr-osmosdr finished with status 0
TM-MBP:~ Ton$ sudo port -y rev-upgrade
--->  Scanning binaries for linking errors
--->  Found 2 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     gr-osmosdr @20150716 +airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
Skipping deactivate gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd (dry run)
Skipping activate gr-osmosdr @20150716_3+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd (dry run)
Warning: If this was no dry run, rev-upgrade would now run the checks again to find unresolved and newly created problems
Last edited 9 years ago by ton@… (previous) (diff)

comment:3 in reply to:  2 Changed 9 years ago by njm7176@…

Had the same errors today. Root cause seems to be gr-osmosdr looking for libSoapySDR, which is not currently available via macports (?).

--->  Scanning binaries for linking errors
Could not open libSoapySDR.0.4-2.dylib: Error opening or reading file (referenced from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so)
DEBUG: Marking /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so as broken
DEBUG: Marking /opt/local/lib/libgnuradio-osmosdr.0.1.5git.dylib as broken

Still seems to work despite the linking error, but adding a:

-DENABLE_SOAPY=OFF

in the gr-osmosdr Portfile let it build clean.

comment:4 Changed 9 years ago by njm7176@…

Cc: njm7176@… added
Last edited 9 years ago by njm7176@… (previous) (diff)

comment:5 Changed 9 years ago by ton@…

Funny because i do have the Soapy libraries installed. Not through MacPorts because, as you already mentioned, they are not available on MacPorts. I updated the portfile with the -DENABLE_SOAPY=OFF option and all is building fine now. What needs to be done to get this into the port tree until SoapySDR is available as a MacPort?

Last edited 9 years ago by ton@… (previous) (diff)

comment:6 Changed 9 years ago by ton@…

Almost there. Now, when i run anything gnuradio related i get an error that python cannot import the osmosdr library.

TM-MBP:gr-osmosdr Ton$ osmocom_fft
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/usr/local/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 28, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 24, in swig_import_helper
    _mod = imp.load_module('_osmosdr_swig', fp, pathname, description)
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so, 2): Library not loaded: /opt/local/lib/libgnuradio-runtime.3.7.8.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
  Reason: image not found

comment:7 in reply to:  6 Changed 9 years ago by michaelld (Michael Dickens)

Replying to ton@…:

Almost there. Now, when i run anything gnuradio related i get an error that python cannot import the osmosdr library.

TM-MBP:gr-osmosdr Ton$ osmocom_fft
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/usr/local/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 28, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 24, in swig_import_helper
    _mod = imp.load_module('_osmosdr_swig', fp, pathname, description)
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so, 2): Library not loaded: /opt/local/lib/libgnuradio-runtime.3.7.8.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
  Reason: image not found

The above means that GR was updated by OSMO was not. Best way to deal with this is to:

sudo port uninstall gr-osmosdr
sudo port selfupdate
sudo port upgrade outdated
sudo port install gr-osmosdr

You might have to force uninstall ('-f') gr-osmosdr.

I'll add in the SOAPYSDR cmake flag when I get a chance. I didn't know there was a new interface to enable / disable. cmake will find an try to use libraries / frameworks outside of MacPorts, e.g., in /Library/Frameworks, /usr/local, and other "common" UNIX or OSX locations.

comment:8 Changed 9 years ago by michaelld (Michael Dickens)

Should be fixed in r143198. Please do the selfupdate & upgrade above and see if those work.

comment:9 Changed 9 years ago by ton@…

gr-osmosdr builds fine now, however when launching anything that uses osmosdr i still get the same message as above.

comment:10 Changed 9 years ago by njm7176@…

Replying to ton@…:

gr-osmosdr builds fine now, however when launching anything that uses osmosdr i still get the same message as above.

You may also have a python issue, not one with with osmocom or gnuradio.

In the above error, osmocom_fft (macports) is trying to use osmosdr modules in /usr/local (system/homebrew) directory. All the stuff macports just built for you reside somewhere in /opt/local

Check:

echo $PYTHONPATH

You should see the following macports python directories:

/opt/local/lib/python2.7/site-packages
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

If not, try the following, and add it to your .profile if it seems to do the trick:

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

Results may vary, but apart from issues with gr-osmosdr and doxygen (49881), I did a full reinstall of gnuradio via macports this weekend and everything appears behaving normally so far...

comment:11 Changed 9 years ago by ton@…

TM-MBP:lib Ton$ echo $PYTHONPATH
/opt/local/lib/python2.7/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.7:

So this was wrong. I changed it to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages and still have the same issues.

TM-MBP:~ Ton$ echo $PYTHONPATH
/opt/local/lib/python2.7/site-packages:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
TM-MBP:~ Ton$ osmocom_fft 
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/opt/local/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 28, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 24, 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: /opt/local/lib/libgnuradio-runtime.3.7.8.dylib
  Referenced from: /opt/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
  Reason: image not found

So there is the error!! The library i have is 3.7.8.1, not 3.7.8. osmocom_fft is looking for 3.7.8. How to fix this?

TM-MBP:lib Ton$ ls -al libgnuradio-runtime*
-rwxr-xr-x  1 root  admin  861872 Dec  6 11:26 libgnuradio-runtime.3.7.8.1.dylib
lrwxr-xr-x  1 root  admin      33 Dec  8 12:01 libgnuradio-runtime.dylib -> libgnuradio-runtime.3.7.8.1.dylib

comment:12 Changed 9 years ago by michaelld (Michael Dickens)

Try this:

sudo port -f uninstall $(port installed gr-osmosdr | sed -e 1d -e "s@(active)@@")
sudo port selfupdate
sudo port install gr-osmosdr

and, see if that works.

comment:13 Changed 9 years ago by ton@…

Same result:

TM-MBP:lib Ton$ sudo port -f uninstall $(port installed gr-osmosdr | sed -e 1d -e "s@(active)@@")
Password:
--->  Deactivating gr-osmosdr @20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Uninstalling gr-osmosdr @20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
TM-MBP:lib Ton$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.3.4 installed,
MacPorts base version 2.3.4 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
TM-MBP:lib Ton$ sudo port install gr-osmosdr
--->  Computing dependencies for gr-osmosdr
--->  Fetching archive for gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/gr-osmosdr
--->  Fetching distfiles for gr-osmosdr
--->  Verifying checksums for gr-osmosdr
--->  Extracting gr-osmosdr
--->  Configuring gr-osmosdr
--->  Building gr-osmosdr
--->  Staging gr-osmosdr into destroot
--->  Installing gr-osmosdr @20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Activating gr-osmosdr @20150716_4+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+swig+uhd
--->  Cleaning gr-osmosdr
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
TM-MBP:lib Ton$ osmocom_fft
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/opt/local/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 28, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/opt/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 24, 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: /opt/local/lib/libgnuradio-runtime.3.7.8.dylib
  Referenced from: /opt/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
  Reason: image not found

The issue is that i have libgnuradio-runtime.3.7.8.1.dylib where osmocom_fft looks for 3.7.8

comment:14 in reply to:  13 Changed 9 years ago by njm7176@…

Replying to ton@…:

The issue is that i have libgnuradio-runtime.3.7.8.1.dylib where osmocom_fft looks for 3.7.8

With Portfile r143198 everything seems to building and behaving correctly for me. My gnuradio scrips and omsocom_fft are having no issues with libgnuradio-runtime.3.7.8.1.

My only last suggestion is to check out what's going on in: /opt/local/lib/python2.7/site-packages . Macports should not have installed osmosdr libraries there, and wherever it came from, python is finding them first instead of the up-to-date libraries macports maintains. Have you previously tried manually compiling gr-osmosdr or using homebrew? Multiple, conflicting installs of gr-osmosdr is a likely culprit for your above error.

Try using michaelld's above port -f uninstall command to remove gr-osmosdr again. After that completes, check the following paths for leftover osmosdr directories and remove them if they exist.

/opt/local/lib/python2.7/site-packages
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

Then do a port selfupdate and port install gr-osmosdr again and verify that there is only one osmosdr directory and it resides in /opt/local/Library/Frameworks/Python.framework/Versions .

comment:15 Changed 9 years ago by ton@…

Turned out i indeed had a second osmosdr library in /usr/local/lib. I removed it and all is working.

comment:16 Changed 9 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: newclosed

Thanks for reporting back. Closing as "works for me".

Note: See TracTickets for help on using tickets.