5G-MAG / rt-mbms-modem

MBMS - Modem
https://www.5g-mag.com/5gbroadcast
GNU Affero General Public License v3.0
13 stars 12 forks source link

rt-mbms-modem / compilation for Tiger Lake CPU ? #17

Closed m-bures closed 2 years ago

m-bures commented 2 years ago

Describe the “bug” Laptop Ubuntu 20.04 SDR - BladeRF 2.0 micro xA4

Hello Community,

I tried to compile the receive process (modem) on a new NB but I ran into difficulties as the default compiler did not support Tiger Lake processors that is in the notebook (specifically there is 11th generation of Intel - Xeon Processor W-11955M (8 Core, 24MB Cache, 2.60GHz to 5.00GHz, 45W, vPro)) – see the enclosed report.

So, I installed newer compilers gcc-10 and g++-10 and set the compilers manually. I was able to get further (no Tiger Lake errors) but I the compilation ended with other type of error, report from ninja:

-- Generating build_info.h [473/515] Building CXX object lib/srsl...c_common_test.dir/rlc_common_test.cc.o FAILED: lib/srslte/lib/test/upper/CMakeFiles/rlc_common_test.dir/rlc_common_test.cc.o /bin/g++-10 -DENABLE_TIMEPROF -DHAVE_MBEDTLS -I/usr/include/SoapySDR -I/home/obeca/rt-mbms-modem/build/lib/srslte/lib/include -I/home/obeca/rt-mbms-modem/lib/srslte/lib/include -I/home/obeca/rt-mbms-modem/lib/srslte/lib/src/srslog/bundled/fmt/../../../../include/srslte/srslog/bundled -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 -march=native -mavx512f -mavx512cd -mavx512bw -mavx512dq -DLV_HAVE_AVX512 -fdiagnostics-color=always -Werror -O3 -DNDEBUG -fPIE -std=gnu++17 -MD -MT lib/srslte/lib/test/upper/CMakeFiles/rlc_common_test.dir/rlc_common_test.cc.o -MF lib/srslte/lib/test/upper/CMakeFiles/rlc_common_test.dir/rlc_common_test.cc.o.d -o lib/srslte/lib/test/upper/CMakeFiles/rlc_common_test.dir/rlc_common_test.cc.o -c /home/obeca/rt-mbms-modem/lib/srslte/lib/test/upper/rlc_common_test.cc /home/obeca/rt-mbms-modem/lib/srslte/lib/test/upper/rlc_common_test.cc: In constructor ‘rlc_tester::rlc_tester()’: /home/obeca/rt-mbms-modem/lib/srslte/lib/test/upper/rlc_common_test.cc:44:29: error: ‘void bzero(void*, size_t)’ clearing an object of type ‘srslte::unique_byte_buffer_t’ {aka ‘class std::unique_ptr<srslte::byte_buffer_t, srslte::byte_buffer_deleter>’} with no trivial copy-assignment [-Werror=class-memaccess] 44 | bzero(sdus, sizeof(sdus)); | ^

Is there a way how to successfully compile the receive process for Tiger Lake CPUs so that we could install modem app. on the notebook ?

Anybody else tried to use Tiger Lake CPUs for the receive process ?

Thank you for any feedback

Michal

Tigel_Lake.zip

kuehnhammer commented 2 years ago

Seeing as this error happens in a part of srsLTE we don't need, it might be worth a try to comment out the examples and test directories in /lib/srslte/lib/CMakeLists.txt:

########################################################################
# Add subdirectories
########################################################################
add_subdirectory(src)
add_subdirectory(include)
#add_subdirectory(examples)
#add_subdirectory(test)

Can you maybe try if it progresses further that way?

kuehnhammer commented 2 years ago

@jsroldan -- adding you as this seems similar to the issue you were having.

jsroldan commented 2 years ago

I've tried that solution and it works. But if you still want to compile the examples and tests the workaround that I've found is to comment the next lines in the /lib/srslte/CMakeLists.txt file:

# Add -Werror to C/C++ flags for newer compilers
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
        #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
        #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()

Just deleting the flag to avoid to treat all warnings as errors, but maybe is not the best option since the compiler bothers about bzero() function use.

m-bures commented 2 years ago

Commenting out examples and test subdirectories helped and we were able to complete the compilation without these directories. Now it can be used on TigerLake CPUs.

Thanks to Klaus and Jaime

dsilhavy commented 2 years ago

Thanks for the updates, I am closing this. To summarize, the answer for this issue was provided by @kuehnhammer and @jsroldan here: https://github.com/5G-MAG/rt-mbms-modem/issues/17#issuecomment-980046635 and here: https://github.com/5G-MAG/rt-mbms-modem/issues/17#issuecomment-989684306