Re: clang/tblgen: undefined reference to `futimens' c++: error: linker command failed with exit

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 20 Mar 2015 21:44:51 +0100
On 20 Mar 2015, at 08:33, O. Hartmann <ohartman_at_zedat.fu-berlin.de> wrote:
> 
> Running
> 
> 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r277382: Mon Jan 19 16:10:34 CET 2015
> amd64
> 
> with source tree at revision
> >>> Updating /usr/src using Subversion
> --------------------------------------------------------------
> Updating '.':
> At revision 280275.
> 
> and "make buildorld buildkernel"
> 
> fails at the below shown point.
> 
> The /usr/obj tree is clean - I delete it prior to each build run.
> 
> Something is out of sync, sn earlier update process (make installworld) crashed
> and I think the kernel, binary tools and rest of sources are some kind of out
> of sync.
> 
> Is there a way - from the data shown - to resolve the problem?
> 
> Building a kernel works great, building toolchains fail also at the very same
> point.
> 
> Thanks in advance,
> 
> oh
> 
> 
> [...]
> --- _bootstrap-tools-usr.bin/clang/tblgen ---
> --- TableGen.o ---
> c++ -O2 -pipe -O3 -pipe -O3
> -I/usr/src/usr.bin/clang/tblgen/../../../contrib/llvm/include
> -I/usr/src/usr.bin/clang/tblgen/../../../contrib/llvm/tools/clang/include
> -I/usr/src/usr.bin/clang/tblgen/../../../contrib/llvm/utils/TableGen -I.
> -I/usr/src/usr.bin/clang/tblgen/../../../contrib/llvm/../../lib/clang/include
> -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
> -fno-strict-aliasing
> -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.0\"
> -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\"
> -Qunused-arguments -I/usr/obj/usr/src/tmp/legacy/usr/include -std=c++11
> -std=c++11 -fno-exceptions -fno-rtti -stdlib=libc++ -Wno-c++11-extensions
> -c /usr/src/usr.bin/clang/tblgen/../../../contrib/llvm/utils/TableGen/TableGen.cpp
> -o TableGen.o --- _bootstrap-tools-usr.bin/clang/clang-tblgen
> --- /usr/obj/usr/src/tmp/usr/src/usr.bin/clang/clang-tblgen/../../../lib/clang/libllvmsupport/libllvmsupport.a(Path.o):
> In function `llvm::sys::fs::setLastModificationAndAccessTime(int,
> llvm::sys::TimeValue)': /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Path.cpp:(.text+0x4649):
> undefined reference to `futimens' c++: error: linker command failed with exit
> code 1 (use -v to see invocation) *** [clang-tblgen] Error code 1

Somehow, you seem to have messed up your libc, which provides futimens()
since r277610 (about 7 weeks ago).  Maybe you restored a very old
version?

In any case, you might be able to get around it by cheating with
__FreeBSD_version.  What does the following say on your system:

  grep "#define __FreeBSD_version" /usr/include/sys/param.h

If the version is 1100056 or higher, you should have futimens().  You
could try cheating by editing the file and resetting the version to e.g.
1100055.

-Dimitry


Received on Fri Mar 20 2015 - 19:45:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC