From nobody@FreeBSD.org  Sun Oct 13 03:33:45 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 0515D954
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Oct 2013 03:33:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B7E012F28
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Oct 2013 03:33:44 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9D3Xhtl050366
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Oct 2013 03:33:43 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9D3XhA3050351;
	Sun, 13 Oct 2013 03:33:43 GMT
	(envelope-from nobody)
Message-Id: <201310130333.r9D3XhA3050351@oldred.freebsd.org>
Date: Sun, 13 Oct 2013 03:33:43 GMT
From: "Kenta S." <kentas@hush.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeBSD 10 (and 11) build failures with ccache
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182944
>Category:       bin
>Synopsis:       FreeBSD 10 (and 11) build failures with ccache
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 13 03:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kenta S.
>Release:        10-ALPHA6
>Organization:
>Environment:
>Description:
Using ccache, "make buildworld" is failing. I found
this mailing list post describing a similar issue:

https://lists.freebsd.org/pipermail/freebsd-current/2013-May/042035.html

The main issue is:

/usr/bin/ld: this linker was not configured to use sysroots

It fails like so:

/usr/local/libexec/ccache/cc -m32 -march=native -DCOMPAT_32BIT  -isystem /usr/obj/usr/src/lib32/usr/include/  -L/usr/obj/usr/src/lib32/usr/lib32  -B/usr/obj/usr/src/lib32/usr/lib32 --sysroot=/usr/obj/usr/src/tmp -fpic -DPIC  -O2 -pipe -Qunused-parameter -Qunused-arguments -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386 -DNLS  -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -I/usr/src/lib/libc/../../contrib/libc-vis -I/usr/obj/lib32/usr/src/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libc/../../contrib/jemalloc/include -I/usr/src/lib/libc/../../contrib/tzcode/stdtime -I/usr/src/lib/libc/stdtime  -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-ta
 utological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -c /usr/src/lib/libc/string/wmemset.c -o wmemset.So
building shared library libc.so.7
/usr/bin/ld: this linker was not configured to use sysroots
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/libc
*** Error code 1

Stop.
make[3]: stopped in /usr/src
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
>How-To-Repeat:

>Fix:
"the base binutils could be fixed to enable --sysroot support."

>Release-Note:
>Audit-Trail:
>Unformatted:
