Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python library shenanigans while installing gr-osmosdr #46

Open
gyaresu opened this issue Aug 23, 2015 · 3 comments
Open

Python library shenanigans while installing gr-osmosdr #46

gyaresu opened this issue Aug 23, 2015 · 3 comments

Comments

@gyaresu
Copy link

gyaresu commented Aug 23, 2015

note: I got this working a minute ago by untapping untapping metacollin/hombrew-gnuradio after install gnuradio and then tapping andresv/homebrew-gnuradio to install just gr-osmosdr

I know that's not optimal but I need to get some wins under my belt before coming back to shave some more yaks.

Follow-up to follow

Gnuradio will build and run after installation but if I try compiling and installing gr-osmosdr it dies with:

$ gnuradio-companion
2015-08-23 14:57:36.933 Python[8379:3920782] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Fatal Python error: PyThreadState_Get: no current thread
[1]    8379 abort      gnuradio-companion

What am I missing?


### Is it a Library problem?

Is this (from the following code) the problem?:
dyld: loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python

gyaresu on shazbot.local in ~
$ DYLD_PRINT_LIBRARIES=1 gnuradio-companion 2>&1 | grep -i python | grep -v Cellar
dyld: loaded: /usr/local/lib/python2.7/site-packages/glib/_glib.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gobject/_gobject.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/cairo/_cairo.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/gio/_gio.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/gio/unix.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/pango.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/atk.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gtk-2.0/pangocairo.so
2015-08-23 14:54:56.999 Python[8307:3918761] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/gr/_runtime_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/pmt/_pmt_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/core/umath.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/core/_dotblas.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/core/scalarmath.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/lib/_compiled_base.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/numpy/random/mtrand.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/lxml/etree.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/Cheetah/_namemapper.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/analog/_analog_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig0.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig1.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig2.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig3.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig4.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/blocks/_blocks_swig5.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/filter/_filter_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/fft/_fft_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/audio/_audio_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/channels/_channels_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/digital/_digital_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/dtv/_dtv_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/fcd/_fcd_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/fec/_fec_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/gnuradio/noaa/_noaa_swig.so
dyld: loaded: /usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
dyld: loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
Fatal Python error: PyThreadState_Get: no current thread
[1]    8307 abort      DYLD_PRINT_LIBRARIES=1 gnuradio-companion 2>&1 |
       8308 done       grep --color=auto --exclude-dir={.bzr,.cvs,.git,.hg,.svn} -i python |
       8309 done       grep --color=auto --exclude-dir={.bzr,.cvs,.git,.hg,.svn} -v Cellar

python

Homebrew python
$ which python
/usr/local/bin/python
python packages
$ pip -V
pip 7.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)
pip install Cheetah lxml matplotlib numpy scipy docutils sphinx
Checked that libs aren't built against OS X python

https://gist.github.com/gyaresu/cb34de99bd8bb62a3f56

#!/bin/bash

echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python"
for f in `find /usr/local/lib`; do
  otool -L "$f" 2> /dev/null| grep Python | grep System &> /dev/null
  status=$?
  if [ $status -eq 0 ]; then
    echo "$status: $f"
  fi
done

gnuradio deps are installed

gyaresu on shazbot.local in ~/programming/gr-osmosdr/build(38d3h36m|master*)
$ brew info gnuradio
metacollin/gnuradio/gnuradio: stable 3.7.7.1, HEAD
http://gnuradio.org
/usr/local/Cellar/gnuradio/3.7.7.1 (2761 files, 126M) *
  Built from source
From: https://github.com/metacollin/homebrew-gnuradio/blob/master/gnuradio.rb
==> Dependencies
Build: swig ✔, cmake ✔
Required: boost ✔, cppunit ✔, gsl ✔, fftw ✔, sip ✔, pygobject ✔, pygtk ✔, sdl ✔, libusb ✔, orc ✔, pyqt ✔, pyqwt ✔, sphinx ✔, wxpython ✔, wxmac ✔, freetype ✔
==> Options
--without-docs
        Build gnuradio documentation
--without-qt
        Build with QT widgets in addition to wxWidgets
--HEAD
        Install HEAD version

Compile

http://sdr.osmocom.org/trac/wiki/GrOsmoSDR
mkdir build > cmake .. > make > sudo make install

Install

gyaresu on shazbot.local in ~/programming/gr-osmosdr/build(38d3h35m|master*)
$ sudo make install
[ 41%] Built target gnuradio-osmosdr
[ 41%] Built target osmosdr_swig_swig_doc
[ 47%] Built target _osmosdr_swig_swig_tag
[ 55%] Built target osmosdr_swig_swig_2d0df
[ 61%] Built target _osmosdr_swig
[ 67%] Built target pygen_swig_a7a97
[ 73%] Built target pygen_python_24c52
[ 82%] Built target osmosdr_grc_xml_blocks
[ 94%] Built target pygen_apps_1c171
[100%] Built target pygen_apps_d931f
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/pkgconfig/gnuradio-osmosdr.pc
-- Installing: /usr/local/include/osmosdr/api.h
-- Installing: /usr/local/include/osmosdr/pimpl.h
-- Installing: /usr/local/include/osmosdr/ranges.h
-- Installing: /usr/local/include/osmosdr/time_spec.h
-- Installing: /usr/local/include/osmosdr/device.h
-- Installing: /usr/local/include/osmosdr/source.h
-- Installing: /usr/local/include/osmosdr/sink.h
-- Installing: /usr/local/lib/libgnuradio-osmosdr.0.1.5git.dylib
-- Installing: /usr/local/lib/libgnuradio-osmosdr.dylib
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.pyc
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmosdr_swig.pyo
-- Installing: /usr/local/include/osmosdr/swig/osmosdr_swig.i
-- Installing: /usr/local/include/osmosdr/swig/osmosdr_swig_doc.i
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/__init__.py
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/__init__.pyc
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/__init__.pyo
-- Installing: /usr/local/share/gnuradio/grc/blocks/rtlsdr_source.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/osmosdr_source.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/osmosdr_sink.xml
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmocom_siggen_base.py
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmocom_siggen_base.pyc
-- Installing: /usr/local/lib/python2.7/site-packages/osmosdr/osmocom_siggen_base.pyo
-- Installing: /usr/local/bin/osmocom_fft
-- Installing: /usr/local/bin/osmocom_siggen
-- Installing: /usr/local/bin/osmocom_siggen_nogui
-- Installing: /usr/local/bin/osmocom_spectrum_sense```
@chleggett
Copy link
Contributor

I definitely didn't follow everything that you did here, but at the top, you said that you tapped andresv/homebrew-gnuradio for just the gr-osmodo formula.

Try using (and testing) my formula instead: chleggett/homebrew-gr-osmosdr

@metacollin and I are trying to make discreet packages of each component to be able to quickly fold into homebrew when everything's stable.

@gyaresu
Copy link
Author

gyaresu commented Aug 24, 2015

Thanks @chleggett I'm up and running now but I'll uninstall and give that a try later tonight on the fresh OS X install to test.

I really appreciate the work making gnuradio modular and available via Homebrew. Happy to help and available in IRC (#hackrf & #gnuradio). Same username.

@gyaresu
Copy link
Author

gyaresu commented Aug 25, 2015

@chleggett Testing complete.

Tapping metacollin/gnuradio & chleggett/homebrew-gr-osmosdr didn't work. It still exploded.

Tapping metacollin/gnuradio and installing gnuradio followed by untapping it and then tapping andresv/gnuradio to install gr-osmosdr is the only way I can get it to work (from my regular and fresh OS X systems)

So weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants