From owner-freebsd-stable@FreeBSD.ORG Tue Oct 2 21:48:12 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D4B106564A for ; Tue, 2 Oct 2012 21:48:12 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 23E448FC1D for ; Tue, 2 Oct 2012 21:48:12 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 40AAE5C59; Tue, 2 Oct 2012 23:48:10 +0200 (CEST) Message-ID: <506B6118.1020701@andric.com> Date: Tue, 02 Oct 2012 23:48:08 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120925 Thunderbird/16.0 MIME-Version: 1.0 To: Eitan Adler References: <506A9D89.80303@gmail.com> <506AB019.70501@andric.com> <506B0FF5.5050505@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Volodymyr Kostyrko , stable@freebsd.org Subject: Re: Missing lib on linking libc WITH_LIBCPLUSPLUS X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 21:48:12 -0000 On 2012-10-02 19:27, Eitan Adler wrote: > On 2 October 2012 12:01, Volodymyr Kostyrko wrote: ... >> Bingo. Yes, disabling ccache makes everything work. > please ping the ccache folk about this. It *shouldn't* matter. :) In this case, ccache apparently does not realize that the world stage is using the toolchain built during the cross-tools stage, which usually is in /usr/obj/usr/src/tmp/usr/bin. This toolchain uses another include and lib path, e.g. it only refers to headers and libraries under /usr/obj, specifically *not* those in the base system. In Volodymyr's original log, you can see /usr/bin/ld being invoked by the compiler driver, not /usr/obj/usr/src/tmp/usr/bin/ld. I think ccache invokes /usr/bin/cc, instead of /usr/obj/usr/src/tmp/usr/bin/cc. Normally ccache searches the PATH to find the 'real' cc executable, but I am not sure why this goes wrong during the world stage. It would be interesting to see some verbose logging from ccache, to see how it finds the cc executable here.