Description of problem: /usr/lib64/openmpi/bin/bout-config --libs prints: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/BOUT++-v4.4.0/.package_note-bout++-4.4.0-6.fc36.x86_64.ld -lm -L/usr/lib64/openmpi/lib -lbout++ -lm -lfftw3 -L/usr/lib64 -lnetcdf_c++4 -lnetcdf -L/usr/lib64 -lhdf5_hl -lhdf5 -lhdf5_hl -lsz -lz -ldl -lm -L/usr/lib64/openmpi/lib -lpetsc -lhdf5 -lsundials_ida -lsundials_nvecparallel -lsundials_cvode -lsundials_nvecparallel -lsundials_arkode -lsundials_nvecparallel -L/usr/lib64/openmpi/lib -lpvode -lpvpre "-L/usr/lib64/openmpi/lib -lpvode -lpvpre -lbout++" is OK (I think. Are all three libraries needed?) But the rest should not be exported in --libs. Link flags like -z,relro and --as-needed are part of the distro policy, and should either be added again (when doing distro builds) or part of the user link config. -spec=* is only appropriate for distro builds. -Wl,-dT,/builddir/build/BUILD/BOUT++-v4.4.0/.package_note-bout++-4.4.0-6.fc36.x86_64.ld only works in the build environment where the linker script was available. And all the rest is libraries that libpvode/libbout++/libpvpre link to and this will be handled by the dynamic linker, no need to relink them to programs using libbout++. I would try to fix this myself, but I can't get the package to build, see #2045230. Version-Release number of selected component (if applicable): bout++-openmpi-4.4.0-6.fc36.x86_64 bout++-mpich-4.4.0-6.fc36.x86_64
`-L` should not be needed. I think all three are needed - this is fixed in the development version, where only -lbout++ is needed. If you have time to fix this a PR / push would be appreciated. Thanks for reporting :-)
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.