Solvedsrt Compiling on Raspberry Pi 4B: Error 2

remino
2227

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?

22 Answers

✔️Accepted Answer

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!

Other Answers:

@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()

Related Issues:

5
srt Compiling on Raspberry Pi 4B: Error 2
I think I found my solution I’m not sure what was the cause and I’m not why this is related but I fo...
506
electron Requiring electron outside of main.js causes a TypeError
For anyone encountering this problem in the future and reading this thread Electron version: 1.3.5 O...
236
electron Error while importing electron in react | import { ipcRenderer } from 'electron'
@MarshallOfSound my mistake I found the solution in issue #7300 if it can help anyone Please note th...
229
electron Failed to load resource: net::ERR_FILE_NOT_FOUND file:///D:/css/app.css
If this occur when having <base href=/> in the index.html just replace it by <base href=./>. ...
204
electron Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
Try It should output a progress bar for the download 👍 Electron version: latest (That Try) Operatin...
175
electron How do I open a url from <a> on default OS browser?
I found this code snippet on S.O.: Dropped it in my main index file it seems to be working as far as...
139
electron 9.0.0 does not display local images
A recap for anyone else who's having this issue: Make sure you've enabled webSecurity from your Brow...
104
nodegit Can't install via NPM
Latest Xcode just straight up broke things all across the world Try running sudo xcode-select --inst...
103
electron The SUID sandbox helper binary was found, but is not configured correctly
CONFIG_USER_NS=y enables the user namespaces feature but they're still restricted to privileged user...
92
cmder Bad owner or permissions on C:\\Users\\USER/.ssh/config
Ok Since yesterday's windows update (1810) ...
84
nix How to remove nix
To uninstall nix you will need to do the following things: remove the Hi I am using nix on Ubuntu 16...
77
arrayfire NVCC does not support Apple Clang version 8.x
@joseph-zhong it looks like you're using Xcode 8.3 which CUDA (v8.0.61) does not yet support :( Down...
70
electron autoUpdater does not work when have authenticated proxy
I finally got everything working so I just wanted to report back here quickly while I'm waiting for ...
62
electron Can't install electron 1.7.6 in Ubuntu 16.04 environment
try sudo npm install -g electron --unsafe-perm=true --allow-root Electron version:1.7.6 (1.7.8(lates...
62
opencv opencv3.10 does not support cuda8.0rc?
For those people who find this page looking for a way to fix this in their build but can't deal with...
61
kaldi Is there any speaker diarization documentation and already trained model?
@iacoshoria the recipe is not bound to this dataset We are talking about making a diarization recipe...
60
electron No Cut/Copy/Paste context menus on <input> fields
Adding context menus to all inputs/textarea's is simple: Just put that in render process somewhere ...
59
electron app.getVersion returns electron binary version instead of package.json field
In development the version returned by app.getVersion() depends on how you launched your app ...
59
opencv Cannot make install opencv from origin/master on ubuntu 17.10
@zapcity @Guilmort you may have to manually execute the generator script (gen2.py) Assuming you call...
57
electron Behind proxy, installation failed with 7.0.0, but works with 6.1.2
The workaround of specifying environment variables from castlabs/electron-releases#45 (comment) work...
56
electron Could not get code signature for running application
Building on @erynkyo I've found that you don't need to create a new key and can ad-hoc code sign by ...
51
electron mainWindow.webContents.openDevTools() throws error when loading new page
+1 happens after every reload but only if devtools is open I don't specify to open devtools from the...
50
opencv cv2.rectangle() TypeError: an integer is required (got type tuple)
The error message is completely wrong as always I think the cause of this error may be the case when...
49
electron Not allowed to load local resource
@isurendrasingh Add this configuration when you instantiate the BrowserWindow. Electron Version: 2.0...
45
cmder Can no longer use ssh-add: Error connecting to agent
try which ssh-agent Windows 1803 comes with their own OpenSSH version by default now you probably wa...
44
electron Electron apps can't find libcurl.so.4
@loveencounterflow I had the same issue on Linux Mint 18 Cinnamon sudo apt-get install curl libcurl3...
37
electron Getting started ... or not?
@ZelphirKaltstahl do you have node_modules/.bin on your PATH? I think that is one assumption the ins...
36
cmder Support new windows 10 1903 Terminal
To add cmder as a new terminal add this profile in the json settings Full settings example with cmde...
36
electron systemPreferences.askForMediaAccess(mediaType) causes app to crash in macOS Mojave
@fgladisch The TCC log indicates that the entitlement is correctly set The app crashes regardless ...
34
electron How to catch errors occured in the main process?
To to catch errors that occure in the main process you can use: When you set a listener for uncaught...
34
electron BrowserWindow preload script not executed
This works for me: Hello I have downloaded the atom/electron-quick-start and changed the main.js to ...
34
electron Distinguishing "development" from "production"
For us it has always been easy to do with minimal code This solution works in both the main and rend...
31
nix Error: cloning builder process: Operation not permitted installing Nix 2.2.1 in (Arch) Linux
I had the same problem I think it has something to do with archlinux not having kernel user namespac...
31
electron [Discussion] Requiring Native Modules in the Renderer Process to be NAPI or Context Aware
Is there a way to suppress the deprecation warning? I am upgrading to electron 7.x and plan to updat...
29
electron electron.d.ts does not work with @types/node v13.1.0
Run npm install --save --save-exact @types/node@^12.12.6 It works afterward (even with Electron v8.2...
27
electron How do I change the name of the electron window?
The first answer isn't clear enough Here's the secret sauce 👍 👍 At first tried changing just the m...
26
electron How to inject jquery into Browserwindow
Okay so disregard what I said above It doesn't appear you can inject jQuery like that in a webview p...
26
electron Disable zoom
If you are looking for a way how to prevent zoom from main process you can use: ...
25
electron Notification API do not work with Windows 10 16299.19 (fall creators update)
I think I found a fix! Calling app.setAppUserModelId(<my app id>) suddenly fixes my notifications ...
25
opencv Incorrect error message for non-integer points in rectangle draw function: TypeError: function takes exactly 4 arguments (2 given)
I got the same issue I resolved it by converting all the coordinate of the bounding box into int ins...
25
opencv GCC 6.0/6.x build problems
This workaround works in some cases (see #6541): cmake -DENABLE_PRECOMPILED_HEADERS=OFF ... ...
24
cmder W10 - problem on starting \conemu-maximus5\..\init.bat is not recognized
@lamapidu @cosmicmarkup Check that your antivirus is not quarantining init.bat when you extract the ...
24
electron node Integration is set to false, but I need the renderer process and the main process communication
When you spawn your browser window set the preload option to a script you wish to preload: Then in t...
23
opencv BUG:TypeError: Expected Ptr<cv::UMat> for argument 'img'
Somehow img = np.array(img) still doesn't work for me but img = img.copy() works. ...
22
scylla Docker images are broken
I can also confirm it starts to work applying this: After this change no restart it works fine. ...
20
opencv ‘memcpy’ was not declared in this scope (Ubuntu 16.04)
Simple replace in opencv/cmake/OpencvDetectCuda.cmake to it's work for me! Please state the informat...
19
cmder Virtualenv in Powershell cannot be activated
I face the same problem Thanks I confirm that removing -Options ReadOnly from Set-Item -Path functio...
19
cmder Failed to backup ConEmu.xml file to ./config folder! Needs admin privileges?
this happens when cmder is installed in C:\Program Files\Cmder to write to this path the system need...
18
bitcoin test: Remove sync_blocks global
Thanks @brakmic and everyone else for working on issues and making improvements ...
18
electron Using electron and React
You actually posted few seconds before my response 😄 I will put it here anyway as an alternative ap...