[FS#381] Error: undefined reference to `clock_gettime’ during build

LEDE Bugs lede-bugs at lists.infradead.org
Tue Jan 10 15:41:09 PST 2017


The following task has a new comment added:

FS#381 - Error: undefined reference to `clock_gettime’ during build
User who did this - David Poxon (noilly)

----------
**Output of "./scripts/getver.sh":**
r2888-96a9403

**Output of "make tools/mkimage/{clean,compile} V=sc":**
make[1]: Entering directory `/home/vagrant/lede'
make[2]: Entering directory `/home/vagrant/lede/tools/mkimage'
rm -f /home/vagrant/lede/staging_dir/host/bin/mkimage
rm -rf /home/vagrant/lede/build_dir/host/u-boot-2014.10 /home/vagrant/lede/staging_dir/host/stamp/.mkimage_installed /home/vagrant/lede/build_dir/host/u-boot-2014.10/.built
make[2]: Leaving directory `/home/vagrant/lede/tools/mkimage'
make[1]: Leaving directory `/home/vagrant/lede'
make[1]: Entering directory `/home/vagrant/lede'
+ mkdir -p /home/vagrant/lede/staging_dir/target-mips_24kc_musl-1.1.15
+ cd /home/vagrant/lede/staging_dir/target-mips_24kc_musl-1.1.15
+ mkdir -p bin lib include stamp
mkdir -p /home/vagrant/lede/build_dir/target-mips_24kc_musl-1.1.15/stamp
touch /home/vagrant/lede/staging_dir/target-mips_24kc_musl-1.1.15/.prepared
+ mkdir -p /home/vagrant/lede/staging_dir/host
+ cd /home/vagrant/lede/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/vagrant/lede/build_dir/host/stamp /home/vagrant/lede/staging_dir/host/include/sys
install -m0644 /home/vagrant/lede/tools/include/*.h /home/vagrant/lede/staging_dir/host/include/
install -m0644 /home/vagrant/lede/tools/include/sys/*.h /home/vagrant/lede/staging_dir/host/include/sys/
ln -sf lib /home/vagrant/lede/staging_dir/host/lib64
touch /home/vagrant/lede/staging_dir/host/.prepared
make[2]: Entering directory `/home/vagrant/lede/tools/flock'
make[2]: Leaving directory `/home/vagrant/lede/tools/flock'
make[2]: Entering directory `/home/vagrant/lede/tools/flock'
make[2]: Leaving directory `/home/vagrant/lede/tools/flock'
make[2]: Entering directory `/home/vagrant/lede/tools/sed'
make[2]: Leaving directory `/home/vagrant/lede/tools/sed'
make[2]: Entering directory `/home/vagrant/lede/tools/sed'
make[2]: Leaving directory `/home/vagrant/lede/tools/sed'
make[2]: Entering directory `/home/vagrant/lede/tools/patch'
make[2]: Leaving directory `/home/vagrant/lede/tools/patch'
make[2]: Entering directory `/home/vagrant/lede/tools/patch'
make[2]: Leaving directory `/home/vagrant/lede/tools/patch'
make[2]: Entering directory `/home/vagrant/lede/tools/xz'
make[2]: Leaving directory `/home/vagrant/lede/tools/xz'
make[2]: Entering directory `/home/vagrant/lede/tools/xz'
make[2]: Leaving directory `/home/vagrant/lede/tools/xz'
make[2]: Entering directory `/home/vagrant/lede/tools/tar'
make[2]: Leaving directory `/home/vagrant/lede/tools/tar'
make[2]: Entering directory `/home/vagrant/lede/tools/tar'
make[2]: Leaving directory `/home/vagrant/lede/tools/tar'
make[2]: Entering directory `/home/vagrant/lede/tools/pkg-config'
make[2]: Leaving directory `/home/vagrant/lede/tools/pkg-config'
make[2]: Entering directory `/home/vagrant/lede/tools/pkg-config'
make[2]: Leaving directory `/home/vagrant/lede/tools/pkg-config'
make[2]: Entering directory `/home/vagrant/lede/tools/libressl'
make[2]: Leaving directory `/home/vagrant/lede/tools/libressl'
make[2]: Entering directory `/home/vagrant/lede/tools/libressl'
make[2]: Leaving directory `/home/vagrant/lede/tools/libressl'
make[2]: Entering directory `/home/vagrant/lede/tools/mkimage'
. /home/vagrant/lede/include/shell.sh; bzcat /home/vagrant/lede/dl/u-boot-2014.10.tar.bz2 | tar -C /home/vagrant/lede/build_dir/host/u-boot-2014.10/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/* /home/vagrant/lede/build_dir/host/u-boot-2014.10

Applying ./patches/010-freebsd-ulong-fix.patch using plaintext:
patching file include/image.h

Applying ./patches/020-include_compile_fix.patch using plaintext:
patching file include/u-boot/rsa-checksum.h

Applying ./patches/030-allow-to-use-different-magic.patch using plaintext:
patching file tools/mkimage.c
patching file tools/default_image.c
patching file tools/imagetool.h

Applying ./patches/040-include_order.patch using plaintext:
patching file tools/Makefile

Applying ./patches/050-image_h_portability.patch using plaintext:
patching file include/image.h

Applying ./patches/060-remove_kernel_includes.patch using plaintext:
patching file include/compiler.h
patching file include/linux/posix_types.h
patching file include/linux/types.h

Applying ./patches/070-socfpgaimage_portability.patch using plaintext:
patching file tools/socfpgaimage.c

Applying ./patches/080-remove_compiler_check.patch using plaintext:
patching file include/linux/compiler-gcc4.h

Applying ./patches/090-reproducible-SOURCE_DATE_EPOCH.patch using plaintext:
patching file README
patching file tools/default_image.c

Applying ./patches/100-freebsd-compat.patch using plaintext:
patching file Makefile

Applying ./patches/200-compiler-support.patch using plaintext:
patching file include/linux/compiler-gcc.h
patching file include/linux/compiler-gcc3.h
patching file include/linux/compiler-gcc4.h
patching file include/linux/compiler-intel.h
patching file include/linux/compiler.h

Applying ./patches/210-openssl-1.1.x-compat.patch using plaintext:
patching file lib/rsa/rsa-sign.c
rm -f /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/errno.h /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/malloc.h /home/vagrant/lede/build_dir/host/u-boot-2014.10/tools/.depend
touch /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/config.mk
touch /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/config.h
touch /home/vagrant/lede/build_dir/host/u-boot-2014.10/.prepared4bf2a190502f50f8001dd100c0a81470
(cd /home/vagrant/lede/build_dir/host/u-boot-2014.10/; if [ -x configure ]; then cp -fpR /home/vagrant/lede/scripts/config.{guess,sub} /home/vagrant/lede/build_dir/host/u-boot-2014.10// && CC="gcc" CFLAGS="-O2 -I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include " CPPFLAGS="-I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include " LDFLAGS="-L/home/vagrant/lede/staging_dir/host/lib -L/home/vagrant/lede/staging_dir/host/usr/lib " CONFIG_SHELL="/usr/bin/env bash"  bash ./configure --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/vagrant/lede/staging_dir/host --exec-prefix=/home/vagrant/lede/staging_dir/host --sysconfdir=/home/vagrant/lede/staging_dir/host/etc --localstatedir=/home/vagrant/lede/staging_dir/host/var --sbindir=/home/vagrant/lede/staging_dir/host/bin ; fi )
touch /home/vagrant/lede/build_dir/host/u-boot-2014.10/.configured
make -C /home/vagrant/lede/build_dir/host/u-boot-2014.10 defconfig   HOSTCFLAGS="-I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include  -O2 -I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include " HOSTLDFLAGS="-L/home/vagrant/lede/staging_dir/host/lib -L/home/vagrant/lede/staging_dir/host/usr/lib  $(pkg-config --static --libs libcrypto)"
make[3]: Entering directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[3]: Leaving directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
make -C /home/vagrant/lede/build_dir/host/u-boot-2014.10 tools-only  HOSTCFLAGS="-I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include  -O2 -I/home/vagrant/lede/staging_dir/host/include -I/home/vagrant/lede/staging_dir/host/usr/include " HOSTLDFLAGS="-L/home/vagrant/lede/staging_dir/host/lib -L/home/vagrant/lede/staging_dir/host/usr/lib  $(pkg-config --static --libs libcrypto)"
make[3]: Entering directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
make[3]: Leaving directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
make[3]: sdl-config: Command not found
make[3]: Entering directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
make[3]: sdl-config: Command not found
make[3]: sdl-config: Command not found
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
make[3]: sdl-config: Command not found
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
make[3]: sdl-config: Command not found
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
make[3]: sdl-config: Command not found
  HOSTCC  tools/img2srec
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from :0:
/home/vagrant/lede/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension [enabled by default]
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/atmelimage.o
  WRAP    tools/common/bootm.c
  HOSTCC  tools/common/bootm.o
  WRAP    tools/common/image-fit.c
  HOSTCC  tools/common/image-fit.o
  WRAP    tools/common/image-sig.c
  HOSTCC  tools/common/image-sig.o
  WRAP    tools/common/image.c
  HOSTCC  tools/common/image.o
  HOSTCC  tools/default_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/fit_check_sign.o
  HOSTCC  tools/fit_common.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/fit_info.o
  HOSTCC  tools/gpimage-common.o
  HOSTCC  tools/gpimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  WRAP    tools/lib/crc32.c
  HOSTCC  tools/lib/crc32.o
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from :0:
/home/vagrant/lede/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension [enabled by default]
  WRAP    tools/lib/fdtdec.c
  HOSTCC  tools/lib/fdtdec.o
  WRAP    tools/lib/fdtdec_common.c
  HOSTCC  tools/lib/fdtdec_common.o
  WRAP    tools/lib/libfdt/fdt.c
  HOSTCC  tools/lib/libfdt/fdt.o
  WRAP    tools/lib/libfdt/fdt_ro.c
  HOSTCC  tools/lib/libfdt/fdt_ro.o
  WRAP    tools/lib/libfdt/fdt_rw.c
  HOSTCC  tools/lib/libfdt/fdt_rw.o
  WRAP    tools/lib/libfdt/fdt_strerror.c
  HOSTCC  tools/lib/libfdt/fdt_strerror.o
  WRAP    tools/lib/libfdt/fdt_wip.c
  HOSTCC  tools/lib/libfdt/fdt_wip.o
  WRAP    tools/lib/md5.c
  HOSTCC  tools/lib/md5.o
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from :0:
/home/vagrant/lede/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension [enabled by default]
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/lib/md5.c:34:0,
                 from tools/lib/md5.c:1:
/home/vagrant/lede/build_dir/host/u-boot-2014.10/include/u-boot/md5.h:17:3: warning: ISO C90 doesn't support unnamed structs/unions [-pedantic]
  WRAP    tools/lib/rsa/rsa-checksum.c
  HOSTCC  tools/lib/rsa/rsa-checksum.o
  WRAP    tools/lib/rsa/rsa-sign.c
  HOSTCC  tools/lib/rsa/rsa-sign.o
  WRAP    tools/lib/rsa/rsa-verify.c
  HOSTCC  tools/lib/rsa/rsa-verify.o
  WRAP    tools/lib/sha1.c
  HOSTCC  tools/lib/sha1.o
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from :0:
/home/vagrant/lede/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension [enabled by default]
  WRAP    tools/lib/sha256.c
  HOSTCC  tools/lib/sha256.o
In file included from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/vagrant/lede/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from :0:
/home/vagrant/lede/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension [enabled by default]
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/mkimage.o
  HOSTCC  tools/mxsimage.o
  HOSTCC  tools/omapimage.o
  HOSTCC  tools/os_support.o
  HOSTCC  tools/pbl_crc32.o
  HOSTCC  tools/pblimage.o
  HOSTCC  tools/socfpgaimage.o
  HOSTCC  tools/ublimage.o
  HOSTLD  tools/mkenvimage
  HOSTLD  tools/dumpimage
/home/vagrant/lede/staging_dir/host/lib/libcrypto.a(getentropy_linux.o): In function `getentropy_fallback':
getentropy_linux.c:(.text+0x18b): undefined reference to `clock_gettime'
getentropy_linux.c:(.text+0x46f): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[4]: *** [tools/dumpimage] Error 1
make[3]: *** [tools-only] Error 2
make[3]: Leaving directory `/home/vagrant/lede/build_dir/host/u-boot-2014.10'
make[2]: *** [/home/vagrant/lede/build_dir/host/u-boot-2014.10/.built] Error 2
make[2]: Leaving directory `/home/vagrant/lede/tools/mkimage'
make[1]: *** [tools/mkimage/compile] Error 2
make[1]: Leaving directory `/home/vagrant/lede'
make: *** [tools/mkimage/compile] Error 2

----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=381#comment1188



More information about the lede-bugs mailing list