A quick note to say thanks for Brian Dickman for his assistance in getting his gr-scan files from Github to compile under MacOS Mavericks for use with the HackRF One.
I've copied some of his guidance here for others to use. Note that in my case, I have GNU Radio built and installed under MacPorts while he used Homebrew. Hence there were some differences for me to get gr-scan to build properly. <From Brian> The problem is that g++ doesn't know to search for the macports files in /opt/local by default, so we have to tell it to look there. We do this for both the include files (.h) and library files (.so). 1) Unless you specified a different folder when you installed MacPorts the first time, they should live in /opt/local (this is called the MacPorts "prefix"). Confirm the location by querying ports: "port contents argp-standalone". That should list all the argp files by location, which should all start with the same prefix. 2) Add the "prefix / include" and "prefix / lib" folders to the Makefile, using the -I (capital i) and -L parameters. -I specifies an extra folder where gcc should look for header files, and -L specifies a folder that gcc should look for library files. Two pre-existing lines from the Makefile are shown for context, only the third line below is new: ... CXXFLAGS=-DVERSION="\"gr-scan $(VERSION)\"" -std=c++11 -Wall \ -I/usr/local/include -largp -lgnuradio-pmt -lgnuradio-runtime -lgnuradio-blocks -lgnuradio-fft -lgnuradio-filter -lgnuradio-osmosdr -lboost_system -O2 -Wno-unused-function CXXFLAGS+=-I/opt/local/include -L/opt/local/lib ... <SNIP> Lastly, my installation of the boost package under MacPorts creates a library called lboost_system-mt instead of lboost_system, hence the Makefile should be edited as shown below: ... CXXFLAGS=-DVERSION="\"gr-scan $(VERSION)\"" -std=c++11 -Wall \ -I/usr/local/include -largp -lgnuradio-pmt -lgnuradio-runtime -lgnuradio-blocks -lgnuradio-fft -lgnuradio-filter -lgnuradio-osmosdr -lboost_system-mt -O2 -Wno-unused-function CXXFLAGS+=-I/opt/local/include -L/opt/local/lib ... Once this last edit is done, the make will run cleanly and gr-scan works as expected. Here's the link to Brian's Github archive: https://github.com/briand/gr-scan Cheers, -Bob, WP4BQV/VQ9BQV.
_______________________________________________ HackRF-dev mailing list [email protected] https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
