From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 8 19:04:25 2010 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC3471065673; Mon, 8 Nov 2010 19:04:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) 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 6EB168FC27; Mon, 8 Nov 2010 19:04:25 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734] (unknown [IPv6:2001:7b8:3a7:0:a408:958e:5aa:3734]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A98495C43; Mon, 8 Nov 2010 20:04:24 +0100 (CET) Message-ID: <4CD849C1.7040106@FreeBSD.org> Date: Mon, 08 Nov 2010 20:04:33 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101104 Lanikai/3.1.7pre MIME-Version: 1.0 To: Emanuel Haupt References: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> In-Reply-To: <20101108144811.4a737a7a.ehaupt@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: ccache pausing in buildworld X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 19:04:26 -0000 On 2010-11-08 14:48, Emanuel Haupt wrote: > After updating and zeroing the cache files the a build of RELENG_8_1 fails with: > > CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crti.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crtn.S > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -DGCRT -c -o gcrt1_c.o /usr/src/lib/csu/i386-elf/crt1_c.c > /usr/local/libexec/ccache/world-cc -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /usr/src/lib/csu/i386-elf/crt1_s.S > /usr/src/lib/csu/i386-elf/crt1_s.S: Assembler messages: > /usr/src/lib/csu/i386-elf/crt1_s.S:34: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:37: Error: `8(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:38: Error: suffix or operands invalid for `push' > /usr/src/lib/csu/i386-elf/crt1_s.S:39: Error: `4(%ebp)' is not a valid 64 bit base/index expression > /usr/src/lib/csu/i386-elf/crt1_s.S:40: Error: suffix or operands invalid for `push' > *** Error code 1 This is during the 32-bit build stage on amd64? If so, what will happen, depends on how you defined CC. Makefile.inc1 defines CC as an environment variable for a sub-make, using something like: CC="${CC} -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32" However, if you either put CC=/usr/local/libexec/ccache/world-cc on the make command line, or in /etc/src.conf or /etc/make.conf as an unconditional assignment, it will *always* override the above setting through the environment, causing the 32-bit build stage to fail. If this is the case, you could use the same construction I have been using to get clang to build the 32-bit stage properly, e.g. put: .if !defined(CC) || ${CC} == "cc" CC=/usr/local/libexec/ccache/world-cc .endif .if !defined(CXX) || ${CXX} == "c++" CXX=/usr/local/libexec/ccache/world-cc .endif in your src.conf or make.conf, as a workaround. Really fixing this issue requires rather ugly hackery in Makefile.inc1, bsd.*.mk and so on, though... :-/