Ticket 2435 - Compile SLURM w/ Alpine Linux
Summary: Compile SLURM w/ Alpine Linux
Status: RESOLVED WONTFIX
Alias: None
Product: Slurm
Classification: Unclassified
Component: Configuration (show other tickets)
Version: 15.08.1
Hardware: Linux Linux
: 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2016-02-10 00:43 MST by Christian Kniep
Modified: 2017-11-03 14:47 MDT (History)
1 user (show)

See Also:
Site: -Other-
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita 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 ticket.
Description Christian Kniep 2016-02-10 00:43:16 MST
Hey there,

I like to tinker with HPC stacks in Linux Containers (e.g. FOSDEM: https://www.youtube.com/watch?v=mKM8GrBn5gg) and I recently move my Containers from Fedora to the much smaller Alpine Linux (Dockers official images are moved there as well).

Trying to compile it using this Recepie (https://github.com/qnib/alpn-slurm/blob/master/Dockerfile) I got that:

```
In file included from log.c:73:0:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
log.c:78:24: fatal error: sys/unistd.h: No such file or directory
compilation terminated.
Makefile:902: recipe for target 'log.lo' failed
```

I googled and found this: https://github.com/openwrt/packages/issues/1376
So I changed this line...

```
bash-4.3# cd /opt/slurm/
bash-4.3# grep sys/unistd -r *
src/common/log.c:#include <sys/unistd.h>
```
... to that line...

```
bash-4.3# grep unistd.h src/common/log.c
#include <unistd.h>
```

Which continues first, but fails here:

```
make[5]: Entering directory '/opt/slurm/src/plugins/accounting_storage/filetxt'
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common   -g -O2  -fno-gcse -Wall -g -O0 -fno-strict-aliasing -MT accounting_storage_filetxt.lo -MD -MP -MF .deps/accounting_storage_filetxt.Tpo -c -o accounting_storage_filetxt.lo accounting_storage_filetxt.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -fno-gcse -Wall -g -O0 -fno-strict-aliasing -MT accounting_storage_filetxt.lo -MD -MP -MF .deps/accounting_storage_filetxt.Tpo -c accounting_storage_filetxt.c  -fPIC -DPIC -o .libs/accounting_storage_filetxt.o
In file included from ../../../../src/common/slurm_xlator.h:426:0,
                 from accounting_storage_filetxt.c:42:
../../../../src/common/callerid.h:51:62: error: unknown type name 'ino_t'
 extern int callerid_find_inode_by_conn(callerid_conn_t conn, ino_t *inode);
                                                              ^
../../../../src/common/callerid.h:52:63: error: unknown type name 'ino_t'
 extern int callerid_find_conn_by_inode(callerid_conn_t *conn, ino_t inode);
                                                               ^
../../../../src/common/callerid.h:53:50: error: unknown type name 'ino_t'
 extern int find_pid_by_inode (pid_t *pid_result, ino_t inode);
                                                  ^
Makefile:593: recipe for target 'accounting_storage_filetxt.lo' failed
make[5]: *** [accounting_storage_filetxt.lo] Error 1
make[5]: Leaving directory '/opt/slurm/src/plugins/accounting_storage/filetxt'
Makefile:512: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/opt/slurm/src/plugins/accounting_storage'
Makefile:541: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/opt/slurm/src/plugins'
Makefile:517: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/opt/slurm/src'
Makefile:700: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/slurm'
Makefile:582: recipe for target 'all' failed
make: *** [all] Error 2
```

And now I am stuck... :)
How to start with docker: https://github.com/qnib/alpn-slurm/blob/master/README.md
Comment 4 Christian Kniep 2016-02-10 20:12:34 MST
I fetched master and ran into this error:
```
make[5]: Entering directory '/opt/slurm-master/src/plugins/switch/cray'
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-cookies.lo -MD -MP -MF .deps/switch_cray_la-cookies.Tpo -c -o switch_cray_la-cookies.lo `test -f 'cookies.c' || echo './'`cookies.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-cookies.lo -MD -MP -MF .deps/switch_cray_la-cookies.Tpo -c cookies.c  -fPIC -DPIC -o .libs/switch_cray_la-cookies.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-cookies.lo -MD -MP -MF .deps/switch_cray_la-cookies.Tpo -c cookies.c -o switch_cray_la-cookies.o >/dev/null 2>&1
mv -f .deps/switch_cray_la-cookies.Tpo .deps/switch_cray_la-cookies.Plo
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-gpu.lo -MD -MP -MF .deps/switch_cray_la-gpu.Tpo -c -o switch_cray_la-gpu.lo `test -f 'gpu.c' || echo './'`gpu.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-gpu.lo -MD -MP -MF .deps/switch_cray_la-gpu.Tpo -c gpu.c  -fPIC -DPIC -o .libs/switch_cray_la-gpu.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-gpu.lo -MD -MP -MF .deps/switch_cray_la-gpu.Tpo -c gpu.c -o switch_cray_la-gpu.o >/dev/null 2>&1
mv -f .deps/switch_cray_la-gpu.Tpo .deps/switch_cray_la-gpu.Plo
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-iaa.lo -MD -MP -MF .deps/switch_cray_la-iaa.Tpo -c -o switch_cray_la-iaa.lo `test -f 'iaa.c' || echo './'`iaa.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-iaa.lo -MD -MP -MF .deps/switch_cray_la-iaa.Tpo -c iaa.c  -fPIC -DPIC -o .libs/switch_cray_la-iaa.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-iaa.lo -MD -MP -MF .deps/switch_cray_la-iaa.Tpo -c iaa.c -o switch_cray_la-iaa.o >/dev/null 2>&1
mv -f .deps/switch_cray_la-iaa.Tpo .deps/switch_cray_la-iaa.Plo
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-pe_info.lo -MD -MP -MF .deps/switch_cray_la-pe_info.Tpo -c -o switch_cray_la-pe_info.lo `test -f 'pe_info.c' || echo './'`pe_info.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-pe_info.lo -MD -MP -MF .deps/switch_cray_la-pe_info.Tpo -c pe_info.c  -fPIC -DPIC -o .libs/switch_cray_la-pe_info.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-pe_info.lo -MD -MP -MF .deps/switch_cray_la-pe_info.Tpo -c pe_info.c -o switch_cray_la-pe_info.o >/dev/null 2>&1
mv -f .deps/switch_cray_la-pe_info.Tpo .deps/switch_cray_la-pe_info.Plo
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-scaling.lo -MD -MP -MF .deps/switch_cray_la-scaling.Tpo -c -o switch_cray_la-scaling.lo `test -f 'scaling.c' || echo './'`scaling.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-scaling.lo -MD -MP -MF .deps/switch_cray_la-scaling.Tpo -c scaling.c  -fPIC -DPIC -o .libs/switch_cray_la-scaling.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-scaling.lo -MD -MP -MF .deps/switch_cray_la-scaling.Tpo -c scaling.c -o switch_cray_la-scaling.o >/dev/null 2>&1
mv -f .deps/switch_cray_la-scaling.Tpo .deps/switch_cray_la-scaling.Plo
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm  -I../../../.. -I../../../../src/common    -g -O2  -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-switch_cray.lo -MD -MP -MF .deps/switch_cray_la-switch_cray.Tpo -c -o switch_cray_la-switch_cray.lo `test -f 'switch_cray.c' || echo './'`switch_cray.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../slurm -I../../../.. -I../../../../src/common -g -O2 -Wall -g -O0 -fno-strict-aliasing -MT switch_cray_la-switch_cray.lo -MD -MP -MF .deps/switch_cray_la-switch_cray.Tpo -c switch_cray.c  -fPIC -DPIC -o .libs/switch_cray_la-switch_cray.o
switch_cray.c:53:26: fatal error: linux/limits.h: No such file or directory
compilation terminated.
Makefile:658: recipe for target 'switch_cray_la-switch_cray.lo' failed
make[5]: *** [switch_cray_la-switch_cray.lo] Error 1
make[5]: Leaving directory '/opt/slurm-master/src/plugins/switch/cray'
Makefile:512: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/opt/slurm-master/src/plugins/switch'
Makefile:543: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/opt/slurm-master/src/plugins'
Makefile:517: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/opt/slurm-master/src'
Makefile:696: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/slurm-master'
Makefile:580: recipe for target 'all' failed
make: *** [all] Error 2
bash-4.3#
```
Comment 5 Christian Kniep 2016-02-10 23:22:34 MST
OK, needed the linux-headers. But now I am at a real dead-end, since it seems I need >=glibc-2.7, while Alpine uses musl-libc. :)
```
/bin/bash ../../libtool  --tag=CC   --mode=link gcc  -g -O2  -Wall -g -O0 -fno-strict-aliasing -export-dynamic   -o sacct options.o print.o process.o sacct.o ../../src/db_api/libslurmdb.o -ldl
libtool: link: gcc -g -O2 -Wall -g -O0 -fno-strict-aliasing -o sacct options.o print.o process.o sacct.o ../../src/db_api/libslurmdb.o -Wl,--export-dynamic  -ldl
../../src/db_api/libslurmdb.o: In function `slurm_find_group_user':
/opt/slurm/src/common/uid.c:315: undefined reference to `getgrent_r'
../../src/db_api/libslurmdb.o: In function `_find_match_in_tcp_file':
/opt/slurm/src/common/callerid.c:177: undefined reference to `inet_nsap_addr'
/opt/slurm/src/common/callerid.c:179: undefined reference to `inet_nsap_addr'
collect2: error: ld returned 1 exit status
make[3]: *** [sacct] Error 1
Makefile:562: recipe for target 'sacct' failed
make[3]: Leaving directory '/opt/slurm/src/sacct'
Makefile:517: recipe for target 'all-recursive' failed
make[2]: Leaving directory '/opt/slurm/src'
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Makefile:696: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/opt/slurm'
Makefile:580: recipe for target 'all' failed
The command '/bin/sh -c cd /opt/slurm/ &&     make && make install' returned a non-zero code: 2
```
Comment 6 Christian Kniep 2016-04-04 18:52:24 MDT
Is there no way to compile SLURM on Alpine?
Comment 7 Jacob Jenson 2017-11-03 14:47:28 MDT
Before this ticket can be sent to the support team we need to put a support contract in place for your site. Please let me know if you would like to discuss Slurm support.