Bug 11139 - Build fails with slibtool.
Summary: Build fails with slibtool.
Status: RESOLVED INVALID
Alias: None
Product: Slurm
Classification: Unclassified
Component: Build System and Packaging (show other bugs)
Version: 21.08.x
Hardware: Linux Linux
: --- 6 - No support contract
Assignee: Jacob Jenson
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2021-03-18 16:05 MDT by orbea-ml
Modified: 2021-03-18 16:06 MDT (History)
0 users

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
Full build log. (1.02 MB, text/x-log)
2021-03-18 16:05 MDT, orbea-ml
Details
Build log with undefined referenfces. (1.02 MB, text/x-log)
2021-03-18 16:05 MDT, orbea-ml
Details
Log using GNU libtool. (827.58 KB, text/x-log)
2021-03-18 16:06 MDT, orbea-ml
Details

Note You need to log in before you can comment on or make changes to this bug.
Description orbea-ml 2021-03-18 16:05:17 MDT
Created attachment 18543 [details]
Full build log.

When trying to build slurm with slibtool (https://dev.midipix.org/cross/slibtool) it fails.

rdlibtool: link: ar crs .libs/libscrontab_ref.a .libs/libscrontab_ref.o
ar: .libs/libscrontab_ref.o: No such file or directory
rdlibtool: exec error upon slbt_exec_link_create_archive(), line 1219: (see child process error messages).
rdlibtool: < returned to > slbt_exec_link(), line 1805.
make[3]: *** [Makefile:600: libscrontab_ref.la] Error 2

This is because in src/scrontab/Makefile.am and some other files the libscrontab_ref.lo rule is manually set. However only GNU libtool can handle these manually created files and it is not portable.

I tried to remove it, but it then obviously fails with undefined references.

rdlibtool: link: clang opt.o parse.o scrontab.o .libs/libscrontab_ref.a -g -O2 -fno-omit-frame-pointer -pthread -ggdb3 -Wall -g -O1 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/slurm -L../../src/api/.libs -lslurmfull -ldl -L.libs -lm -lresolv -lm -o .libs/scrontab -Wl,--export-dynamic
/usr/bin/ld: scrontab.o: in function `_usage':
/tmp/slurm/src/scrontab/scrontab.c:78: undefined reference to `_binary_usage_txt_start'
/usr/bin/ld: /tmp/slurm/src/scrontab/scrontab.c:78: undefined reference to `_binary_usage_txt_end'
/usr/bin/ld: /tmp/slurm/src/scrontab/scrontab.c:78: undefined reference to `_binary_usage_txt_start'
/usr/bin/ld: scrontab.o: in function `_edit_crontab':
/tmp/slurm/src/scrontab/scrontab.c:200: undefined reference to `_binary_default_crontab_txt_start'
/usr/bin/ld: /tmp/slurm/src/scrontab/scrontab.c:200: undefined reference to `_binary_default_crontab_txt_end'
/usr/bin/ld: /tmp/slurm/src/scrontab/scrontab.c:200: undefined reference to `_binary_default_crontab_txt_start'
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
rdlibtool: exec error upon slbt_exec_link_create_executable(), line 1614: (see child process error messages).
rdlibtool: < returned to > slbt_exec_link(), line 1909.
make[3]: *** [Makefile:604: scrontab] Error 2

I am hoping someone here can help solve this issue as I am stuck so far. :)

It can be reproduced by installing slibtool in your $PATH and then exporting MAKEFLAGS='LIBTOOL=rdlibtool'.

Please see the attached build logs.

Also see these two other issues:

https://bugs.schedmd.com/show_bug.cgi?id=11132
https://bugs.schedmd.com/show_bug.cgi?id=11137
Comment 1 orbea-ml 2021-03-18 16:05:47 MDT
Created attachment 18544 [details]
Build log with undefined referenfces.
Comment 2 orbea-ml 2021-03-18 16:06:17 MDT
Created attachment 18545 [details]
Log using GNU libtool.