Error building raspberry pi bullseye

Trying to build on raspberry pi 3 latest bullseye with:

cmake -DALLOW_DOWNLOADS=ON -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON  -DUSE_SYSTEM_CIVETWEB=OFF -DDCMTK_LIBRARIES=dcmjpls -DCMAKE_BUILD_TYPE=Release    ../OrthancServer/

after make I’m getting:

[ 96%] Building CXX object CMakeFiles/MultitenantDicom.dir/AUTOGENERATED/MultitenantDicomResources.cpp.o
[ 96%] Linking CXX shared library libMultitenantDicom.so
/usr/bin/ld: libPluginsDependencies.a(threads_pthread.c.o): in function `CRYPTO_atomic_or':
threads_pthread.c:(.text+0x178): undefined reference to `__atomic_is_lock_free'
/usr/bin/ld: threads_pthread.c:(.text+0x1fc): undefined reference to `__atomic_fetch_or_8'
/usr/bin/ld: libPluginsDependencies.a(threads_pthread.c.o): in function `CRYPTO_atomic_load':
threads_pthread.c:(.text+0x238): undefined reference to `__atomic_is_lock_free'
/usr/bin/ld: threads_pthread.c:(.text+0x288): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/MultitenantDicom.dir/build.make:234: libMultitenantDicom.so.1.12.3] Error 1
make[1]: *** [CMakeFiles/Makefile2:177: CMakeFiles/MultitenantDicom.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Any ideas much appreciated!

Hello,

This looks similar to the following discussion: ARM Raspbian 3.x fails to build _testcapi extension: undefined symbol: __atomic_fetch_or_8 · Issue #109054 · python/cpython · GitHub

As discussed on this page, you could try and add -latomic as a linker flag.

Also note that an official Debian bullseye package exists for Orthanc (which is thus usable in Raspbian): Debian -- Details of package orthanc in bullseye

Regards,
Sébastien-