Bug 8882 - rpmbuild error: File not found accounting_storage_mysql.so
Summary: rpmbuild error: File not found accounting_storage_mysql.so
Status: RESOLVED DUPLICATE of bug 6488
Alias: None
Product: Slurm
Classification: Unclassified
Component: Build System and Packaging (show other bugs)
Version: 20.02.1
Hardware: Linux Linux
: --- 3 - Medium Impact
Assignee: Nate Rini
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2020-04-17 04:29 MDT by Ole.H.Nielsen@fysik.dtu.dk
Modified: 2020-04-20 09:47 MDT (History)
1 user (show)

See Also:
Site: DTU Physics
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
config.log (gzipped) (22.02 KB, application/x-gzip)
2020-04-18 00:05 MDT, Ole.H.Nielsen@fysik.dtu.dk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ole.H.Nielsen@fysik.dtu.dk 2020-04-17 04:29:05 MDT
I'm following up on a slurm-users mailing list thread where slurm.spec is missing a build prerequisite, causing the rpmbuild error: File not found accounting_storage_mysql.so

Would you kindly consider this as a bug in the slurm.spec file?

To reproduce the error I worked on a CentOS 7.7 server without any special prerequisites installed.  First time around rpmbuild failed and required me to install the following prerequisites:
# yum install munge-devel readline-devel pam-devel

Now the building process starts correctly:

$ rpmbuild -ta slurm-20.02.1.tar.bz2
(lines deleted)
Processing files: slurm-slurmdbd-20.02.1-1.el7.x86_64
error: File not found: /home/camp/ohni/rpmbuild/BUILDROOT/slurm-20.02.1-1.el7.x86_64/usr/lib64/slurm/accounting_storage_mysql.so
RPM build errors:
    File not found: /home/camp/ohni/rpmbuild/BUILDROOT/slurm-20.02.1-1.el7.x86_64/usr/lib64/slurm/accounting_storage_mysql.so
    File not found: /home/camp/ohni/rpmbuild/BUILDROOT/slurm-20.02.1-1.el7.x86_64/usr/lib64/slurm/accounting_storage_mysql.so

I realize that the user should have asked explicitly for mysql support, in which case a correct error message is printed:

$ rpmbuild -ta slurm-20.02.1.tar.bz2 --with mysql
error: Failed build dependencies:
        mysql-devel >= 5.0.0 is needed by slurm-20.02.1-1.el7.x86_64

This is a confusing situation.  Perhaps the slurm.spec file should have "--with mysql" as the default.  Alternatively, the build should exclude building of slurm-slurmdbd if the mysql-devel prerequisite is absent.

Thanks,
Ole
Comment 2 Nate Rini 2020-04-17 12:36:11 MDT
Ole,

Can you please provide the config.log from the rpm build?

Thanks,
--Nate
Comment 3 Ole.H.Nielsen@fysik.dtu.dk 2020-04-18 00:05:27 MDT
Created attachment 13871 [details]
config.log (gzipped)
Comment 4 Ole.H.Nielsen@fysik.dtu.dk 2020-04-18 00:06:19 MDT
Hi Nate,

(In reply to Nate Rini from comment #2)
> Can you please provide the config.log from the rpm build?

Yes, it's done now.

Thanks for your support.
Ole
Comment 6 Nate Rini 2020-04-20 09:15:01 MDT
Ole,

This is the same issue as bug#6488. We had previously tried to force the change you suggest which caused other issues. I'm going to close this ticket and we can pursue the issue in bug#6488.

Thanks,
--Nate

*** This bug has been marked as a duplicate of bug 6488 ***
Comment 7 Ole.H.Nielsen@fysik.dtu.dk 2020-04-20 09:47:43 MDT
(In reply to Nate Rini from comment #6)
> Ole,
> 
> This is the same issue as bug#6488. We had previously tried to force the
> change you suggest which caused other issues. I'm going to close this ticket
> and we can pursue the issue in bug#6488.

Thanks Nate, this sounds like to right approach.  

FWIW I have updated my Slurm RPM build instructions in
https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-packages
to explicitly require mysql:

# rpmbuild -ta slurm-$VER.tar.bz2 --with mysql

This is going to catch the case where mysql is not installed.