Thanks John, Following your suggestion I was able to see that the XML was indeed being installed to /usr/local/ by default. I just needed to change the install prefix with a cmake option (below) and re-install. (I also did a `sudo make uninstall` first).
$ sudo make uninstall $ cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/local ../ $ sudo make install Then restarted gnuradio-companion, and there was my block! On Sat, Jun 2, 2018 at 9:32 AM, John Medrano <john.d.medr...@gmail.com> wrote: > You need to check directory " /opt/local/share/gnuradio/grc/blocks" to > see if your xml file is present. > > If it is not, then look at output from "sudo make install" to see if file > is being installed or updated. > > From what it looks like, given that it works in on previous and other > platforms. I suspect file is not being installed. If that is the case, then > you need to look at output from cmake to see if it give any clues as to > why. > > On Sat, Jun 2, 2018 at 12:17 AM, Chris Kuethe <chris.kue...@gmail.com> > wrote: > >> I think you may be missing the .xml file. >> >> Clearly you've got the python that implements the actual signal >> processing, eg. https://github.com/ckuethe/gr-nmea/blob/master/python/ >> nmea_gpsd.py >> Now you need to show gnuradio-companion how to use it, eg. >> https://github.com/ckuethe/gr-nmea/blob/master/grc/gps_nmea_gpsd.xml >> >> On Sun, May 27, 2018 at 6:16 AM Brad Hein <linuxb...@gmail.com> wrote: >> >>> >>> For some reason my custom block won't show up in gnuradio on my mac (but >>> works fine on my Linux servers). I've tried various things over the past >>> few weeks. Not making much progress so posting here to get some >>> suggestions. >>> >>> OS: OSX/Mac High Sierra. >>> gnuradio is installed with Macports, Version 3.7.11. >>> >>> $ which gnuradio-companion >>> /opt/local/bin/gnuradio-companion >>> >>> $ port installed|grep -i gnuradio >>> gnuradio @3.7.11_7+docs+grc+jack+log4cpp+logging+portaudio+qtgui+sdl+ >>> swig+uhd+wavelet+zeromq >>> gnuradio >>> @3.7.11_7+docs+grc+jack+log4cpp+logging+portaudio+qtgui+sdl+swig+uhd+wavelet+wxgui+zeromq >>> (active) >>> >>> My custom block installs elsewhere and even on my previous mac, but not >>> on this new one. Something must be different. >>> >>> $ mkdir build-mac >>> $ cmake ../ >>> $ make >>> [ 8%] Built target gnuradio-powerquality >>> [ 21%] Built target test-powerquality >>> [ 30%] Built target _powerquality_swig_doc_tag >>> [ 39%] Built target powerquality_swig_swig_doc >>> [ 47%] Built target _powerquality_swig_swig_tag >>> [ 69%] Built target powerquality_swig_swig_2d0df >>> [ 78%] Built target pygen_swig_8ae51 >>> [ 86%] Built target _powerquality_swig >>> [ 95%] Built target pygen_python_5cd9b >>> [ 95%] Built target pygen_apps_9a6dd >>> [100%] Built target doxygen_target >>> >>> $ sudo make install >>> [ 8%] Built target gnuradio-powerquality >>> [ 21%] Built target test-powerquality >>> [ 30%] Built target _powerquality_swig_doc_tag >>> [ 39%] Built target powerquality_swig_swig_doc >>> [ 47%] Built target _powerquality_swig_swig_tag >>> [ 69%] Built target powerquality_swig_swig_2d0df >>> [ 78%] Built target pygen_swig_8ae51 >>> [ 86%] Built target _powerquality_swig >>> [ 95%] Built target pygen_python_5cd9b >>> [ 95%] Built target pygen_apps_9a6dd >>> [100%] Built target doxygen_target >>> Install the project... >>> -- Install configuration: "Release" >>> -- Up-to-date: /usr/local/lib/cmake/powerqual >>> ity/powerqualityConfig.cmake >>> -- Up-to-date: /usr/local/include/powerquality/api.h >>> -- Up-to-date: /usr/local/include/powerquality/getfreqcpp.h >>> -- Up-to-date: /usr/local/lib/libgnuradio-powerquality.1.0.0git.dylib >>> -- Up-to-date: /usr/local/lib/libgnuradio-powerquality.dylib >>> -- Up-to-date: /usr/local/lib/python2.7/site- >>> packages/powerquality/_powerquality_swig.so >>> -- Up-to-date: /usr/local/lib/python2.7/site- >>> packages/powerquality/powerquality_swig.py >>> -- Up-to-date: /usr/local/lib/python2.7/site- >>> packages/powerquality/powerquality_swig.pyc >>> -- Up-to-date: /usr/local/lib/python2.7/site- >>> packages/powerquality/powerquality_swig.pyo >>> ...snip... >>> >>> (Start up gnuradio-companion) >>> >>> <<< Welcome to GNU Radio Companion 3.7.11 >>> >>> Block paths: >>> /usr/local/lib/python2.7/site-packages >>> /opt/local/share/gnuradio/grc/blocks >>> >>> >>> gnuradio-companion even lists the precise location where my custom block >>> was installed, as one of the block paths. >>> >>> $ ls -ltrh /usr/local/lib/python2.7/site-packages/powerquality/ >>> total 600 >>> -rw-r--r-- 1 root admin 1.1K Aug 21 2017 __init__.py >>> -rw-r--r-- 1 root admin 18K Apr 10 12:37 powerquality_swig.py >>> -rw-r--r-- 1 root admin 27K Apr 10 12:37 powerquality_swig.pyo >>> -rw-r--r-- 1 root admin 27K Apr 10 12:37 powerquality_swig.pyc >>> -rwxr-xr-x 1 root admin 210K Apr 10 12:37 _powerquality_swig.so >>> -rw-r--r-- 1 root admin 369B Apr 10 12:37 __init__.pyo >>> -rw-r--r-- 1 root admin 369B Apr 10 12:37 __init__.pyc >>> >>> >>> But the block (block name getfreqcpp) is not showing up in the list... >>> >>> At the commandline I can import the block in Python. >>> >>> $ python >>> Python 2.7.10 (default, Oct 6 2017, 22:29:07) >>> [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import powerquality >>> >>> from powerquality import getfreqcpp >>> >>> getfreqcpp >>> <function make at 0x103317b18> >>> >>> >>> >>> >>> _______________________________________________ >>> Discuss-gnuradio mailing list >>> Discuss-gnuradio@gnu.org >>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >>> >> >> >> -- >> GDB has a 'break' feature; why doesn't it have 'fix' too? >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> Discuss-gnuradio@gnu.org >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> >> >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio