-
Notifications
You must be signed in to change notification settings - Fork 14
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
Problem building / installing gr-radio_astro on Mac #42
Comments
@johncneal - that error message seems to indicate that the I would try to use the same package manager you used to install GNU Radio to also install (or reinstall) the Franco |
@fventuri (base) Johns-MacBook-Pro-2:build johnneal$ sudo make john |
I see that you have unzipped the repo from the tagged version.
We have made committed fixes to the repo since the tag in an attempt to have the package work on macOS. You might want to go to the director pull the latest commits from the main branch by using “git pull”. Once you have pulled to the latest commit clear your build folder and rerun The install process.
Do let me know if this works. The new commits have not been extensively tested.
Pranav
… On Dec 4, 2021, at 5:47 PM, johncneal ***@***.***> wrote:
@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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi Pranav - thanks for getting back. |
It’s completely alright forgive me for presuming.
So you just need to be in the same folder that you unzipped ie the gr-radio_astro folder
In the terminal while your present working directory is gr-radio_astro you can then type ‘git pull’
It shall download and update all the files according to the latest commit.
I think that should do it. Let me know if it works if you still find some trouble I’ll have a work around.
Pranav
… On Dec 4, 2021, at 6:44 PM, johncneal ***@***.***> wrote:
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
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 |
@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):
This way you should have all the latest fixes and enhancements. Franco |
Hi @fventuri and @PranavSanghavi 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 ?? |
Ah so there’s a quirk with how this install works wirh Python versions and environments. You can look where radio_astro folder exists in /usr/local/lib/python*
There’s a required extra step to ensure install. They are in the wiki and the readme but I’ve copied it below.
Additional Steps for setting the proper Python environment:
Edit your .bashrc file and add this to the bottom to set Python path: export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/local/lib/python3.8/dist-packages:$PYTHONPATH
Additionally you can create appropriate symbolic links
Check which python is the installed version of GNURadio by opening gnuradio-companion in a terminal window and click on Help --> Aboutand noting the python version on the dialog box that opens.
Go to the following by typing: cd /usr/local/lib/python3.8/dist-packages or cd /usr/local/lib/python3.9/dist-packages for the appropriate python version.
Type ln -s /usr/local/lib/python3/dist-packages/radio_astro
Pranav Sanghavi
… On Dec 5, 2021, at 11:56 AM, johncneal ***@***.***> wrote:
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 ??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@PranavSanghavi 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??? |
Hmm. Ok one important question. Did you restart your terminal after installing gr-radio_astro?
One you install the package. Close the terminal and gniradio companion and then open a new terminal session and then open gnuradio companion.
Pranav Sanghavi
… On Dec 5, 2021, at 1:05 PM, johncneal ***@***.***> wrote:
@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 list-packages. SO does this matter - should I adapt your above comments / instructions to reflect these 3.7 directories???
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
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. :-( |
@johncneal - the blocks for the GRC block selection should all be in a directory called something like
Once you find that If you don't find those files, please run the last step from the
paying attention to where it copies the
The output should be able to give us some idea of what might be going on there. Franco |
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 |
Yea that’s right. Mac has bash_profile instead of the bashrc.
Ahh yea dist-packages is very Debian specific ie the flavor of Linux Ubuntu is based on. So site-packages is right. Perhaps update paths accordingly. If I’m not wrong to add to your .bash_profile export PYTHONPATH=/path/to/directory/with/radio_astro/folder:/usr/local/lib/python3.7/dist-packages:$PYTHONPATH
Or you could soft symlink the radio_astro folder into the /usr/local/lib/python3.7/dist-packagesDirectory.
John thank doing this this helps us a lot to complete porting this package to macOS systems and update instructions for installing on a mac.
Best
Pranav Sanghavi
… On Dec 5, 2021, at 7:23 PM, johncneal ***@***.***> wrote:
@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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@PranavSanghavi |
@johncneal - when you have a few minutes, could you run this command on your MacBook Pro:
if it returns and error, please run this command:
and make sure that one of the directories listed in the command above contains a directory called If none of them does, please run the usual
to see where that Franco |
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 |
Ok - @fventuri first - 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?? |
@johncneal - I would definitely try @kbandura suggestion first; hopefully it will solve your problem. Also the output from the
and
Thanks, |
@kbandura and @fventuri |
@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 ???? |
Shouldn't need any additional bash/path additions on mac once use the right version. |
@kbandura , @fventuri , @PranavSanghavi 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 |
Hi John,
You can run vectordemo.grc and vectordemo_c2.grc
as these do not use any hardware.
You will get some messages about pip3 installing some python code
pip3 install ephem
for one, but these should not stop your testing.
Good luck
Glen
Glen I Langston, Ph. D.
Galactic Astronomy Program Director
National Science Foundation
304-456-3032
… On Dec 6, 2021, at 1:39 PM, johncneal ***@***.***> wrote:
This email originated from outside of the National Science Foundation. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Hi Glen 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 |
Hi John, that is excellent!
We look forward to hearing about your progress.
I have a question and a request:
Q1. Are you working on this with a group or with students or as a personal project?
Request1. WE maintain a set of memos http://wvurail.org/lightwork/ and also have a website built for and by high school teachers interested in radio astronomy https://wvurail.org/dspira-lessons/ . I would like to extend an invitation to you to contribute to those. Could be small write ups such as how to install this on a macOS system and your future experimentation and results.
-Pranav
… On 2021Dec 6,, at 2:52 PM, johncneal ***@***.***> wrote:
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#42 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACM6GPPK4ZTU2CHZOX7UAPLUPUH6PANCNFSM5JK7HUHA>.
|
Hi John,
Glad to hear the simplest parts of the code are working for you.
Yes, both the analyze and jupyter repositories are for after taking data.
These are not a part of gnuradio, but rather analysis.
git clone https://www.github.com/glangsto/jupyter
and
git clone https://www.github.com/glangsto/analyze
Both of them have small amounts of sample data for
running tests, with jupyter being a little more organized
for demos
Glen
Glen I Langston, Ph. D.
Galactic Astronomy Program Director
National Science Foundation
304-456-3032
… On Dec 6, 2021, at 2:52 PM, johncneal ***@***.***> wrote:
This email originated from outside of the National Science Foundation. Do not click links or open attachments unless you recognize the sender and know the content is safe.
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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
@PranavSanghavi
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 |
Problem building / installing gr-radio_astro on Mac
I managed to instal GNURadio 3.8 and SDR support on a MacBook Pro (OSX 10.15.7) and GR-Companion runs ok with a couple of test .GRC files.
I’ve also installed the nsfSDR image for Raspberry Pi on a new Raspi 4B and that all seems to be working ok. However, mindful of the statements that ‘analysis’ is better done on a separate computer, I wanted to install the gr-radio_astro components on the Macbook Pro.
I followed the instructions for Installing gr-radio_astro for GNUradio 3.8 on Github (https://github.com/WVURAIL/gr-radio_astro/wiki/Installing-gr-radio_astro ) - though, on the basis that GNURadio was already installed and working, I omitted the step -
sudo apt install gnuradio gr-osmosdr airspy python3-h5py python3-ephem
I unzipped the v2020.08-gr38 file and created the build folder. Unfortunately the ‘cmake ..’ step threw the below warnings and errors.
Do you have any suggestions how I might resolve this?
John Neal
(base) Johns-MacBook-Pro-2:gr-radio_astro-2020.08-gr38 johnneal$ cd build
(base) Johns-MacBook-Pro-2:build johnneal$ cmake ..
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- The C compiler identification is AppleClang 11.0.0.11000033
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Found LOG4CPP: /opt/local/lib/liblog4cpp.dylib
CMake Warning (dev) at /opt/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to
find_package_handle_standard_args
(PkgConfig)does not match the name of the calling package (GMP). This can lead to
problems in calling code that expects
find_package
result variables(e.g.,
_FOUND
) to follow a certain pattern.Call Stack (most recent call first):
/opt/local/share/cmake-3.21/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
/opt/local/share/cmake/gnuradio/FindGMP.cmake:2 (include)
/opt/local/share/cmake/gnuradio/FindMPLIB.cmake:1 (find_package)
/opt/local/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/opt/local/share/cmake/gnuradio/GnuradioConfig.cmake:26 (find_dependency)
CMakeLists.txt:88 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'gmp'
-- Found gmp, version 6.2.1
-- Found GMP: /opt/local/lib/libgmpxx.dylib
-- Using GMP.
-- Found MPLIB: /opt/local/lib/libgmpxx.dylib
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at /opt/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR date_time program_options
filesystem system regex thread unit_test_framework) (Required is at least
version "1.71.0")
Call Stack (most recent call first):
/opt/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/opt/local/share/cmake-3.21/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args)
/opt/local/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/opt/local/share/cmake/gnuradio/GnuradioConfig.cmake:45 (find_dependency)
CMakeLists.txt:88 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/johnneal/gr-radio_astro/gr-radio_astro-2020.08-gr38/build/CMakeFiles/CMakeOutput.log".
(
The text was updated successfully, but these errors were encountered: