[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.
I am running into the same problem here. System: Fedora 23 Slurm: slurm-15.08.7.tar.bz2
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.