#1150537 madness: FTBFS: unrecognized argument to '-flto=' option

Package:
madness
Source:
madness
Submitter:
Viktor Pashaiev
Date:
2026-10-10 14:17:04 UTC
Severity:
normal
Tags:
#1150537#5
Date:
2026-10-10 14:15:16 UTC
From:
To:
Dear Maintainer,

madness fails to build from source on Ubuntu 26.10:

cc1plus: error: unrecognized argument to '-flto=' option: 'auto -ffat-lto-objects'

Root cause:
MPI_COMPILE_FLAGS returned by CMake FindMPI contains space-delimited flags leaked by mpich wrappers. In src/madness/CMakeLists.txt, passing quoted "${MPI_COMPILE_FLAGS}" without separate_arguments() causes CMake to pass all flags as a single compiler argument to g++.

Fix:
Split MPI_COMPILE_FLAGS using separate_arguments() in external/mpi.cmake and remove quotes in target_compile_options() in src/madness/CMakeLists.txt.

The patch is attached.

Best regards,
Viktor Pashaiev