Coder Social home page Coder Social logo

Comments (29)

fventuri avatar fventuri commented on June 16, 2024

@johncneal - that error message seems to indicate that the boost libraries are not installed (or perhaps not installed where cmake expects them) on your MacBook Pro.

I would try to use the same package manager you used to install GNU Radio to also install (or reinstall) the boost (or libboost) package to see if it helps (see also this section in the GNU Radio documentation: https://wiki.gnuradio.org/index.php/MacInstall#Background_Dependencies).

Franco

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@fventuri
Thanks for the above - installing the boost package using MacPorts allowed the 'make ..' step to succeed.
However, the next step ('sudo make') threw the following error -

(base) Johns-MacBook-Pro-2:build johnneal$ sudo make
Password:
[ 6%] Building CXX object lib/CMakeFiles/gnuradio-radio_astro.dir/dedispersion_impl.cc.o
[ 12%] Building CXX object lib/CMakeFiles/gnuradio-radio_astro.dir/detect_impl.cc.o
[ 18%] Building CXX object lib/CMakeFiles/gnuradio-radio_astro.dir/vmedian_impl.cc.o
[ 25%] Linking CXX shared library libgnuradio-radio_astro.dylib
Undefined symbols for architecture x86_64:
"gr::radio_astro::detect_impl::update_buffer()", referenced from:
gr::radio_astro::detect_impl::event(std::__1::complex const
, std::__1::complex
) in detect_impl.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libgnuradio-radio_astro.v1.0-compat-xxx-xunknown.dylib] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-radio_astro.dir/all] Error 2
make: *** [all] Error 2
**

john

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

Hi Pranav - thanks for getting back.
I'm not a frequent user of GIT so forgive the newbie question:
I don't believe I have a local git repository and 'git pull' appears (according to GIT) to simply merge changes to an existing repository. SO does it matter which folder I'm in on the Mac to do that 'git pull' ?? Should I do it from the folder containing the code I previously unzipped?? or will it create a folder for the source and download ALL required code prior to running the build?
Forgive my lack of GIT familiarity
john

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

That doesn't seem to work - in Terminal I navigate to the gr-radio_astro folder where I unzipped the previous v2020.08-gr38 tagged version. But when I use 'git pull' it says fatal: not a git repository

(base) Johns-MacBook-Pro-2:gr-radio_astro johnneal$ git pull
fatal: not a git repository (or any of the parent directories): .git

from gr-radio_astro.

fventuri avatar fventuri commented on June 16, 2024

