Skip to content

MUMPS: compile without LTO - #241

Merged
sjoelund merged 1 commit into
masterfrom
mumps-no-lto
Sep 23, 2026
Merged

sjoelund merged 1 commit into
masterfrom
mumps-no-lto

Conversation

@sjoelund

Copy link
Copy Markdown
Member

The el10 rpm build gets -flto=auto -ffat-lto-objects from the distribution's flags, and with its GCC 14.3 / binutils 2.41 every link against the MUMPS archives loses Fortran symbols that are defined in them. libmoo.so fails first:

mumps_comm_buffer_common.F:150: undefined reference to `mpi_test_'
dmumps_driver.F:502: undefined reference to `mpi_initialized_'

libmumps_common.a and libseq.a both define those symbols (nm shows T mpi_test_); the definitions go missing in the LTO link. Compiling only the libseq stubs without LTO just moves the error to dmumps_ana_driver_ and friends, and the MUMPS demos, which do not use moo's --exclude-libs,ALL, fail the same way. That was the el10 demo failure that 3b8d7b2 worked around; the old comment blaming a missing MPI symbol set was wrong. fc43 and fc44 use the same LTO flags with newer toolchains and are not affected.

Build the MUMPS libraries without LTO. Verified in the build-deps:el10.amd64 image with the rpm flags: moo, dsimple_test and c_example all link.

Assisted-by: Claude Opus 5.5 (1M context)

Related Issues

Purpose

Approach

The el10 rpm build gets `-flto=auto -ffat-lto-objects` from the
distribution's flags, and with its GCC 14.3 / binutils 2.41 every link
against the MUMPS archives loses Fortran symbols that are defined in
them. libmoo.so fails first:

    mumps_comm_buffer_common.F:150: undefined reference to `mpi_test_'
    dmumps_driver.F:502: undefined reference to `mpi_initialized_'

`libmumps_common.a` and `libseq.a` both define those symbols (`nm`
shows `T mpi_test_`); the definitions go missing in the LTO link.
Compiling only the libseq stubs without LTO just moves the error to
`dmumps_ana_driver_` and friends, and the MUMPS demos, which do not use
moo's `--exclude-libs,ALL`, fail the same way. That was the el10 demo
failure that 3b8d7b2 worked around; the old comment blaming a missing
MPI symbol set was wrong. fc43 and fc44 use the same LTO flags with
newer toolchains and are not affected.

Build the MUMPS libraries without LTO. Verified in the
build-deps:el10.amd64 image with the rpm flags: moo, dsimple_test and
c_example all link.

Assisted-by: Claude Opus 5.5 (1M context)
@sjoelund
sjoelund merged commit dc979c2 into master Sep 23, 2026
6 checks passed
@sjoelund
sjoelund deleted the mumps-no-lto branch September 23, 2026 13:15
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

Successfully merging this pull request may close these issues.

1 participant