[slurm-users] Problems building RPMs

883 views
Skip to first unread message

Phill Harvey-Smith

unread,
Jul 21, 2022, 6:44:42 AM7/21/22
to slurm...@lists.schedmd.com
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 Cavalotti

unread,
Jul 21, 2022, 1:15:57 PM7/21/22
to Slurm User Community List
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
--
Kilian

Brian Andrus

unread,
Jul 21, 2022, 1:42:23 PM7/21/22
to slurm...@lists.schedmd.com
Hmm. That would imply you could still use the tar file with something like:

rpmbuild -v -ta --define "_lto_cflags %{nil}" slurm-22.05.2.tar.bz2

Note, I have not tried this (no immediate access to RHEL9 derivative),
so YMMV.

Brian Andrus

Phill Harvey-Smith

unread,
Jul 22, 2022, 5:15:04 AM7/22/22
to slurm...@lists.schedmd.com
On 21/07/2022 18:42, Brian Andrus wrote:
> Hmm. That would imply you could still use the tar file with something like:
>
> rpmbuild -v -ta --define "_lto_cflags %{nil}" slurm-22.05.2.tar.bz2
>
> Note, I have not tried this (no immediate access to RHEL9 derivative),
> so YMMV.

Right tried that, and I stopped getting the gnu.debug messages but now
getting the following :

Processing files: slurm-slurmdbd-22.05.2-1.el9.x86_64
error: File not found:
/root/rpmbuild/BUILDROOT/slurm-22.05.2-1.el9.x86_64/usr/lib64/slurm/accounting_storage_mysql.so


RPM build errors:
Macro expanded in comment on line 22: %_prefix path install path
for commands, libraries, etc.

Macro expanded in comment on line 175: %define
_unpackaged_files_terminate_build 0

Empty %files file /root/rpmbuild/BUILD/slurm-22.05.2/slurm.files
File not found:
/root/rpmbuild/BUILDROOT/slurm-22.05.2-1.el9.x86_64/usr/lib64/slurm/accounting_storage_mysql.so
File listed twice:
/usr/lib/.build-id/c9/d5b2eb50d6991ab4dcf52aaca303163f9715a1
File listed twice:
/usr/lib/.build-id/db/0b52d4d53c540b46811ccafd7abefa66f2f046
File listed twice:
/usr/lib/.build-id/e3/dea01b466732daa2fdd121511ab7d4bc970615
File listed twice:
/usr/lib/.build-id/fa/8d5f4b9a315f95f564f96ec27b8cf33086aedb
Deprecated external dependency generator is used!
Deprecated external dependency generator is used!
Deprecated external dependency generator is used!
Empty %files file /root/rpmbuild/BUILD/slurm-22.05.2/example.configs
Deprecated external dependency generator is used!
Deprecated external dependency generator is used!
Deprecated external dependency generator is used!
File not found:
/root/rpmbuild/BUILDROOT/slurm-22.05.2-1.el9.x86_64/usr/lib64/slurm/accounting_storage_mysql.so

My build command line is :

rpmbuild -v -ta --define "_lto_cflags %{nil}" slurm-22.05.2.tar.bz2

I also tried --without mysql but that didn't change the error --with
mysql threw an error that mysql-devel was not installed, but doesn't
seem available in yum.

Cheers.

Phill.

Ole Holm Nielsen

unread,
Jul 22, 2022, 5:36:05 AM7/22/22
to slurm...@lists.schedmd.com
On 7/22/22 11:14, Phill Harvey-Smith wrote:
> On 21/07/2022 18:42, Brian Andrus wrote:
>> Hmm. That would imply you could still use the tar file with something like:
>>
>> rpmbuild -v -ta --define "_lto_cflags %{nil}" slurm-22.05.2.tar.bz2
>>
>> Note, I have not tried this (no immediate access to RHEL9 derivative),
>> so YMMV.
>
> Right tried that, and I stopped getting the gnu.debug messages but now
> getting the following :
>
> Processing files: slurm-slurmdbd-22.05.2-1.el9.x86_64
> error: File not found:
> /root/rpmbuild/BUILDROOT/slurm-22.05.2-1.el9.x86_64/usr/lib64/slurm/accounting_storage_mysql.so
...
> My build command line is :
>
> rpmbuild -v -ta --define "_lto_cflags %{nil}" slurm-22.05.2.tar.bz2
>
> I also tried --without mysql but that didn't change the error --with mysql
> threw an error that mysql-devel was not installed, but doesn't seem
> available in yum.

You should probably install the database RPMs before building Slurm:

dnf install mariadb-server mariadb-devel

Also make sure that you have all prerequisites, see my Wiki page
https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#install-prerequisites

If --without mysql still fails without the database RPMs, that would
indicate a bug in the spec file. The spec file works fine on EL8, however.

This check is useful after you have installed slurm-slurmdbd:

rpm -ql slurm-slurmdbd | grep accounting_storage_mysql.so

/Ole

Phill Harvey-Smith

unread,
Jul 22, 2022, 7:14:50 AM7/22/22
to slurm...@lists.schedmd.com
On 22/07/2022 10:35, Ole Holm Nielsen wrote:
> On 7/22/22 11:14, Phill Harvey-Smith wrote:
>> On 21/07/2022 18:42, Brian Andrus wrote:
> You should probably install the database RPMs before building Slurm:
>
> dnf install mariadb-server mariadb-devel

Yep was having problems there could not find them in the repositories
turns out I had to install / enable the crb repo which isn't enabled by
default.

So I can confirm that it certainly seems to be building now.

Cheers.

Phill.



Reply all
Reply to author
Forward
0 new messages