Project

General

Profile

Bug #4359

Compilling from Git Bramcj gr3.8 fails

Added by ctesias2 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/12/2020
Due date:
% Done:

0%

Spec Reference:

Description

Steps to reproduce:

i. Download, compile, and install gnuradio 3.8
ii. Checkout the gr-osmosdr code from git
iii. Switch branch to branch gr3.8
iv. Make build directory.
v. CD to build directory
vi. run cmake ../
vii. make

The compile fails with the following error:

[ 66%] Linking CXX shared library libgnuradio-osmosdr.so
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/gnuradio-osmosdr.dir/rfspace/rfspace_source_c.cc.o: in function `void boost::this_thread::sleep_for<long, boost::ratio<1l, 1000l> >(boost::chrono::duration<long, boost::ratio<1l, 1000l> > const&)':
rfspace_source_c.cc:(.text._ZN5boost11this_thread9sleep_forIlNS_5ratioILl1ELl1000EEEEEvRKNS_6chrono8durationIT_T0_EE[_ZN5boost11this_thread9sleep_forIlNS_5ratioILl1ELl1000EEEEEvRKNS_6chrono8durationIT_T0_EE]+0x46): undefined reference to `boost::chrono::steady_clock::now()'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/gnuradio-osmosdr.dir/rfspace/rfspace_source_c.cc.o: in function `void boost::this_thread::sleep_for<long, boost::ratio<1l, 1l> >(boost::chrono::duration<long, boost::ratio<1l, 1l> > const&)':
rfspace_source_c.cc:(.text._ZN5boost11this_thread9sleep_forIlNS_5ratioILl1ELl1EEEEEvRKNS_6chrono8durationIT_T0_EE[_ZN5boost11this_thread9sleep_forIlNS_5ratioILl1ELl1EEEEEvRKNS_6chrono8durationIT_T0_EE]+0x46): undefined reference to `boost::chrono::steady_clock::now()'
collect2: error: ld returned 1 exit status
make[2]: * [lib/CMakeFiles/gnuradio-osmosdr.dir/build.make:529: lib/libgnuradio-osmosdr.so.0.2.0.0] Error 1
make[1]:
[CMakeFiles/Makefile2:523: lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
make: *
* [Makefile:141: all] Error 2

The error can be resolved by changing CMakeLists.txt. Here is the output for the change from the git diff command:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f803388..8df09d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@ -122,7 +122,7 @ endif() ######################################################################## # Find boost ########################################################################
-find_package(Boost "1.65" REQUIRED thread system)
+find_package(Boost "1.65" REQUIRED thread system chrono)

if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to compile osmosdr")

Re-run steps iv through vii and the code compiles. After running sudo make install, OsmoSDR appears in the gnuradio-companion right hand menu and you can select from somocom Sink, osmocom Source, RTL-SDR Source.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)