# HG changeset patch # User Sebastien Jodogne # Date 1703237347 -3600 # Node ID e7a04f878704715e1e4d77921d0a3a00107f8cdc # Parent dc8e5c65be9988e5c3ad11bf4704d071a63a3cb4 fix build of Orthanc Framework shared library on LSB diff -r dc8e5c65be99 -r e7a04f878704 OrthancFramework/Resources/CMake/Compiler.cmake --- a/OrthancFramework/Resources/CMake/Compiler.cmake Wed Dec 20 18:59:08 2023 +0100 +++ b/OrthancFramework/Resources/CMake/Compiler.cmake Fri Dec 22 10:29:07 2023 +0100 @@ -43,6 +43,13 @@ # use by "ExternalProject" in CMake SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "") SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "") + + # This is necessary to build "Orthanc mainline - Framework LSB + # Release" on "buildbot-worker-debian11" + set(LSB_PTHREAD_NONSHARED "${LSB_PATH}/lib64-${LSB_TARGET_VERSION}/libpthread_nonshared.a") + if (EXISTS ${LSB_PTHREAD_NONSHARED}) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LSB_PTHREAD_NONSHARED}") + endif() endif() @@ -130,9 +137,11 @@ # The "--no-undefined" linker flag makes the shared libraries # (plugins ModalityWorklists and ServeFolders) fail to compile on # OpenBSD, and make the PostgreSQL plugin complain about missing - # "environ" global variable in FreeBSD. Furthermore, on Linux - # Standard Base running on Debian 12, the "-Wl,--no-undefined" - # breaks the compilation (added after Orthanc 1.12.2). + # "environ" global variable in FreeBSD. + # + # TODO - Furthermore, on Linux Standard Base running on Debian 12, + # the "-Wl,--no-undefined" seems to break the compilation (added + # after Orthanc 1.12.2). This is disabled for now. set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") endif()