Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tetgen] branch 4.1 does not compile on unix #856

Open
mathildemerle opened this issue Jun 7, 2024 · 1 comment
Open

[Tetgen] branch 4.1 does not compile on unix #856

mathildemerle opened this issue Jun 7, 2024 · 1 comment

Comments

@mathildemerle
Copy link

mathildemerle commented Jun 7, 2024

On Ubuntu 20, 22 and Fedora we have this compilation error:

/usr/bin/ld: /home/mathildemerle/Dev/MUSICardio4.1/medInria-public_ExtProjs/build/tetgen/lib/libtet.a(tetgen.cxx.o): warning: relocation against `_ZTIi@@CXXABI_1.3' in read-only section `.text.unlikely'
/usr/bin/ld: /home/mathildemerle/Dev/MUSICardio4.1/medInria-public_ExtProjs/build/tetgen/lib/libtet.a(tetgen.cxx.o): relocation R_X86_64_PC32 against symbol `_ZTIi@@CXXABI_1.3' can not be used when making a shared object; recompilé avec -fPIC
/usr/bin/ld : échec de l'édition de liens finale : bad value

Which is due to this synchronisation PR from medInria #845
And specially to:

diff --git a/superbuild/external_projects_tools/EP_Initialisation.cmake b/superbuild/external_projects_tools/EP_Initialisation.cmake
index a454b6f23..61f388cd4 100644
--- a/superbuild/external_projects_tools/EP_Initialisation.cmake
+++ b/superbuild/external_projects_tools/EP_Initialisation.cmake
@@ -14,23 +14,23 @@
 macro(ep_Initialisation ep)
 
 cmake_parse_arguments(ep_Initialisation
-    "NO_CMAKE_PACKAGE"
+    "NO_CONFIG_FILE"
     "USE_SYSTEM;BUILD_SHARED_LIBS;REQUIRED_FOR_PLUGINS;PACKAGE_NAME"
     ""
     ${ARGN}
     )
 
-if (NOT ep_Initialisation_USE_SYSTEM)
-    set(ep_Initialisation_USE_SYSTEM OFF)
-endif()
+# if (NOT ep_Initialisation_USE_SYSTEM)
+#     set(ep_Initialisation_USE_SYSTEM OFF)
+# endif()
 
-if (NOT ep_Initialisation_BUILD_SHARED_LIBS)
-    set(ep_Initialisation_BUILD_SHARED_LIBS ON)
-endif()
+# if (NOT ep_Initialisation_BUILD_SHARED_LIBS)
+#     set(ep_Initialisation_BUILD_SHARED_LIBS ON)
+# endif()
 
-if (NOT ep_Initialisation_REQUIRED_FOR_PLUGINS)
-    set(ep_Initialisation_REQUIRED_FOR_PLUGINS OFF)
-endif()
+# if (NOT ep_Initialisation_REQUIRED_FOR_PLUGINS)
+#     set(ep_Initialisation_REQUIRED_FOR_PLUGINS OFF)
+# endif()
 
 if (NOT ep_Initialisation_PACKAGE_NAME)
     set(ep_Initialisation_PACKAGE_NAME ${ep})
@@ -47,8 +47,10 @@ option(USE_SYSTEM_${ep}
 
 if (USE_SYSTEM_${ep})
 
-    if(NOT ep_Initialisation_NO_CMAKE_PACKAGE)
-        find_package(${ep_Initialisation_PACKAGE_NAME} REQUIRED)
+  if(NOT ep_Initialisation_NO_CONFIG_FILE)
+  find_package(${ep_Initialisation_PACKAGE_NAME} REQUIRED
+      PATH_SUFFIXES install build
+      )
 
 ## #############################################################################
 ## Complete superProjectConfig.cmake
@@ -71,30 +73,28 @@ else()
 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
-  if(NOT ep_Initialisation_NO_CMAKE_PACKAGE)
-      if (ep_Initialisation_REQUIRED_FOR_PLUGINS)
-          if (DEFINED ${ep}_BINARY_DIR)
-              file(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
-                  "find_package(${ep_Initialisation_PACKAGE_NAME} REQUIRED
-                      PATHS \"${${ep_Initialisation_PACKAGE_NAME}_BINARY_DIR}\"
-                      PATH_SUFFIXES install build
-                      )\n"
-                  )
-          else()
-              if(DEFINED EP_PATH_BUILD)
-                  set(build_dir ${EP_PATH_BUILD})
-              else()
-                  set(build_dir "${EP_PATH_SOURCE}/${ep}-build" )
-              endif()
-
-              file(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
-                  "find_package(${ep} REQUIRED
-                      PATHS \"${build_dir}\"
-                      PATH_SUFFIXES install build
-                      )\n"
-                  )
-          endif()
-      endif()
+  if (ep_Initialisation_REQUIRED_FOR_PLUGINS)
+    if (DEFINED ${ep}_BINARY_DIR)
+      file(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
+      "find_package(${ep_Initialisation_PACKAGE_NAME} REQUIRED
+        PATHS \"${${ep_Initialisation_PACKAGE_NAME}_BINARY_DIR}\"
+        PATH_SUFFIXES install build
+        )\n"
+      )
+    else()
+    if(DEFINED EP_PATH_BUILD)
+        set(build_dir ${EP_PATH_BUILD})
+    else()
+        set(build_dir "${EP_PATH_SOURCE}/${ep}-build" )
+    endif()
+
+      file(APPEND ${${PROJECT_NAME}_CONFIG_FILE}
+        "find_package(${ep} REQUIRED
+          PATHS \"${build_dir}\" 
+          PATH_SUFFIXES install build
+          )\n"
+        )
+    endif()
   endif()
 
 
diff --git a/superbuild/projects_modules/qwt.cmake b/superbuild/projects_modules/qwt.cmake
index 8353a2bff..642b8cf97 100644
--- a/superbuild/projects_modules/qwt.cmake
+++ b/superbuild/projects_modules/qwt.cmake
@@ -16,7 +16,7 @@ EP_Initialisation(${ep}
   USE_SYSTEM OFF 
   BUILD_SHARED_LIBS OFF
   REQUIRED_FOR_PLUGINS ON
-  NO_CMAKE_PACKAGE
+  NO_CONFIG_FILE
 )
 
 if (NOT USE_SYSTEM_${ep})

-> red: does not compile, green: compile

edit: the original diff included medInria#1216 and medInria#1214 but it seems it's the second one that create the compilation error.

@mathildemerle
Copy link
Author

I edited the diff part with only the remaining problematic code.
The compilation error seems to be due to this PR which has been done on medInria: medInria#1214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant