changeset 4747:24dbf3f013d9

explicit linking against -lstdc++ and -lm for Linux Standard Base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Jul 2021 12:56:18 +0200
parents 0d57277aa54c
children 4336642b8cff
files OrthancFramework/Resources/CMake/Compiler.cmake
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake	Thu Jul 08 10:59:32 2021 +0200
+++ b/OrthancFramework/Resources/CMake/Compiler.cmake	Thu Jul 08 12:56:18 2021 +0200
@@ -42,6 +42,14 @@
   # use by "ExternalProject" in CMake
   SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "")
   SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "")
+
+  # Explicitly adding "-lstdc++ -lm" during linking for LSB had to be
+  # introduced on the BuildBot server for LSB Release builds between
+  # "OrthancMySQL-4.0" and "OrthancMySQL-4.1" and after
+  # "Orthanc-1.9.5", for unclear reasons. Without this option, many
+  # symbols are left undefined while linking. Similar to:
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14001
+  link_libraries(stdc++ m)
 endif()