Source: opm-common
Version: 2025.04+ds-1
Severity: serious
Tags: ftbfs patch
User: [email protected]
Usertags: ieee-long-double

Hi Maintainer

We are working on https://wiki.debian.org/ToolChain/IEEELongDouble

The attached patches (one for opm-common and one for opm-simulators)
were applied in Ubuntu after some discussion with upstream.

Regards
Graham
Description: Disable quadmath to fix ppc64el build failure
Author: Gianfranco Costamagna <[email protected]>
Last-Update: 2025-08-28

Index: opm-common-2025.04+ds/CMakeLists.txt
===================================================================
--- opm-common-2025.04+ds.orig/CMakeLists.txt
+++ opm-common-2025.04+ds/CMakeLists.txt
@@ -175,7 +175,9 @@ macro (sources_hook)
     list(INSERT opm-common_SOURCES 0 ${PYTHON_DOCSTRINGS_GENERATED_HPP})
   endif()
 
-  if(QuadMath_FOUND)
+  EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
+  message( STATUS "Architecture: ${ARCHITECTURE}" )
+  if(QuadMath_FOUND AND NOT ${ARCHITECTURE} MATCHES "ppc64")
     get_target_property(qm_defs QuadMath::QuadMath INTERFACE_COMPILE_DEFINITIONS)
     list(APPEND qm_defs HAVE_QUAD=1)
     get_target_property(qm_options QuadMath::QuadMath INTERFACE_COMPILE_OPTIONS)
Description: Disable quadmath to fix ppc64el build failure
Author: Gianfranco Costamagna <[email protected]>
Last-Update: 2025-08-28

--- opm-simulators-2025.04+ds.orig/CMakeLists.txt
+++ opm-simulators-2025.04+ds/CMakeLists.txt
@@ -368,7 +368,9 @@ macro (sources_hook)
     include(opencl-source-provider)
     list(APPEND opm-simulators_SOURCES ${PROJECT_BINARY_DIR}/clSources.cpp)
   endif()
-  if(QuadMath_FOUND)
+  EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
+  message( STATUS "Architecture: ${ARCHITECTURE}" )
+  if(QuadMath_FOUND AND NOT ${ARCHITECTURE} MATCHES "ppc64")
     get_target_property(qm_defs QuadMath::QuadMath INTERFACE_COMPILE_DEFINITIONS)
     list(APPEND qm_defs HAVE_QUAD=1)
     get_target_property(qm_options QuadMath::QuadMath INTERFACE_COMPILE_OPTIONS)
@@ -471,7 +471,7 @@ opm_add_test(lens_immiscible_ecfv_ad_mcu
               opmsimulators opmcommon
              ONLY_COMPILE)
 
-if(QuadMath_FOUND)
+if(QuadMath_FOUND AND NOT ${ARCHITECTURE} MATCHES "ppc64")
   foreach(tapp co2injection_flash_ni_ecfv
                co2injection_flash_ni_vcfv
                co2injection_flash_ecfv

Reply via email to