@johncneal - at this point I would try a clean build directly from the source code in the repo (it won't take very long).

These are the commands to do that (see here: https://github.com/WVURAIL/gr-radio_astro#installing-from-source):

mv gr-radio_astro gr-radio_astro.old
git clone https://github.com/WVURAIL/gr-radio_astro.git
cd gr-radio_astro
mkdir build
cd build
cmake ..
make
sudo make install  (only if the previous command is successful)

This way you should have all the latest fixes and enhancements.

Franco

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

Hi @fventuri and @PranavSanghavi
Thanks to both for ongoing help with this - much appreciated. But while, the complete rebuild on the Mac seemed to run ok in terms of build and install . . .
when I go into GR there is no 'radio_astro' category in the block list in the right hand panel of GR (which for comparison does appear in the nice gr-radio-astro Raspberry Pi image I installed). On the Mac, if I open one of the .GRC files (eg NsfIntegrate24.grc) from the gr-radio_astro/examples/nsf folder, it loads but GR shows several 'missing blocks' (see the screenshot below) - these include ra_ascii_sink, median, ra_integrate.

I assume this means either something hasn't worked correctly (I have the build output if that helps, though no errors were reported during the build) OR there are further setup steps to be completed ??

image

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@PranavSanghavi
GNU Radio Companion claims to be version 3.8.4.0 (Python 3.7.12)

On the Mac I appear to be on Python 3.7 - and there is NO directory usr/local/lib/python3.8/dist-packages

Instead there is a directory /usr/local/lib/python3.7/site-packages/radio_astro BUT I note this is site-packages rather than dist-packages. SO does this matter - should I adapt your above comments / instructions to reflect these 3.7 directories???

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

Not sure if I'd restarted the Terminal session or not but since then I've rebooted the Mac and nothing has changed. gr-radio_astro components still not showing in the GR block selection panel and missing blocks showing when I open one of the NFS .GRC files. :-(

from gr-radio_astro.

fventuri avatar fventuri commented on June 16, 2024

@johncneal - the blocks for the GRC block selection should all be in a directory called something like /usr/local/share/gnuradio/grc/blocks; if you don't find that directory, please run this command to search for it:

find /usr -name blocks

Once you find that blocks directory, look at its contents; you should see files called radio_astro_ra_vmedian.block.yml and similar; the command ls | grep radio_astro might help you.

If you don't find those files, please run the last step from the gr-radio_astro install again (from the same build directory where you ran it for the first time), like this:

sudo make install

paying attention to where it copies the blocks files to; for instance you could run something like this:

sudo make install | grep blocks

The output should be able to give us some idea of what might be going on there.

Franco

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@fventuri
@PranavSanghavi

Ok I can see the directory /usr/local/share/gnuradio/grc/blocks and it does contain the radio_astro_....block.yml files.

I spent some time trying to fing a .bashrc but couldn't. A little research on the web revealed the fact that MacOS doesnt use the .bashrc file and instead uses the .bash_profile file for modifying the PATH variable. Given I can find no trace of a .bashrc file on my Mac, but do have a .bash_profile file, this would appear to be correct??

Should I simply try adding additional path info to the bash_profile along the lines of your earlier suggestion. However, this would need to be amended given the Mac appears to have a /usr/local/lib/python3/site-packages directory and not a /usr/local/lib/python3/dist-packages directory.

Does this make sense?

John

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@PranavSanghavi
Ok - its getting late here in the UK so I'll probably leave this until tomorrow.
Leave the issue open for now and I'll post again with the outcome. More than happy to help get things right.
john

from gr-radio_astro.

fventuri avatar fventuri commented on June 16, 2024

@johncneal - when you have a few minutes, could you run this command on your MacBook Pro:

python3 -c 'import radio_astro'

if it returns and error, please run this command:

python3 -c 'import sys; print(sys.path)'

and make sure that one of the directories listed in the command above contains a directory called radio_astro.

If none of them does, please run the usual sudo make install (in the usual build directory) again, like this:

sudo make install | grep python

to see where that radio_astro directory is created.

Franco

from gr-radio_astro.

kbandura avatar kbandura commented on June 16, 2024

It looks like all your troubles are due to some of the mac install fixes not making it to the main branch yet. If you use the gr38 branch (with new git skills) or this link https://github.com/WVURAIL/gr-radio_astro/archive/refs/heads/gr38.zip
the make/make install process should work and it will (hopefully) put thinks where a mac with macports will need them.

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@fventuri and @kbandura

Ok - @fventuri first -
python3 -c 'import radio_astro' DID return an error - ModuleNotFoundError: No module named 'radio_astro'
python3 -c 'import sys; print(sys.path)' returned the following - ['', '/Users/johnneal/anaconda3/lib/python37.zip', '/Users/johnneal/anaconda3/lib/python3.7', '/Users/johnneal/anaconda3/lib/python3.7/lib-dynload', '/Users/johnneal/anaconda3/lib/python3.7/site-packages', '/Users/johnneal/anaconda3/lib/python3.7/site-packages/aeosa']

Ie NO reference to a folder named 'radio_astro' HOWEVER as previously mentioned there IS a folder of that name at /usr/local/lib/python3.7/site-packages/radio_astro which contains a lot of Radio-Astro related .py, .pyo, .pyc files. This was presumably created by the earlier build process?? So what now ? Do I go ahead and re-run the sudo make install ? Is it likely to do anything different to what it did last time ??

Alternatively should I have another try at the gr38 version as per @kbandura suggestion??

from gr-radio_astro.

fventuri avatar fventuri commented on June 16, 2024

@johncneal - I would definitely try @kbandura suggestion first; hopefully it will solve your problem.

Also the output from the print(sys.path) command makes me think perhaps you have multiple versions of Python3 installed there.
If the gr38 branch doesn't work, please run these two commands:

/usr/bin/python3 -c 'import radio_astro'

and

/usr/bin/python3 -c 'import sys; print(sys.path)'

Thanks,
Franco

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@kbandura and @fventuri
Ok - I'll re-extract the GR38.zip file again into a gr-radio_astro folder in my home directory. I assume the instructions at https://github.com/WVURAIL/gr-radio_astro/wiki/Installing-gr-radio_astro#installing-gr-radio_astro-for-gnuradio-38 are the ones I should follow.(we obviously fixed the earlier make problem by installing BOOST) I will however, again skip the GR install step since that is already installed and appears to be working.

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@kbandura - given I'm on a Mac I assume I should modify the instructions to put path info into the bash_profile file given the Mac doesn't have a .bashrc file ????

from gr-radio_astro.

kbandura avatar kbandura commented on June 16, 2024

Shouldn't need any additional bash/path additions on mac once use the right version.

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@kbandura , @fventuri , @PranavSanghavi
Ok, looks like I may have a working gr-radio_astro setup !!!

Since I don't yet have an actual SDR device (shame on me - but that will be addressed very soon) this is based only on the ability to load several of the Example GRC files. There were no missing blocks (except the Lime SDR block but I hadn't explicitly installed that so no surprise. I had loaded the RTL-SDR block and this looks fine when I load the NSF Integrate24 GRC file. I obviously haven't been able to run that yet since I haven't yet got a device. However, the three Example vector demo GRC files load and run happily.

This install was finally based on the @kbandura suggestion of repeating the build using the GR38.zip file. I did add a suitable line pointing to my python37/site-packages directory in my .bash_profile file but will try this with that commented out later.

I did have a slight issue initially since I'd already got GNU Radio installed and I'd missed the need to install the h5py and ephem modules. Not having 'apt' on the Mac I installed these using the MacPorts versions of them - that seems to work but for Mac users that isn't obvious from the Git instructions. It would generally help if the instructions were clearer about how to install gr-radio_astro where the GR core is already installed which i likely to be the case for a proportion of users.

The GR38 zip install instructions also tell you to do a 'sudo ldconfig' - ldconfig is not present on the Mac and doesn't seem to be required anyway.

Thanks for your support and help with sorting this out and shout if there is any further info you want. I guess I'm now at the start of a long road of how to to make productive use of this excellent facility. I'll be building an initial H1 Line antenna in the New Year and hopefully doing some low res galactic mapping - following in the footsteps of DSPIRA and others before venturing into related areas.

john

from gr-radio_astro.

glangsto avatar glangsto commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

Hi Glen
Yes - I did run the vector demo's and they run fine. I'd previously installed the ephem module so no problems.
Looking forward to using these tools in earnest. Time to start the learning curve in radio dsp - hopefully a challenging but rewarding extension to my astronomy interests. I'll be hitting the various tutorials and other online resources available.

Out of interest I see you have a separate Analyze repo. Am I right in thinking these are a separate set of facilities but designed to support analysis of data captured using the gr-radio_astro tools? If they are separate, I'll take a look at getting these onto the Mac as well, since I've built out a Raspberry Pi for acquisition and I'll move the data onto the Mac for analysis.

John

from gr-radio_astro.

PranavSanghavi avatar PranavSanghavi commented on June 16, 2024

from gr-radio_astro.

glangsto avatar glangsto commented on June 16, 2024

from gr-radio_astro.

johncneal avatar johncneal commented on June 16, 2024

@PranavSanghavi
By way of background -

  • I'm in Essex, UK. Biomedical scientist - drifted into biomedical software development in the 1980's - recently retired.
  • Coded in many languages - specialist in interoperability solutions (messaging and REST API's etc) for 16 yrs.
  • Amateur astronomer since completing one year University distance learning course in Astronomy in 2014.
  • Developed an interest in stellar evolution - most of my practical observing has been low res visual spectroscopy.
  • Recently retired and most of my coding is now in Apple Swift and Python (use AstroPy, Matplotlib etc) .
  • My interest in stellar evolution has inevitably led me to widen my astronomical interest into areas of the EM spectrum beyond the visible. So now getting interested in what is possible to amateurs in the radio bands.

So initially this is likely to be a personal project but I do have a couple of colleagues at my local astronomical society who also are interested so I suspect others may get involved as it progresses.

I discovered the DSPIRA site a few weeks ago when I started to explore amateur radio astronomy. The Light Work memo's showed up in my browsing a few days ago and I've started reading through them. There does seem to be a lot of enthusiastic work going on and I shall certainly be exploring it. The plan is to start building a simple Hydrogen line antenna shortly. Not sure yet which design I'll go for yet - 2.4 GHz grid antenna or diy horn option. The 2.4GHz grid antennas seem to be completely unavailable in the UK at present. So could try getting hold of an old 80 - 100 cm satellite dish and make a tin can LNB.

Initial goal would be to achieve some basic galactic scale mapping - albeit at low resolution. While this would simply be repeating work others have done its seems like a good place to start in terms of getting basic hardware and software in place and learning about the simpler end of radio astronomy data acquisition and analysis.

As far as contributing to the Light Work memo's is concerned, I'll endeavour to document the issues I encountered and see if I can pull together a set of instructions with respect to gr-radio_astro installs on MacOS. I'm a little nervous about trying to improve the core GNU-Radio installation process which seems a bit more straightforward since it doesn't involve build stages - just Installation. Its also the case that the Mac world seems likely to be a little unpredictable in the immediate future with Apple migrating their products away from Intel processors to Apple Silicon (the M1 chip etc) - not clear if or how that may impact the Python world and GNU-Radio in particular. Add to that the fact that many scientific Mac users have Python virtual envs courtesy of Anaconda etc - might add further unpredictability around gr-radio_astro installs. Such users are potentially also going to want Glen Langstons 'analyse' repo as well. Thats next on my list - the only point of capturing data is if your going to do something with it !!

Seems to me like a pretty dynamic space !!! Lets see how it goes.

John

from gr-radio_astro.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.