Building linux kernel failed
falaleevms opened this issue · 3 comments
Building linux kernel using arc-gnu toolchain failed when use glibc version 6d8770e during busybox building with following error:
/slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu/lib/gcc/arc-snps-linux-gnu/9.3.1/../../../../arc-snps-linux-gnu/bin/ld: coreutils/lib.a(mktemp.o): in function `mktemp_main':
mktemp.c:(.text.mktemp_main+0x66): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu/lib/gcc/arc-snps-linux-gnu/9.3.1/../../../../arc-snps-linux-gnu/bin/ld: util-linux/lib.a(rdate.o): in function `rdate_main':
rdate.c:(.text.rdate_main+0xca): undefined reference to `stime'
/slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu/lib/gcc/arc-snps-linux-gnu/9.3.1/../../../../arc-snps-linux-gnu/bin/ld: rdate.c:(.text.rdate_main+0xca): undefined reference to `stime'
/slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu/lib/gcc/arc-snps-linux-gnu/9.3.1/../../../../arc-snps-linux-gnu/bin/ld: coreutils/lib.a(date.o): in function `date_main':
date.c:(.text.date_main+0x17e): undefined reference to `stime'
/slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu/lib/gcc/arc-snps-linux-gnu/9.3.1/../../../../arc-snps-linux-gnu/bin/ld: date.c:(.text.date_main+0x17e): undefined reference to `stime'
collect2: error: ld returned 1 exit status
Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.
Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"
make[1]: *** [Makefile:718: busybox_unstripped] Error 1
make[1]: Leaving directory '/slowfs/ru20arcjenkins/de02-arcjenkins2/slaves/ru20-gp-hw-linux109/workspace/arcoss_verification/linux_verification/build_linux-2/buildroot/output/build/busybox-1.31.1'
make: *** [package/pkg-generic.mk:269: /slowfs/ru20arcjenkins/de02-arcjenkins2/slaves/ru20-gp-hw-linux109/workspace/arcoss_verification/linux_verification/build_linux-2/buildroot/output/build/busybox-1.31.1/.stamp_built] Error 2
Full build log: buildroot.log.txt
Defconfig: defconfig.txt
Toolchain used to build kernel: /slowfs/ru20arcgnu1/arcoss_verification/arc-gnu-toolchain/workspace/builds/ct92/arc-archs-linux-gnu
I decided that this is a glibc problem because of following report:
As you can see changing glibc sources from arc-2020.03-release
to 6d8770e leads to this error.
The issue here is buildroot / busybox not being compatible with new glibc. Some of the APIs have been removed from glibc. So you need to upgrade buildroot - see the glibc verification job
The issue here is buildroot / busybox not being compatible with new glibc. Some of the APIs have been removed from glibc. So you need to upgrade buildroot - see the glibc verification job
@falaleevms indeed, there's an upstream fix in Buildroot for this issue, see https://git.buildroot.org/buildroot/commit/package/busybox?id=13f2d688a24f47446af236829bd6ca194d5aea5b
Thanks a lot for the useful tip, @vineetgarc!
Issue resolved with buildroot based on 2020.05