srsran/corescope

Corescope Installation Error: cannot find linked files

prpr2770 opened this issue · 8 comments

Issue Description

[100%] Linking CXX executable corescope
/usr/bin/ld: cannot find -lsrsenb_upper
/usr/bin/ld: cannot find -lsrsenb_rrc
/usr/bin/ld: cannot find -lsrsenb_s1ap
/usr/bin/ld: cannot find -lsrsenb_common
/usr/bin/ld: cannot find -lsrsgnb_upper
/usr/bin/ld: cannot find -lsrsgnb_ngap
/usr/bin/ld: cannot find -lsrsue_upper
/usr/bin/ld: cannot find -lsrsran_radio
/usr/bin/ld: cannot find -lenb_cfg_parser
collect2: error: ld returned 1 exit status
make[2]: *** [corescope/src/CMakeFiles/corescope.dir/build.make:187: corescope/src/corescope] Error 1
make[1]: *** [CMakeFiles/Makefile2:9193: corescope/src/CMakeFiles/corescope.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Setup Details

While following the instructions provided here
after using the following command:

cmake .. -DCMAKE_INSTALL_PREFIX=~/<install location>

and then executing

make -j $(nproc)

Current machine: Ubuntu 20.04.3 LTS

I'd installed cmake using

sudo snap install cmake --classic

The process worked incorrectly on Ubuntu. 18.04. Obtained the following errors:

cc1plus: all warnings being treated as errors
corescope/src/CMakeFiles/corescope.dir/build.make:110: recipe for target 'corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o' failed
make[2]: * [corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o] Error 1
CMakeFiles/Makefile2:12101: recipe for target 'corescope/src/CMakeFiles/corescope.dir/all' failed
make[1]: * [corescope/src/CMakeFiles/corescope.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: * [all] Error 2

Additionally, on running the tests, obtained the following:

The following tests FAILED:
	 99 - psbch_file_test_ideal_tm2_p6_c0 (Failed)
	100 - psbch_file_test_ideal_tm2_p15_c84 (Failed)
	101 - psbch_file_test_ideal_tm2_p25_c168 (Failed)
	102 - psbch_file_test_ideal_tm2_p50_c252 (Failed)
	103 - psbch_file_test_ideal_tm2_p100_c335 (Failed)
	104 - psbch_file_test_ideal_tm2_p50_c252_ext (Failed)
	105 - psbch_file_test_cmw_tm4_p50_c169 (Failed)
	132 - pssch_pscch_file_test_ideal_tm2_p100 (Failed)
	133 - pssch_pscch_file_test_ideal_tm4_p100 (Failed)
	134 - pssch_pscch_test_tm4_p50_qc (Failed)
	135 - pssch_pscch_test_tm4_p50_cmw (Failed)
	136 - pssch_pscch_test_tm4_p50_huawei (Failed)
	137 - pssch_pscch_test_tm4_p50_uxm1 (Failed)
	138 - pssch_pscch_test_tm4_p100_uxm2 (Failed)
	139 - pssch_pscch_test_tm4_p100_uxm3 (Failed)
	140 - pssch_pscch_test_tm4_p50_uxm4 (Failed)
	577 - sync_sl_test_tm2_p6_c_0 (Failed)
	578 - sync_sl_test_tm2_p15_c_84 (Failed)
	579 - sync_sl_test_tm2_p25_c_168 (Failed)
	580 - sync_sl_test_tm2_p50_c_252 (Failed)
	581 - sync_sl_test_tm2_p100_c_335 (Failed)
	582 - sync_sl_test_tm2_p25_c_168_so (Failed)
	586 - sync_sl_test_tm4_p6_c_0 (Failed)
	587 - sync_sl_test_tm4_p15_c_84 (Failed)
	588 - sync_sl_test_tm4_p25_c_168 (Failed)
	589 - sync_sl_test_tm4_p50_c_252 (Failed)
	590 - sync_sl_test_tm4_p25_c_168_so (Failed)
Errors while running CTest
Makefile:140: recipe for target 'test' failed
make: * [test] Error 8

The errors that were obtained during the compilation process is as follows

/home/username/Downloads/corescope/srsRAN/lib/examples/pdsch_ue.c:53:9: note: #pragma message: Compiling pdsch_ue with no RF support
 #pragma message "Compiling pdsch_ue with no RF support"
         ^~~
[ 69%] Linking CXX executable pdsch_ue

home/username/Downloads/corescope/srsRAN/lib/examples/pdsch_enodeb.c:43:9: note: #pragma message: Compiling pdsch_ue with no RF support
 #pragma message "Compiling pdsch_ue with no RF support"
         ^~~
[ 69%] Linking CXX executable pdsch_enodeb


/home/username/Downloads/corescope/srsRAN/lib/examples/npdsch_enodeb.c:56:9: note: #pragma message: Compiling npdsch_ue with no RF support
 #pragma message "Compiling npdsch_ue with no RF support"
         ^~~
[ 69%] Linking CXX executable npdsch_enodeb


[ 98%] Building C object srsRAN/lib/examples/CMakeFiles/npdsch_ue.dir/npdsch_ue.c.o
/home/username/Downloads/corescope/srsRAN/lib/examples/npdsch_ue.c:64:9: note: #pragma message: Compiling npdsch_ue with no RF support
 #pragma message "Compiling npdsch_ue with no RF support"
         ^~~

[ 99%] Building CXX object corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o
/home/username/Downloads/corescope/corescope/src/rest_api/scope_rest.cc:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wcatch-value"
                                ^~~~~~~
[ 99%] Building CXX object corescope/src/CMakeFiles/corescope.dir/rest_api/error_handler.cc.o

I have resolved many of the issues by installing some of the following libraries on Ubuntu 18.04

sudo apt install libdw-dev libuhd-dev libelf-dev libdwarf-dev libssl-dev libbladerf-dev

The SoapySDR and ZeroMQ were installed directly from the source. Additionally, when I commented out the following line in the script /home/username/Downloads/corescope/corescope/src/rest_api/scope_rest.cc:23

//#pragma GCC diagnostic ignored "-Wcatch-value"

There are no compilation errors indicated.

Scanning dependencies of target rrc_meascfg_test
[100%] Building CXX object srsRAN/srsenb/test/rrc/CMakeFiles/rrc_meascfg_test.dir/rrc_meascfg_test.cc.o
[100%] Linking CXX executable rrc_mobility_test
[100%] Built target rrc_mobility_test
[100%] Linking CXX executable rrc_meascfg_test
[100%] Built target rrc_meascfg_test

However, after running the tests, I obtained the following errors:

98% tests passed, 30 tests failed out of 1468

While reviewing the output generated by cmake ../ I found the following warnings

-- Checking for module 'polarssl'
--   No package 'polarssl' found
-- POLARSSL LIBRARIES: POLARSSL_LIBRARIES-NOTFOUND
-- POLARSSL STATIC LIBRARIES: POLARSSL_STATIC_LIBRARIES-NOTFOUND
-- POLARSSL INCLUDE DIRS: POLARSSL_INCLUDE_DIRS-NOTFOUND
-- Could NOT find POLARSSL (missing: POLARSSL_LIBRARIES POLARSSL_INCLUDE_DIRS)
...
-- SKIQ INCLUDE DIRS SKIQ_INCLUDE_DIRS-NOTFOUND
-- Could NOT find SKIQ (missing: SKIQ_LIBRARIES SKIQ_INCLUDE_DIRS) 
-- libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.
-- FINDING SOAPY.

I realize that for Ubuntu18.04 mbedTLS is a good substitution for polarSSL. So, the only library I cannot identify for. installation is SKIQ. Could you please guide me in obtaining the download/installation instructions for SKIQ LIBRARIES

I tried to un-comment the pragma-directive and tried to build the codebase.

$ cmake ../
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM: Linux-5.4.0-91-generic
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_CXX_COMPILER: /usr/bin/c++
-- Build type not specified: defaulting to Release.
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'fftw3f >= 3.0'
--   Found fftw3f , version 3.3.7
-- FFTW3F LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- FFTW3F STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.a
-- FFTW3F INCLUDE DIRS: /usr/include
-- Found fftw3f: /usr/lib/x86_64-linux-gnu/libfftw3f.so  
-- FFT_LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- Checking for module 'polarssl'
--   No package 'polarssl' found
-- POLARSSL LIBRARIES: POLARSSL_LIBRARIES-NOTFOUND
-- POLARSSL STATIC LIBRARIES: POLARSSL_STATIC_LIBRARIES-NOTFOUND
-- POLARSSL INCLUDE DIRS: POLARSSL_INCLUDE_DIRS-NOTFOUND
-- Could NOT find POLARSSL (missing: POLARSSL_LIBRARIES POLARSSL_INCLUDE_DIRS) 
-- Checking for module 'mbedtls'
--   No package 'mbedtls' found
-- MBEDTLS LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so
-- MBEDTLS STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.a
-- MBEDTLS INCLUDE DIRS: /usr/include
-- Found MBEDTLS: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so  
-- Checking for module 'libpcsclite'
--   Found libpcsclite, version 1.8.23
-- Found PCSCLITE: /usr/lib/x86_64-linux-gnu/libpcsclite.so  
-- PCSC LIBRARIES: /usr/lib/x86_64-linux-gnu/libpcsclite.so
-- PCSC INCLUDE DIRS: /usr/include/PCSC
-- Building with PCSC support.
-- UHD LIBRARIES /usr/lib/x86_64-linux-gnu/libuhd.so
-- UHD INCLUDE DIRS /usr/include
-- Found UHD: /usr/lib/x86_64-linux-gnu/libuhd.so  
-- Performing Test UHD_ENABLE_X300_FW_RESET
-- Performing Test UHD_ENABLE_X300_FW_RESET - Failed
-- Performing Test UHD_ENABLE_RFNOC
-- Performing Test UHD_ENABLE_RFNOC - Failed
-- Performing Test UHD_ENABLE_CUSTOM_RFNOC
-- Performing Test UHD_ENABLE_CUSTOM_RFNOC - Failed
-- Checking for module 'libbladeRF'
--   Found libbladeRF, version 1.8.0-0.2016.06-2
-- Looking for bladerf_get_board_name in bladeRF
-- Looking for bladerf_get_board_name in bladeRF - not found
-- libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.
-- FINDING SOAPY.
-- Checking for module 'SoapySDR'
--   Found SoapySDR, version 0.8.1
-- Found libSOAPYSDR: /usr/local/include/SoapySDR, /usr/local/lib/libSoapySDR.so
-- FINDING ZEROMQ.
-- Checking for module 'ZeroMQ'
--   No package 'ZeroMQ' found
-- Found libZEROMQ: /usr/local/include, /usr/local/lib/libzmq.so
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   program_options
-- SRSGUI LIBRARIES /usr/local/lib/libsrsgui.so
-- SRSGUI INCLUDE DIRS /usr/local/include
-- Found SRSGUI: /usr/local/lib/libsrsgui.so  
-- Found libdw: /usr/lib/x86_64-linux-gnu/libdw.so  
-- Found libbfd: /usr/lib/x86_64-linux-gnu/libbfd.so  
-- Found libdwarf: /usr/lib/x86_64-linux-gnu/libdwarf.so  
-- Found Backward: /home/username/Downloads/corescope/cmake/modules  
-- Building with backward-cpp support
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_SSE
-- Performing Test HAVE_SSE - Success
-- SSE4.1 is enabled - target CPU must support it
-- Performing Test HAVE_AVX
-- Performing Test HAVE_AVX - Success
-- AVX is enabled - target CPU must support it
-- Performing Test HAVE_AVX2
-- Performing Test HAVE_AVX2 - Success
-- AVX2 is enabled - target CPU must support it
-- Performing Test HAVE_FMA
-- Performing Test HAVE_FMA - Success
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_AVX512
-- Performing Test HAVE_AVX512 - Failed
-- Performing Test HAVE_VISIBILITY_HIDDEN_CXX
-- Performing Test HAVE_VISIBILITY_HIDDEN_CXX - Success
-- Performing Test HAVE_ERROR_INCOMPATIBLE
-- Performing Test HAVE_ERROR_INCOMPATIBLE - Success
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_VISIBILITY_HIDDEN_C
-- Performing Test HAVE_VISIBILITY_HIDDEN_C - Success
-- CMAKE_C_FLAGS is  -Wno-unused-but-set-variable -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600
-- CMAKE_CXX_FLAGS is  -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror
-- Using install prefix: /usr/local
-- Building for version: 21.04.0
CMake Warning (dev) at srsRAN/CMakeLists.txt:34 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    SRSRAN_VERSION_MAJOR
    SRSRAN_VERSION_MINOR
    SRSRAN_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CMAKE_SYSTEM: Linux-5.4.0-91-generic
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_CXX_COMPILER: /usr/bin/c++
CMake Warning at /usr/share/cmake-3.10/Modules/CPack.cmake:299 (message):
  CPack.cmake has already been included!!
Call Stack (most recent call first):
  cmake/modules/SRSRANPackage.cmake:82 (INCLUDE)
  srsRAN/CMakeLists.txt:41 (include)


-- FFTW3F LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- FFTW3F STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.a
-- FFTW3F INCLUDE DIRS: /usr/include
-- FFT_LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- Checking for module 'polarssl'
--   No package 'polarssl' found
-- POLARSSL LIBRARIES: POLARSSL_LIBRARIES-NOTFOUND
-- POLARSSL STATIC LIBRARIES: POLARSSL_STATIC_LIBRARIES-NOTFOUND
-- POLARSSL INCLUDE DIRS: POLARSSL_INCLUDE_DIRS-NOTFOUND
-- Could NOT find POLARSSL (missing: POLARSSL_LIBRARIES POLARSSL_INCLUDE_DIRS) 
-- Checking for module 'mbedtls'
--   No package 'mbedtls' found
-- MBEDTLS LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so
-- MBEDTLS STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.a
-- MBEDTLS INCLUDE DIRS: /usr/include
-- Building with PCSC support.
-- SKIQ LIBRARIES SKIQ_LIBRARY-NOTFOUNDSKIQ_LIBRARY_GLIB-NOTFOUNDSKIQ_LIBRARY_USB-NOTFOUND
-- SKIQ INCLUDE DIRS SKIQ_INCLUDE_DIRS-NOTFOUND
-- Could NOT find SKIQ (missing: SKIQ_LIBRARIES SKIQ_INCLUDE_DIRS) 
-- libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.
-- FINDING SOAPY.
-- FINDING ZEROMQ.
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   program_options
-- Found Backward: /home/username/Downloads/corescope/cmake/modules  
-- Building with backward-cpp support
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_MARCH_native
-- Performing Test HAVE_MARCH_native - Success
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- CMAKE_C_FLAGS is  -Wno-unused-but-set-variable -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600 -Wno-unused-but-set-variable -march=native -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600
-- CMAKE_CXX_FLAGS is  -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror
-- Using install prefix: /usr/local
-- Building for version: 21.04.0
--    examples will be installed.
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- Found SCTP: /usr/lib/x86_64-linux-gnu/libsctp.so  
-- No post-build command defined
-- No post-build command defined
-- Building with srsUE
-- No post-build command defined
-- No post-build command defined
-- No post-build-UE command defined
-- Building with srsENB
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-ENB command defined
-- Building with srsEPC
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-EPC command defined
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-ENB command defined
-- Configuring done
-- Generating done
-- Build files have been written to: /home/username/Downloads/corescope/build

The compilation command and the warnings/errors is shown below:

[ 93%] Building CXX object corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o
/home/username/Downloads/corescope/corescope/src/rest_api/scope_rest.cc:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wcatch-value"
                                ^~~~~~~~~~~~~~~

...
[ 93%] Linking CXX executable benchmark_radio
[ 93%] Built target benchmark_radio
Scanning dependencies of target test_radio_rt_gain
[ 93%] Building CXX object srsRAN/lib/src/radio/test/CMakeFiles/test_radio_rt_gain.dir/test_radio_rt_gain.cc.o
cc1plus: all warnings being treated as errors
corescope/src/CMakeFiles/corescope.dir/build.make:110: recipe for target 'corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o' failed
make[2]: *** [corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o] Error 1
CMakeFiles/Makefile2:17009: recipe for target 'corescope/src/CMakeFiles/corescope.dir/all' failed
make[1]: *** [corescope/src/CMakeFiles/corescope.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 94%] Linking CXX executable test_radio_rt_gain
[ 94%] Built target test_radio_rt_gain
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Please help me debug this issue. Thank you.

Changing the top-line of CMakeLists.txt to the following, before invoking cmake ../

set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)

And we obtain the following warnings

$ cmake ../
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM: Linux-5.4.0-91-generic
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_CXX_COMPILER: /usr/bin/c++
-- Build type not specified: defaulting to Release.
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'fftw3f >= 3.0'
--   Found fftw3f , version 3.3.7
-- FFTW3F LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- FFTW3F STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.a
-- FFTW3F INCLUDE DIRS: /usr/include
-- Found fftw3f: /usr/lib/x86_64-linux-gnu/libfftw3f.so  
-- FFT_LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- Checking for module 'polarssl'
--   No package 'polarssl' found
-- POLARSSL LIBRARIES: POLARSSL_LIBRARIES-NOTFOUND
-- POLARSSL STATIC LIBRARIES: POLARSSL_STATIC_LIBRARIES-NOTFOUND
-- POLARSSL INCLUDE DIRS: POLARSSL_INCLUDE_DIRS-NOTFOUND
-- Could NOT find POLARSSL (missing: POLARSSL_LIBRARIES POLARSSL_INCLUDE_DIRS) 
-- Checking for module 'mbedtls'
--   No package 'mbedtls' found
-- MBEDTLS LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so
-- MBEDTLS STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.a
-- MBEDTLS INCLUDE DIRS: /usr/include
-- Found MBEDTLS: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so  
-- Checking for module 'libpcsclite'
--   Found libpcsclite, version 1.8.23
-- Found PCSCLITE: /usr/lib/x86_64-linux-gnu/libpcsclite.so  
-- PCSC LIBRARIES: /usr/lib/x86_64-linux-gnu/libpcsclite.so
-- PCSC INCLUDE DIRS: /usr/include/PCSC
-- Building with PCSC support.
-- UHD LIBRARIES /usr/lib/x86_64-linux-gnu/libuhd.so
-- UHD INCLUDE DIRS /usr/include
-- Found UHD: /usr/lib/x86_64-linux-gnu/libuhd.so  
-- Performing Test UHD_ENABLE_X300_FW_RESET
-- Performing Test UHD_ENABLE_X300_FW_RESET - Failed
-- Performing Test UHD_ENABLE_RFNOC
-- Performing Test UHD_ENABLE_RFNOC - Failed
-- Performing Test UHD_ENABLE_CUSTOM_RFNOC
-- Performing Test UHD_ENABLE_CUSTOM_RFNOC - Failed
-- Checking for module 'libbladeRF'
--   Found libbladeRF, version 1.8.0-0.2016.06-2
-- Looking for bladerf_get_board_name in bladeRF
-- Looking for bladerf_get_board_name in bladeRF - not found
-- libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.
-- FINDING SOAPY.
-- Checking for module 'SoapySDR'
--   Found SoapySDR, version 0.8.1
-- Found libSOAPYSDR: /usr/local/include/SoapySDR, /usr/local/lib/libSoapySDR.so
-- FINDING ZEROMQ.
-- Checking for module 'ZeroMQ'
--   No package 'ZeroMQ' found
-- Found libZEROMQ: /usr/local/include, /usr/local/lib/libzmq.so
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   program_options
-- SRSGUI LIBRARIES /usr/local/lib/libsrsgui.so
-- SRSGUI INCLUDE DIRS /usr/local/include
-- Found SRSGUI: /usr/local/lib/libsrsgui.so  
-- Found libdw: /usr/lib/x86_64-linux-gnu/libdw.so  
-- Found libbfd: /usr/lib/x86_64-linux-gnu/libbfd.so  
-- Found libdwarf: /usr/lib/x86_64-linux-gnu/libdwarf.so  
-- Found Backward: /home/uchiha/Downloads/corescope/cmake/modules  
-- Building with backward-cpp support
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_SSE
-- Performing Test HAVE_SSE - Success
-- SSE4.1 is enabled - target CPU must support it
-- Performing Test HAVE_AVX
-- Performing Test HAVE_AVX - Success
-- AVX is enabled - target CPU must support it
-- Performing Test HAVE_AVX2
-- Performing Test HAVE_AVX2 - Success
-- AVX2 is enabled - target CPU must support it
-- Performing Test HAVE_FMA
-- Performing Test HAVE_FMA - Success
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_AVX512
-- Performing Test HAVE_AVX512 - Failed
-- Performing Test HAVE_VISIBILITY_HIDDEN_CXX
-- Performing Test HAVE_VISIBILITY_HIDDEN_CXX - Success
-- Performing Test HAVE_ERROR_INCOMPATIBLE
-- Performing Test HAVE_ERROR_INCOMPATIBLE - Success
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_VISIBILITY_HIDDEN_C
-- Performing Test HAVE_VISIBILITY_HIDDEN_C - Success
-- CMAKE_C_FLAGS is  -Wno-unused-but-set-variable -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600
-- CMAKE_CXX_FLAGS is  -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror
-- Using install prefix: /usr/local
-- Building for version: 21.04.0
-- CMAKE_SYSTEM: Linux-5.4.0-91-generic
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_CXX_COMPILER: /usr/bin/c++
CMake Warning at /usr/share/cmake-3.10/Modules/CPack.cmake:299 (message):
  CPack.cmake has already been included!!
Call Stack (most recent call first):
  cmake/modules/SRSRANPackage.cmake:82 (INCLUDE)
  srsRAN/CMakeLists.txt:41 (include)


-- FFTW3F LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- FFTW3F STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.a
-- FFTW3F INCLUDE DIRS: /usr/include
-- FFT_LIBRARIES: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- Checking for module 'polarssl'
--   No package 'polarssl' found
-- POLARSSL LIBRARIES: POLARSSL_LIBRARIES-NOTFOUND
-- POLARSSL STATIC LIBRARIES: POLARSSL_STATIC_LIBRARIES-NOTFOUND
-- POLARSSL INCLUDE DIRS: POLARSSL_INCLUDE_DIRS-NOTFOUND
-- Could NOT find POLARSSL (missing: POLARSSL_LIBRARIES POLARSSL_INCLUDE_DIRS) 
-- Checking for module 'mbedtls'
--   No package 'mbedtls' found
-- MBEDTLS LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.so
-- MBEDTLS STATIC LIBRARIES: /usr/lib/x86_64-linux-gnu/libmbedcrypto.a
-- MBEDTLS INCLUDE DIRS: /usr/include
-- Building with PCSC support.
-- SKIQ LIBRARIES SKIQ_LIBRARY-NOTFOUNDSKIQ_LIBRARY_GLIB-NOTFOUNDSKIQ_LIBRARY_USB-NOTFOUND
-- SKIQ INCLUDE DIRS SKIQ_INCLUDE_DIRS-NOTFOUND
-- Could NOT find SKIQ (missing: SKIQ_LIBRARIES SKIQ_INCLUDE_DIRS) 
-- libbladeRF found but not compatible. Upgrade your driver or use SoapySDR.
-- FINDING SOAPY.
-- FINDING ZEROMQ.
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   program_options
-- Found Backward: /home/uchiha/Downloads/corescope/cmake/modules  
-- Building with backward-cpp support
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- Performing Test HAVE_MARCH_native
-- Performing Test HAVE_MARCH_native - Success
-- SSE4.1 is enabled - target CPU must support it
-- AVX is enabled - target CPU must support it
-- AVX2 is enabled - target CPU must support it
-- FMA is enabled - target CPU must support it
-- CMAKE_C_FLAGS is  -Wno-unused-but-set-variable -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600 -Wno-unused-but-set-variable -march=native -Werror=incompatible-pointer-types -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -mfma -DLV_HAVE_FMA -Ofast -funroll-loops -fvisibility=hidden -Werror --param large-function-growth=1600
-- CMAKE_CXX_FLAGS is  -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror -Wall -Wno-comment -Wno-reorder -Wno-unused-variable -Wtype-limits -std=c++11 -fno-strict-aliasing -Wno-unused-but-set-variable -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE -fvisibility=hidden -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -Werror
-- Using install prefix: /usr/local
-- Building for version: 21.04.0
--    examples will be installed.
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- Found SCTP: /usr/lib/x86_64-linux-gnu/libsctp.so  
-- No post-build command defined
-- No post-build command defined
-- Building with srsUE
-- No post-build command defined
-- No post-build command defined
-- No post-build-UE command defined
-- Building with srsENB
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-ENB command defined
-- Building with srsEPC
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-EPC command defined
-- Found LibConfig++: /usr/lib/x86_64-linux-gnu/libconfig++.so
-- static LibConfig++ path: /usr/lib/x86_64-linux-gnu/libconfig++.a
-- Found LibConfig: /usr/lib/x86_64-linux-gnu/libconfig.so
-- static LibConfig path: /usr/lib/x86_64-linux-gnu/libconfig.a
-- Checking for module 'sctp'
--   No package 'sctp' found
-- SCTP LIBRARIES: /usr/lib/x86_64-linux-gnu/libsctp.so
-- SCTP INCLUDE DIRS: /usr/include
-- No post-build-ENB command defined
-- Configuring done
-- Generating done

The compilation leads to the following errors

[ 99%] Building CXX object corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o
/home/username/Downloads/corescope/corescope/src/rest_api/scope_rest.cc:23:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wcatch-value"
                                ^~~~~~~~~~~~~~~

.....
[ 99%] Linking CXX executable srsue
[ 99%] Built target srsue
Scanning dependencies of target srsenb
[ 99%] Building CXX object srsRAN/srsenb/src/CMakeFiles/srsenb.dir/main.cc.o
cc1plus: all warnings being treated as errors
corescope/src/CMakeFiles/corescope.dir/build.make:110: recipe for target 'corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o' failed
make[2]: *** [corescope/src/CMakeFiles/corescope.dir/rest_api/scope_rest.cc.o] Error 1
CMakeFiles/Makefile2:17009: recipe for target 'corescope/src/CMakeFiles/corescope.dir/all' failed
make[1]: *** [corescope/src/CMakeFiles/corescope.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....


....
[ 99%] Building CXX object srsRAN/srsenb/src/CMakeFiles/srsenb.dir/metrics_json.cc.o
[ 99%] Linking CXX executable srsenb
[ 99%] Built target srsenb
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

After conducting the tests we obtain the following errors:

$ make test -j $(nproc)
...
98% tests passed, 34 tests failed out of 1468

Label Time Summary:
chest     =  29.94 sec*proc (22 tests)
fec       =   0.53 sec*proc (11 tests)
ldpc      =   0.01 sec*proc (1 test)
lib       = 256.31 sec*proc (1005 tests)
lte       = 230.86 sec*proc (942 tests)
nr        = 115.22 sec*proc (280 tests)
pdcp      =   1.72 sec*proc (3 tests)
phch      =  55.36 sec*proc (485 tests)
phy       = 237.68 sec*proc (1004 tests)
polar     =   0.00 sec*proc (1 test)
rlc       =  26.60 sec*proc (11 tests)
srsenb    =   8.31 sec*proc (10 tests)
srsue     =   1.37 sec*proc (3 tests)
turbo     =   0.52 sec*proc (9 tests)

Total Test time (real) = 392.69 sec

The following tests FAILED:
	 99 - psbch_file_test_ideal_tm2_p6_c0 (Failed)
	100 - psbch_file_test_ideal_tm2_p15_c84 (Failed)
	101 - psbch_file_test_ideal_tm2_p25_c168 (Failed)
	102 - psbch_file_test_ideal_tm2_p50_c252 (Failed)
	103 - psbch_file_test_ideal_tm2_p100_c335 (Failed)
	104 - psbch_file_test_ideal_tm2_p50_c252_ext (Failed)
	105 - psbch_file_test_cmw_tm4_p50_c169 (Failed)
	132 - pssch_pscch_file_test_ideal_tm2_p100 (Failed)
	133 - pssch_pscch_file_test_ideal_tm4_p100 (Failed)
	134 - pssch_pscch_test_tm4_p50_qc (Failed)
	135 - pssch_pscch_test_tm4_p50_cmw (Failed)
	136 - pssch_pscch_test_tm4_p50_huawei (Failed)
	137 - pssch_pscch_test_tm4_p50_uxm1 (Failed)
	138 - pssch_pscch_test_tm4_p100_uxm2 (Failed)
	139 - pssch_pscch_test_tm4_p100_uxm3 (Failed)
	140 - pssch_pscch_test_tm4_p50_uxm4 (Failed)
	577 - sync_sl_test_tm2_p6_c_0 (Failed)
	578 - sync_sl_test_tm2_p15_c_84 (Failed)
	579 - sync_sl_test_tm2_p25_c_168 (Failed)
	580 - sync_sl_test_tm2_p50_c_252 (Failed)
	581 - sync_sl_test_tm2_p100_c_335 (Failed)
	582 - sync_sl_test_tm2_p25_c_168_so (Failed)
	586 - sync_sl_test_tm4_p6_c_0 (Failed)
	587 - sync_sl_test_tm4_p15_c_84 (Failed)
	588 - sync_sl_test_tm4_p25_c_168 (Failed)
	589 - sync_sl_test_tm4_p50_c_252 (Failed)
	590 - sync_sl_test_tm4_p25_c_168_so (Failed)
	1359 - ue_rf_failure (Failed)
	1360 - ue_rf_failure_max_channels (Failed)
	1361 - ue_rf_failure_exceeds_channels (Failed)
	1407 - rrc_nr_test (Not Run)
	1408 - rrc_mobility_test (Not Run)
	1409 - erab_setup_test (Not Run)
	1410 - rrc_meascfg_test (Not Run)
Errors while running CTest
Makefile:140: recipe for target 'test' failed
make: *** [test] Error 8


I have tried to find help on StackOverflow and found the following page, which seems to indicate that there's an error with GCC in the way it handles its flags. However, I'd really like your guidance/insight into this issue.

Thank you.

mrlnc commented

I did not see any ld issues, but I also had to comment out the GCC pragma (gcc 7.5.0 on Ubuntu 18.04).

After fixing that, the corescope binary seems to run just fine despite failing tests (similar to above).

I followed your suggestion and obtained the following output by executing the executable corescope located in folder build/corescope/src

$ ./corescope 
---  Software Radio Systems CoreScope  ---

Couldn't open , trying ~/.config/srsran/corescope.conf
Reading configuration file ~/.config/srsran/corescope.conf...

==== CoreScope started ===
NG connection successful
API server running on port 8000
^CStopping ..
---  exiting  ---