Revision 250659 breaks down the build of the world

Brooks Davis brooks at freebsd.org
Wed May 22 16:09:16 UTC 2013


On Wed, May 22, 2013 at 06:52:14PM +0300, Ivan Klymenko wrote:
> ?? Wed, 22 May 2013 09:31:57 -0500
> Brooks Davis <brooks at freebsd.org> ??????????:
> 
> > On Wed, May 22, 2013 at 11:08:56AM +0300, Ivan Klymenko wrote:
> > > ?? Tue, 21 May 2013 12:00:54 -0500
> > > Brooks Davis <brooks at freebsd.org> ??????????:
> > > 
> > > > I belive this is now fixed in r250859.  Sorry about the breakage.
> > > > 
> > > > -- Brooks
> > > > 
> > > Unfortunately it did not fix the error when building the world.
> > > I still watch an error like this:
> > > --- /usr/bin/ld: this linker was not configured to use sysroots
> > > clang: error: linker command failed with exit code 1 (use -v to see
> > > invocation) *** [libc.so.7] Error code 1
> > 
> > Please provide your make command like as well as any variables set in
> > make.conf and src.conf.
> > 
> > -- Brooks
> 
> /etc/src.conf = NULL
> 
> /etc/make.conf
> ###WITHOUT_CLANG_IS_CC=yes
> WRKDIRPREFIX=/usr/ports_build
> KERNCONF=mk10
> WITH_PKGNG=yes
> MALLOC_PRODUCTION=yes
> #CFLAGS+=-g
> 
> #============================================================================#
> #For ccache
> .if !defined(NO_CCACHE)
> CCACHE_CPP2=1
> WITH_CCACHE_BUILD=yes
> .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
> CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/clang,1}
> CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/clang++,1}
> CPUTYPE?=corei7-avx
> CFLAGS+=-O3
> CFLAGS+=-fcolor-diagnostics
> .endif
> .endif
> #============================================================================#
> # added by use.perl 2013-05-18 22:48:36
> PERL_VERSION=5.14.2
> 
> make command
> make buildkernel
> 
> ...
> /usr/local/libexec/ccache/world/clang --sysroot=/usr/obj/usr/src/tmp
> -B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing
> -march=corei7-avx -std=c99 -g -Wall -Wredundant-decls -Wnested-externs
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
> -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions
> -Wmissing-include-dirs -fdiagnostics-show-option
> -Wno-error-tautological-compare -Wno-error-empty-body
> -Wno-error-parentheses-equality  -nostdinc  -I. -I/usr/src/sys
> -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL
> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
> -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone
> -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables
> -ffreestanding -fstack-protector -Werror  config.c ctfconvert -L
> VERSION -g config.o /usr/local/libexec/ccache/world/clang
> --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -c -O2
> -pipe -fno-strict-aliasing -march=corei7-avx -std=c99 -g -Wall
> -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
> -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
> -fdiagnostics-show-option  -Wno-error-tautological-compare
> -Wno-error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I.
> -I/usr/src/sys -I/usr/src/sys/contrib/altq
> -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
> -include opt_global.h  -fno-omit-frame-pointer -mno-aes -mno-avx
> -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror  env.c ctfconvert -L VERSION -g
> env.o /usr/local/libexec/ccache/world/clang
> --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -c -O2
> -pipe -fno-strict-aliasing -march=corei7-avx -std=c99 -g -Wall
> -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
> -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
> -fdiagnostics-show-option  -Wno-error-tautological-compare
> -Wno-error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I.
> -I/usr/src/sys -I/usr/src/sys/contrib/altq
> -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
> -include opt_global.h  -fno-omit-frame-pointer -mno-aes -mno-avx
> -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror  hints.c ctfconvert -L VERSION -g
> hints.o /usr/local/libexec/ccache/world/clang
> --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -c -O2
> -pipe -fno-strict-aliasing -march=corei7-avx -std=c99 -g -Wall
> -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
> -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
> -fdiagnostics-show-option  -Wno-error-tautological-compare
> -Wno-error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I.
> -I/usr/src/sys -I/usr/src/sys/contrib/altq
> -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
> -include opt_global.h  -fno-omit-frame-pointer -mno-aes -mno-avx
> -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror  vnode_if.c ctfconvert -L VERSION -g vnode_if.o :>
> hack.c /usr/local/libexec/ccache/world/clang
> --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -shared
> -nostdlib hack.c -o hack.So /usr/bin/ld: this linker was not configured
> to use sysroots clang: error: linker command failed with exit code 1
> (use -v to see invocation) *** Error code 1

The use of absolute paths in the ccache setup trips some of the external
toolchain code which requires that you not use the system binutils.  You
could work around this in a couple ways.  One would be to use a version
of clang compiled to use binutils from ports since that one enables
sysroot.  Another would be a version of clang compiled with the cross
tools binutils.  Finally, the base binutils could be fixed to enable
--sysroot support.  The latter is the right answer, but no one has done
the work yet.  It should be relatively trivial, you just need to force
the default sysroot to /.

-- Brooks

P.S. not mentioning the use of ccache was a sure way to waste developer
time trying to fix your problems.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130522/0d14cff8/attachment.sig>


More information about the freebsd-current mailing list