|
From: | David Halls |
Subject: | Re: [Discuss-gnuradio] Building GNU Radio with previous Boost version |
Date: | Tue, 1 Sep 2015 11:17:58 +0000 |
Dear All,
I have now had success building GNU Radio with previous Boost (1.49) version. Thanks for the help.
First you have to get boost 1.49 to build from source, download from
http://www.boost.org/users/history/version_1_49_0.html
then some edits are required as per
this involves find and replace of TIME_UTC with TIME_UTC_ in a number of files. Just do a find and replace in all of the source code, they are all shown in
https://svn.boost.org/trac/boost/changeset/78802
then do the install to a local directory somewhere...
./boostrap.sh --prefix=PATH_TO_LOCAL_DIRECTORY (i.e. not system folders, do not want to conflict with system boost) ./b2 install
then make GNU Radio with:
cmake -DBOOST_INCLUDEDIR=/PATH_TO_LOCAL_DIRECTORY/include
-DBOOST_LIBRARYDIR=/PATH_TO_LOCAL_DIRECTORY/lib ../
then make, install...
Finally at run-time one must point to the 1.49 libraries when launching GRC. I achieved this by adding the library path to /etc/ld.so.conf, but others may correct me and suggest a more suitable location for that change.
Thanks all for the help.
David
p.s. I will go on to create full documentation about how to call MATLAB shared libraries from GNU Radio, now the boost conflict has been resolved...
From: David Halls
Sent: 19 August 2015 17:48 To: Marcus Müller; address@hidden Subject: RE: [Discuss-gnuradio] Building GNU Radio with previous Boost version Marcus, Nathan, All,
Thanks Marcus I have tried building GNU Radio with Boost 1.49 (that required by MATLAB)
I've made a little progress, but it's slow going. I got the header files (not included with the MATLAB release) by downloading Boost 1.49, and building it and installing it to a home directory (not /usr/...).
cmake seems to run fine with
"cmake -DBOOST_INCLUDEDIR=/home/gnuradio/gnuradio_trlcode/boost_1_49/include -DBOOST_LIBRARYDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v81/bin/glnxa64 ../"
(so I am pointing to my header files for the INCLUDEDIR, and MATLABs libraries for the LIBRARYDIR)
the output includes positive sounding things like
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- unit_test_framework
-- program_options
and -- Configuring gnuradio-runtime support...
-- Dependency Boost_FOUND = 1
etc but when I then try "make VERBOSE=1", there seem to be problems linking volk as pasted below. Can anyone help? Thanks! David
make VERBOSE=1
/usr/bin/cmake -H/home/gnuradio/gnuradio_build/gnuradio -B/home/gnuradio/gnuradio_build/gnuradio/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/gnuradio/gnuradio_build/gnuradio/build/CMakeFiles /home/gnuradio/gnuradio_build/gnuradio/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make -f volk/lib/CMakeFiles/volk.dir/build.make volk/lib/CMakeFiles/volk.dir/depend
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
cd /home/gnuradio/gnuradio_build/gnuradio/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/gnuradio/gnuradio_build/gnuradio /home/gnuradio/gnuradio_build/gnuradio/volk/lib /home/gnuradio/gnuradio_build/gnuradio/build /home/gnuradio/gnuradio_build/gnuradio/build/volk/lib
/home/gnuradio/gnuradio_build/gnuradio/build/volk/lib/CMakeFiles/volk.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make -f volk/lib/CMakeFiles/volk.dir/build.make volk/lib/CMakeFiles/volk.dir/build
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make[2]: Nothing to be done for `volk/lib/CMakeFiles/volk.dir/build'.
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
/usr/bin/cmake -E cmake_progress_report /home/gnuradio/gnuradio_build/gnuradio/build/CMakeFiles 95 96 97 98 99
[ 5%] Built target volk
make -f volk/lib/CMakeFiles/test_all.dir/build.make volk/lib/CMakeFiles/test_all.dir/depend
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
cd /home/gnuradio/gnuradio_build/gnuradio/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/gnuradio/gnuradio_build/gnuradio /home/gnuradio/gnuradio_build/gnuradio/volk/lib /home/gnuradio/gnuradio_build/gnuradio/build /home/gnuradio/gnuradio_build/gnuradio/build/volk/lib
/home/gnuradio/gnuradio_build/gnuradio/build/volk/lib/CMakeFiles/test_all.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make -f volk/lib/CMakeFiles/test_all.dir/build.make volk/lib/CMakeFiles/test_all.dir/build
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make[2]: Nothing to be done for `volk/lib/CMakeFiles/test_all.dir/build'.
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
/usr/bin/cmake -E cmake_progress_report /home/gnuradio/gnuradio_build/gnuradio/build/CMakeFiles
[ 5%] Built target test_all
make -f volk/apps/CMakeFiles/volk-config-info.dir/build.make volk/apps/CMakeFiles/volk-config-info.dir/depend
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
cd /home/gnuradio/gnuradio_build/gnuradio/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/gnuradio/gnuradio_build/gnuradio /home/gnuradio/gnuradio_build/gnuradio/volk/apps /home/gnuradio/gnuradio_build/gnuradio/build /home/gnuradio/gnuradio_build/gnuradio/build/volk/apps
/home/gnuradio/gnuradio_build/gnuradio/build/volk/apps/CMakeFiles/volk-config-info.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make -f volk/apps/CMakeFiles/volk-config-info.dir/build.make volk/apps/CMakeFiles/volk-config-info.dir/build
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make[2]: Nothing to be done for `volk/apps/CMakeFiles/volk-config-info.dir/build'.
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
/usr/bin/cmake -E cmake_progress_report /home/gnuradio/gnuradio_build/gnuradio/build/CMakeFiles
[ 5%] Built target volk-config-info
make -f volk/apps/CMakeFiles/volk_profile.dir/build.make volk/apps/CMakeFiles/volk_profile.dir/depend
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
cd /home/gnuradio/gnuradio_build/gnuradio/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/gnuradio/gnuradio_build/gnuradio /home/gnuradio/gnuradio_build/gnuradio/volk/apps /home/gnuradio/gnuradio_build/gnuradio/build /home/gnuradio/gnuradio_build/gnuradio/build/volk/apps
/home/gnuradio/gnuradio_build/gnuradio/build/volk/apps/CMakeFiles/volk_profile.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make -f volk/apps/CMakeFiles/volk_profile.dir/build.make volk/apps/CMakeFiles/volk_profile.dir/build
make[2]: Entering directory `/home/gnuradio/gnuradio_build/gnuradio/build'
Linking CXX executable volk_profile
cd /home/gnuradio/gnuradio_build/gnuradio/build/volk/apps && /usr/bin/cmake -E cmake_link_script CMakeFiles/volk_profile.dir/link.txt --verbose=1
/usr/bin/c++ -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG CMakeFiles/volk_profile.dir/volk_profile.cc.o CMakeFiles/volk_profile.dir/__/lib/qa_utils.cc.o -o volk_profile -rdynamic ../lib/libvolk.so.0.0.0 -lboost_filesystem
-lboost_system -lboost_unit_test_framework -lboost_program_options -ldl -lorc-0.4 -Wl,-rpath,/home/gnuradio/gnuradio_build/gnuradio/build/volk/lib:
CMakeFiles/volk_profile.dir/volk_profile.cc.o: In function `main':
volk_profile.cc:(.text.startup+0x613b): undefined reference to `boost::filesystem3::path::wchar_t_codecvt_facet()'
volk_profile.cc:(.text.startup+0x6193): undefined reference to `boost::filesystem3::path::parent_path() const'
volk_profile.cc:(.text.startup+0x61a2): undefined reference to `boost::filesystem3::detail::status(boost::filesystem3::path const&, boost::system::error_code*)'
volk_profile.cc:(.text.startup+0x65b1): undefined reference to `boost::filesystem3::path::parent_path() const'
volk_profile.cc:(.text.startup+0x6613): undefined reference to `boost::filesystem3::path::parent_path() const'
volk_profile.cc:(.text.startup+0x6622): undefined reference to `boost::filesystem3::detail::create_directories(boost::filesystem3::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [volk/apps/volk_profile] Error 1
make[2]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make[1]: *** [volk/apps/CMakeFiles/volk_profile.dir/all] Error 2
make[1]: Leaving directory `/home/gnuradio/gnuradio_build/gnuradio/build'
make: *** [all] Error 2
From: Marcus Müller <address@hidden>
Sent: 17 August 2015 15:22 To: David Halls; address@hidden Subject: RE: [Discuss-gnuradio] Building GNU Radio with previous Boost version Hi David,
I think we can all agree that the community starting to run at the mention of Matlab is not a good thing - I think there might be frustration behind this flight instinct, so let's try to make this a success story. I concur with the pretty detailed reply from mathworks; the reason is likely to be the binary/abi mismatch between the boost GNU Radio/your native runtime linker uses and the one that the Matlab library needs. Now, you should be able to specify the boost that cmake uses when configuring the build process: cmake -DBOOST_INCLUDEDIR=<matlab-shipped boost includes> -DBOOST_LIBRARY_DIR=<matlab-shipped library dir> .. Also make sure to specify export LD_LIBRARY_DIR containing the same matlab library dir; otherwise, at runtime your system's boost will get linked in, and that will still result in segfaults. Maybe there is also the option to statically link the Matlab library before loading it from GNU Radio, instead of doing it the other way around (which is option 2). To me, that sounds more logically sound, since it's Matlab that introduces library dependencies that are incompatible with your system libraries, because otherwise you might run into the same problem for other libraries that both Mathworks code and GNU Radio use and Mathworks ships their own version with. However, I don't know if that would even be possible, as I don't have Matlab around to test it. All in all, I also like option 3 from Mathwork's reply, though I don't think the .mat method would work well for streaming like GNU Radio does; you should be able to just open a file (fopen) and read from it (fread) in a loop, so that you can get what a file source in GNU Radio writes to a FIFO; basically, as Matlab pseudocode: infile = fopen("/tmp/fifo_in"); outfile = fopen("/tmp/fifo_out", "w"); while 1 datain = fread(infile, 1000, "float32"); dataout = do_some_processing(datain); fwrite(outfile, dataout, "float32"); end you'd have to mkfifo /tmp/fifo_in /tmp/fifo_out first and then use file sink/source to write/read to/from these. Of course, a socket- or IPC-based solution might be cleaner, but I don't know much popular matlab tools that make it easy to write "real-world compatible" Matlab code (I think that lack of knowledge of high-quality well-known libraries might be what leads people to run away as soon as you mention Matlab). Best regards, Marcus Am 17. August 2015 12:27:25 MESZ, schrieb David Halls
<address@hidden>:
NOTE: The information in this email and any attachments may be confidential and/or legally privileged. This message may be read, copied and used only by the intended recipient. If you are not the intended recipient, please destroy this message, delete any copies held on your system and notify the sender immediately. Toshiba Research Europe Limited, registered in England and Wales (2519556). Registered Office 208 Cambridge Science Park, Milton Road, Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com |
[Prev in Thread] | Current Thread | [Next in Thread] |