Bug 2373 - Unable to compile on Fedora 23 and above owing to problems with the perlapi
Summary: Unable to compile on Fedora 23 and above owing to problems with the perlapi
Status: RESOLVED DUPLICATE of bug 2443
Alias: None
Product: Slurm
Classification: Unclassified
Component: Other (show other bugs)
Version: 15.08.7
Hardware: Linux Linux
: --- 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
: 2426 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-23 21:51 MST by Adam Huffman
Modified: 2016-02-19 08:43 MST (History)
1 user (show)

See Also:
Site: -Other-
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

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Huffman 2016-01-23 21:51:34 MST
[This is pasted from a message I sent to the mailing list, which didn't receive a reply. I can confirm that the problem, which I first saw in 15.08.6, is still present in 15.08.7]

I've been trying to build Slurm RPMs using Fedora's COPR build service
(at https://copr.fedoraproject.org/coprs/verdurin/slurm/) and a change
in RPM means that builds are failing for Fedora 23 and Rawhide.

The problem is with the perlapi package and the handling of
optimization. Here are the errors when building:

gcc -c  -I. -I../../../.. -I../../../../contribs/perlapi/common
-I../../../.. -g -static -O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-pthread -fno-gcse -Wall -g -O0 -fno-strict-aliasing  -g
-DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC
"-I/usr/lib64/perl5/CORE"   Slurm.c
In file included from /usr/include/sys/types.h:25:0,
                 from /usr/lib64/perl5/CORE/perl.h:699,
                 from Slurm.xs:2:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE
requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^

repeated for the other files in that directory, leading  to the
following at the end of the RPM build:

RPM build errors:
error: Empty %files file /builddir/build/BUILD/slurm-15.08.6/perlapi.files
    Macro expanded in comment on line 10: # --prefix
%_prefix        path    install path for commands, libraries, etc.
    Macro expanded in comment on line 30: #  Allow defining --with and
--without build options or %_with and %without in .rpmmacros
    Macro expanded in comment on line 121: #%if %{slurm_with blcr}
    Macro expanded in comment on line 849: #%{_mandir}/man3/slurmdb_*
    Empty %files file /builddir/build/BUILD/slurm-15.08.6/perlapi.files

(the macro expansion lines are just warnings, I think)

The problem with the empty perlapi.files did exist in Fedora 22, but
it was only treated as a warning, not an error.
Comment 1 quietdeath 2016-02-03 02:50:51 MST
I am running into the same problem here.

System: Fedora 23
Slurm: slurm-15.08.7.tar.bz2
Comment 2 Adam Huffman 2016-02-07 22:06:03 MST
I've found a minimal change that will fix compilation on Fedora 23 and above, namely the hardcoding of "-O0" in the CFLAGS, which occurs in ./configure.

The packages at:

https://copr.fedorainfracloud.org/coprs/verdurin/slurm/build/158439/

should work.

The minimal patch is included in the SRPM. 

In the .spec file itself, I needed to remove the use of 'perlapi.files', because the file is empty and RPM no longer tolerates empty files in %files. As far as I can tell, the Perl subpackage builds fine without this, but please correct me if I'm wrong.

I understand that you don't accept GitHub pull requests, so please feel free to extract the changes from the packages on COPR.