Hi Phil, Link-time optimization (LTO) has been enabled by default in RHEL9:
https://fedoraproject.org/wiki/LTOByDefault https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/developing_c_and_cpp_applications_in_rhel_9/index#ref_link-time-optimization_using-libraries-with-gcc The issue has been reported to SchedMD already (see https://bugs.schedmd.com/show_bug.cgi?id=14565). The current workaround is to disable LTO in the SPEC file (see the bug report for details). Cheers, -- Kilian On Thu, Jul 21, 2022 at 3:46 AM Phill Harvey-Smith <p.harvey-sm...@warwick.ac.uk> wrote: > > Hi all, > > Environment is Rocky Linux 9.0 > > I'm trying to build RPMs for the latest slurm tarball with : > > rpmbuild -v -ta slurm*.tar.bz2 > > This barfs out with a similar problem to Maximilian Ebert's problems > building on Centos 9 namely that the build dies trying to link : > > `.gnu.debuglto_.debug_macro' referenced in section > `.gnu.debuglto_.debug_macro' of .libs/xstring.o: defined in discarded > section > `.gnu.debuglto_.debug_macro[wm4.xmalloc.h.69.ea420118d87051d8f53bdc4e00ad1cc7]' > of .libs/xstring.o > `.gnu.debuglto_.debug_macro' referenced in section > `.gnu.debuglto_.debug_macro' of .libs/xstring.o: defined in discarded > section > `.gnu.debuglto_.debug_macro[wm4.xstring.h.41.bdda85562fbe08d4914fb6ca15e366c5]' > of .libs/xstring.o > make[5]: *** [Makefile:1400: libcommon.o] Error 1 > make[5]: Leaving directory '/root/rpmbuild/BUILD/slurm-22.05.2/src/common' > make[4]: *** [Makefile:1286: ../../src/common/libcommon.o] Error 2 > make[4]: *** Waiting for unfinished jobs.... > > > What is odd is that if I unzip the tarball into a directory and do a > standard build : > > tar xjvf slurm-22.05.2.tar.bz2 > cd slurm-22.05.2 > ./configure > make > > it all builds without problems. > > Anyone have any idea how I can build the RPM files? > > Cheers. > > Phill. > > -- Kilian