srt: Compiling on Raspberry Pi 4B: Error 2

Anyone has issues compiling srt on a Raspberry Pi 4B?

When looking around, it seems installing srt on a Raspberry Pi usually isn’t a problem. But somehow it’s not working for me. I followed the instructions for Ubuntu on the README and that seems to be enough for most people:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential
./configure
make

My installation fails at make with Error 2. I’ve pasted the output of ./configure and make below:

Running: cmake .
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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  
-- BUILD TYPE: Release
-- LOGGING: ENABLED
-- USE_BUSY_WAITING: OFF (default)
-- No WITH_COMPILER_PREFIX - using C++ compiler /usr/bin/c++
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Checking for module 'openssl libcrypto'
--   Found openssl libcrypto, version 1.1.1d;1.1.1d
-- SSL via pkg-config: -L  -I  -l;ssl;crypto
-- ENCRYPTION: ENABLED, using: openssl libcrypto
-- SSL libraries: ssl;crypto
-- COMPILER: GNU (/usr/bin/c++) - GNU compat
-- NOTE: GNU 8.3.0 - assuming default C++11.
-- STDCXX_SYNC: OFF
-- DETECTED SYSTEM: LINUX;  LINUX=1
-- APP: srt_virtual: using default C++ standard
-- ADDING TRANSITIVE LINK DEP to:srt_shared : -lpthread 
-- ADDING TRANSITIVE LINK DEP to:srt_static : -lpthread 
-- INSTALL DIRS: bin=bin lib=lib shlib=lib include=include
-- APPS: ENABLED, std=
-- APP: srtsupport_virtual: using default C++ standard
-- APP: srt-live-transmit: using default C++ standard
-- APP: srt-file-transmit: using default C++ standard
-- APP: srt-tunnel: using default C++ standard
-- DEVEL APPS (testing): DISABLED
-- Configuring done
-- Generating done
-- Build files have been written to: /root/srt
Scanning dependencies of target srt_virtual
[  1%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/api.cpp.o
[  3%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/buffer.cpp.o
[  5%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/cache.cpp.o
[  7%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/channel.cpp.o
[  9%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/common.cpp.o
[ 11%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/core.cpp.o
In file included from /usr/include/c++/8/deque:66,
                 from /usr/include/c++/8/queue:60,
                 from /root/srt/srtcore/queue.h:63,
                 from /root/srt/srtcore/core.cpp:65:
/usr/include/c++/8/bits/deque.tcc: In function ‘std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move_backward(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>) [with _Tp = CRcvFreshLoss]’:
/usr/include/c++/8/bits/deque.tcc:1072:5: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
     move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
     ^~~~~~~~~~~~~
/usr/include/c++/8/bits/deque.tcc:1072:5: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/deque.tcc: In function ‘std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>) [with _Tp = CRcvFreshLoss]’:
/usr/include/c++/8/bits/deque.tcc:1049:5: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
     ^~~~
/usr/include/c++/8/bits/deque.tcc:1049:5: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
In file included from /usr/include/c++/8/deque:64,
                 from /usr/include/c++/8/queue:60,
                 from /root/srt/srtcore/queue.h:63,
                 from /root/srt/srtcore/core.cpp:65:
/usr/include/c++/8/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_erase(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator) [with _Tp = CRcvFreshLoss; _Alloc = std::allocator<CRcvFreshLoss>]’:
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
     __result); }
             ^
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
          __result); }
                  ^
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_erase(std::deque<_Tp, _Alloc>::iterator) [with _Tp = CRcvFreshLoss; _Alloc = std::allocator<CRcvFreshLoss>]’:
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
     __result); }
             ^
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
          __result); }
                  ^
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h: In member function ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::_M_insert_aux(std::deque<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {CRcvFreshLoss}; _Tp = CRcvFreshLoss; _Alloc = std::allocator<CRcvFreshLoss>]’:
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
          __result); }
                  ^
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:430:18: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
     __result); }
             ^
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
/usr/include/c++/8/bits/stl_deque.h:447:13: note: parameter passing for argument of type ‘std::_Deque_iterator<CRcvFreshLoss, const CRcvFreshLoss&, const CRcvFreshLoss*>’ changed in GCC 7.1
[ 13%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/crypto.cpp.o
[ 15%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/epoll.cpp.o
[ 16%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/fec.cpp.o
[ 18%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/handshake.cpp.o
[ 20%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/list.cpp.o
[ 22%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/logger_default.cpp.o
[ 24%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/logger_defs.cpp.o
[ 26%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/md5.cpp.o
[ 28%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/packet.cpp.o
[ 30%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/packetfilter.cpp.o
[ 32%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/queue.cpp.o
[ 33%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/congctl.cpp.o
[ 35%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/socketconfig.cpp.o
[ 37%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/srt_c_api.cpp.o
[ 39%] Building C object CMakeFiles/srt_virtual.dir/srtcore/srt_compat.c.o
[ 41%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/strerror_defs.cpp.o
[ 43%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/sync.cpp.o
[ 45%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/tsbpd_time.cpp.o
[ 47%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/window.cpp.o
[ 49%] Building CXX object CMakeFiles/srt_virtual.dir/srtcore/sync_posix.cpp.o
[ 50%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/cryspr.c.o
[ 52%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/cryspr-openssl.c.o
[ 54%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt.c.o
[ 56%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_ctx_rx.c.o
[ 58%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_ctx_tx.c.o
[ 60%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_rx.c.o
[ 62%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_sa.c.o
[ 64%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_tx.c.o
[ 66%] Building C object CMakeFiles/srt_virtual.dir/haicrypt/hcrypt_xpt_srt.c.o
[ 67%] Building CXX object CMakeFiles/srt_virtual.dir/haicrypt/haicrypt_log.cpp.o
[ 67%] Built target srt_virtual
Scanning dependencies of target srt_static
[ 69%] Building C object CMakeFiles/srt_static.dir/cmake_object_lib_support.c.o
[ 71%] Linking CXX static library libsrt.a
[ 71%] Built target srt_static
Scanning dependencies of target srtsupport_virtual
[ 73%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/apputil.cpp.o
[ 75%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/logsupport.cpp.o
[ 77%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/logsupport_appdefs.cpp.o
[ 79%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/socketoptions.cpp.o
[ 81%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/transmitmedia.cpp.o
[ 83%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/uriparser.cpp.o
[ 84%] Building CXX object CMakeFiles/srtsupport_virtual.dir/apps/verbose.cpp.o
[ 84%] Built target srtsupport_virtual
Scanning dependencies of target srt-tunnel
[ 86%] Building CXX object CMakeFiles/srt-tunnel.dir/apps/srt-tunnel.cpp.o
[ 88%] Linking CXX executable srt-tunnel
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::open()':
core.cpp:(.text+0xf60): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xfa4): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xfe4): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x1010): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x1064): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::bstats(CBytePerfMon*, bool, bool)':
core.cpp:(.text+0x7bd4): undefined reference to `__atomic_load_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::construct()':
core.cpp:(.text+0x80ec): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::checkExpTimer(srt::sync::TimePoint<srt::sync::steady_clock> const&, int)':
core.cpp:(.text+0x874c): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0x8774): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0x888c): undefined reference to `__atomic_load_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::updateCC(ETransmissionEvent, EventVariant)':
core.cpp:(.text+0x9338): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::setupCC()':
core.cpp:(.text+0x9ab0): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x9af0): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x9b2c): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x9b54): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o):core.cpp:(.text+0xb1d4): more undefined references to `__atomic_store_8' follow
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::packData(srt::CPacket&)':
core.cpp:(.text+0xc624): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0xc654): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xc86c): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xc9f8): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xcb2c): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0xcb40): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0xcb80): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xcba8): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0xcce4): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::checkACKTimer(srt::sync::TimePoint<srt::sync::steady_clock> const&)':
core.cpp:(.text+0xcfac): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0xd0c4): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::checkNAKTimer(srt::sync::TimePoint<srt::sync::steady_clock> const&)':
core.cpp:(.text+0xd1d8): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0xd244): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::checkTimers()':
core.cpp:(.text+0xd2e4): undefined reference to `__atomic_load_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processConnectResponse(srt::CPacket const&, CUDTException*)':
core.cpp:(.text+0x17b1c): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x17d38): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processAsyncConnectResponse(srt::CPacket const&)':
core.cpp:(.text+0x181fc): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processRendezvous(srt::CPacket const*, sockaddr_any const&, EReadStatus, srt::CPacket&)':
core.cpp:(.text+0x186b0): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x18804): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o):core.cpp:(.text+0x18994): more undefined references to `__atomic_store_8' follow
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::startConnect(sockaddr_any const&, int)':
core.cpp:(.text+0x19534): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0x195ac): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processCtrlHS(srt::CPacket const&)':
core.cpp:(.text+0x1a750): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processCtrl(srt::CPacket const&)':
core.cpp:(.text+0x1bac0): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x1bb6c): undefined reference to `__atomic_load_8'
/usr/bin/ld: core.cpp:(.text+0x1bbc8): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::CUDT::processData(srt::CUnit*)':
core.cpp:(.text+0x1c368): undefined reference to `__atomic_store_8'
/usr/bin/ld: core.cpp:(.text+0x1d4b0): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(core.cpp.o): in function `srt::sync::AtomicClock<srt::sync::steady_clock>::operator=(srt::sync::TimePoint<srt::sync::steady_clock> const&)':
core.cpp:(.text._ZN3srt4sync11AtomicClockINS0_12steady_clockEEaSERKNS0_9TimePointIS2_EE[_ZN3srt4sync11AtomicClockINS0_12steady_clockEEaSERKNS0_9TimePointIS2_EE]+0x24): undefined reference to `__atomic_store_8'
/usr/bin/ld: libsrt.a(queue.cpp.o): in function `srt::CRendezvousQueue::qualifyToHandle(EReadStatus, EConnectStatus, int, std::vector<srt::CRendezvousQueue::LinkStatusInfo, std::allocator<srt::CRendezvousQueue::LinkStatusInfo> >&, std::vector<srt::CRendezvousQueue::LinkStatusInfo, std::allocator<srt::CRendezvousQueue::LinkStatusInfo> >&)':
queue.cpp:(.text+0x2f00): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/srt-tunnel.dir/build.make:99: srt-tunnel] Error 1
make[1]: *** [CMakeFiles/Makefile2:89: CMakeFiles/srt-tunnel.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Some details about the OS on my Raspberry Pi 4B:

# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (1 by maintainers)

Most upvoted comments

I think I found my solution. I’m not sure what was the cause, and I’m not why this is related, but I found this comment describing a similar problem. It suggested to add the following to CMakeLists.txt:

set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")

And oddly enough, that worked!

@623637646 Thank you, I have reproduced the issue running the following on MacOS:

./configure --cmake-toolchain-file=scripts/iOS.cmake --disable-encryption
make

Relevant CMake variables:

-- HAVE_LIBATOMIC 1
-- HAVE_GCCATOMIC_INTRINSICS 1
-- HAVE_GCCATOMIC_INTRINSICS_REQUIRES_LIBATOMIC 
-- HAVE_GCCATOMIC_INTRINSICS_STATIC 
-- HAVE_GCCATOMIC_INTRINSICS_STATIC_REQUIRES_LIBATOMIC 
-- HAVE_CXX_ATOMIC 1
-- HAVE_CXX_ATOMIC_STATIC

libatomic is added in dependencies here:

if (HAVE_GCCATOMIC_INTRINSICS
	AND HAVE_LIBATOMIC)
	target_link_libraries(${TARGET_srt}_static PUBLIC atomic)
endif()

But it is actually missing in the target toolchain:

ld: library not found for -latomic
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Temporal Workaround

As a temporal workaround you could comment-out the atomic linking.

if (HAVE_GCCATOMIC_INTRINSICS AND HAVE_LIBATOMIC)
	#target_link_libraries(${TARGET_srt}_static PUBLIC atomic)
endif()

or change to:

if (HAVE_GCCATOMIC_INTRINSICS_REQUIRES_LIBATOMIC AND HAVE_LIBATOMIC)
	target_link_libraries(${TARGET_srt}_static PUBLIC atomic)
endif()

thanks,now,srt can been loaded

发自我的iPhone

在 2021年9月2日,19:24,Maxim Sharabayko @.***> 写道:

@Jessica-Mao Could you try with PR #2114? It could be that there is atomic.so somewhere in your system, but the loader fails to load it. In that case you would need to set LD_LIBRARY_PATH. However, “undefined symbol” is more a linker error, which one would not expect loading a built library. Could you share the result of ldd /usr/local/lib/libsrt.so.1.4?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

@maxsharabayko I’ll PM you the login details later today.