Ticket 6436

Summary: 17.11.13 contribs/perlapi won't build on 32-bit systems due to slurm-xmalloc signature change
Product: Slurm Reporter: Philip Kovacs <pkdevel>
Component: slurmdAssignee: Tim Wickberg <tim>
Status: RESOLVED FIXED QA Contact:
Severity: C - Contributions    
Priority: --- CC: eich
Version: 17.11.12   
Hardware: Linux   
OS: Linux   
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: 17.11.13-2 18.08.5-2 Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Philip Kovacs 2019-01-30 21:33:04 MST
~~~
git show 750cc23edc -- src/common/xmalloc.h

-void *slurm_xmalloc(size_t, bool, const char *, int, const char *);
+void *slurm_xmalloc(uint64_t, bool, const char *, int, const char *);

^This change is fine, you but didn't mirror the change here:

contribs/perlapi/libslurm/perl/slurm-perl.h

extern void *slurm_xmalloc(size_t, bool, const char *, int, const char *);
~~~

so, on 32-bit arches, e.g. i686, the size_t mismatches the uint64_t and you get a compile error (see below).

Phil

~
make[4]: Entering directory '/builddir/build/BUILD/slurm-17.11.13/contribs/perlapi/libslurm/perl'
gcc -c  -I. -I../../../.. -I../../../../contribs/perlapi/common -I../../../.. -g -static -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -pthread  -g   -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC "-I/usr/lib/perl5/CORE"   job.c
make[4]: Leaving directory '/builddir/build/BUILD/slurm-17.11.13/contribs/perlapi/libslurm/perl'
BUILDSTDERR: In file included from job.c:19:
BUILDSTDERR: slurm-perl.h:20:14: error: conflicting types for 'slurm_xmalloc'
BUILDSTDERR:  extern void *slurm_xmalloc(size_t, bool, const char *, int, const char *);
BUILDSTDERR:               ^~~~~~~~~~~~~
BUILDSTDERR: In file included from ../../../../src/common/io_hdr.h:47,
BUILDSTDERR:                  from ../../../../src/slurmd/slurmstepd/slurmstepd_job.h:53,
BUILDSTDERR:                  from ../../../../src/common/switch.h:49,
BUILDSTDERR:                  from ../../../../src/slurmctld/slurmctld.h:67,
BUILDSTDERR:                  from ../../../../src/common/job_resources.h:46,
BUILDSTDERR:                  from job.c:16:
BUILDSTDERR: ../../../../src/common/xmalloc.h:111:7: note: previous declaration of 'slurm_xmalloc' was here
BUILDSTDERR:  void *slurm_xmalloc(uint64_t, bool, const char *, int, const char *);
BUILDSTDERR:        ^~~~~~~~~~~~~
BUILDSTDERR: make[4]: *** [Makefile:377: job.o] Error 1
BUILDSTDERR: make[4]: *** Waiting for unfinished jobs....
~
Comment 1 Egbert Eich 2019-01-31 09:44:11 MST
This is also true for 18.08.5.
Comment 2 Tim Wickberg 2019-01-31 11:17:24 MST
Thanks for the report, and I've applied the fix Philip noted.

I just pushed 17.11.5-2 and 18.08.5-2 releases with that one extra patch included as well, they're on the download page now.

- Tim
Comment 3 Philip Kovacs 2019-01-31 12:47:16 MST
Thanks Tim.  That tarball builds ok on all 6 Fedora arches.  Committing it to rawhide and submitting the updates for f28 and f29.   One of these days I'll get 18.x into rawhide.  Some people are asking me for it.