Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warewulf3 build error: undefined reference to `stime' #315

Open
huangtianhua opened this issue Oct 21, 2022 · 6 comments
Open

warewulf3 build error: undefined reference to `stime' #315

huangtianhua opened this issue Oct 21, 2022 · 6 comments

Comments

@huangtianhua
Copy link

I built warewulf3 on my environment which glibc is version 2.34, the error raised : undefined reference to `stime'.
stime() has been deprecated in glibc 2.31 and replaced with clock_settime().
So is it have to depend glibc under 2.31?

@jmstover
Copy link
Contributor

jmstover commented Oct 21, 2022 via email

@adrianreber
Copy link

I think I have also seen this. The error happens during busybox build and requires a newer version of busybox where this is fixed.

@jmstover
Copy link
Contributor

@bensallen ... Update busybox in provision/3rd_party/GPL (and related) ? Or have you seen it elsewhere?

@Yikun
Copy link

Yikun commented Nov 28, 2022

When build warewulf-provision-ohpc-3.9.0:

[  260s] Failed: -Wl,--start-group  -L/usr/lib -lcrypt -lm -lselinux -lsepol -ltirpc  -Wl,--end-group
[  260s] Output of:
[  260s] gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -I/usr/include/tirpc -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--gc-sections -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -L/usr/lib -lcrypt -lm -lselinux -lsepol -ltirpc -Wl,--end-group
[  260s] ==========
[  260s] /usr/bin/ld: debianutils/lib.a(mktemp.o): in function `mktemp_main':
[  260s] /home/abuild/rpmbuild/BUILD/warewulf3-98fcdc336349378c8ca1b5b0e7073a69a868a40f/provision/initramfs/_work/busybox-1.26.2/debianutils/mktemp.c:105: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
[  260s] /usr/bin/ld: util-linux/lib.a(rdate.o): in function `rdate_main':
[  260s] /home/abuild/rpmbuild/BUILD/warewulf3-98fcdc336349378c8ca1b5b0e7073a69a868a40f/provision/initramfs/_work/busybox-1.26.2/util-linux/rdate.c:83: undefined reference to `stime'
[  260s] /usr/bin/ld: coreutils/lib.a(date.o): in function `date_main':
[  260s] /home/abuild/rpmbuild/BUILD/warewulf3-98fcdc336349378c8ca1b5b0e7073a69a868a40f/provision/initramfs/_work/busybox-1.26.2/coreutils/date.c:296: undefined reference to `stime'
[  260s] collect2: error: ld returned 1 exit status
[  260s] Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.
[  260s] Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"
[  260s] make[2]: *** [Makefile:717: busybox_unstripped] Error 1
[  260s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/warewulf3-98fcdc336349378c8ca1b5b0e7073a69a868a40f/provision/initramfs/_work/busybox-1.26.2'
[  260s] make[1]: *** [Makefile:650: busybox] Error 2
[  260s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/warewulf3-98fcdc336349378c8ca1b5b0e7073a69a868a40f/provision/initramfs'
[  260s] make: *** [Makefile:372: all-recursive] Error 1

@bensallen
Copy link
Member

@jmstover yea we might as well rev busybox forward. From their website it seems latest stable is 1.34.1. If you happen to want to do this, here is the last time we did so as a reference: https://github.com/warewulf/warewulf3/pull/279/files. If not no worries, I'll grab this when I get a free moment.

Only caveat I'm aware of will be if something changed in busybox.config and the build bails out from that. I've typically generated the default busybox config and diff'ed it against ours to see if anything important is missing or changed.

@Yikun
Copy link

Yikun commented Mar 16, 2023

I belive this issue already resolved in v3.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants