From owner-freebsd-current@FreeBSD.ORG Sat Nov 5 13:19:58 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B41106567A for ; Sat, 5 Nov 2011 13:19:58 +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 9C3308FC19 for ; Sat, 5 Nov 2011 13:19:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:5502:9023:fa7c:ca0f] (unknown [IPv6:2001:7b8:3a7:0:5502:9023:fa7c:ca0f]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BFEE05C59; Sat, 5 Nov 2011 14:19:57 +0100 (CET) Message-ID: <4EB53803.2000205@FreeBSD.org> Date: Sat, 05 Nov 2011 14:20:03 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111031 Thunderbird/8.0 MIME-Version: 1.0 To: "Michael W. Lucas" References: <20111104190912.GA21948@bewilderbeast.blackhelicopters.org> In-Reply-To: <20111104190912.GA21948@bewilderbeast.blackhelicopters.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: 9.0/i386 build failure X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2011 13:19:58 -0000 On 2011-11-04 20:09, Michael W. Lucas wrote: > I suspect I'm building on a system that's too old, but it's worth > asking. > > FreeBSD eyeball.lodden.com 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat Aug 29 00:31:14 EDT 2009 mwlucas@stretchlimo.blackhelicopters.org:/usr/obj/usr/src/sys/GENERIC i386 > > csup today. no /etc/src.conf, /etc/make.conf only contains a perl > definition. > > ... > c++ -O2 -pipe -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 -DLLVM_HOSTTRIPLE=\"i386-unknown-freebsd9.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -static -L/usr/obj/usr/src/tmp/legacy/usr/lib -o tblgen ARMDecoderEmitter.o AsmMatcherEmitter.o AsmWriterEmitter.o AsmWriterInst.o CallingConvEmitter.o CodeEmitterGen.o CodeGenDAGPatterns.o CodeGenInstruction.o CodeGenRegisters.o CodeGenTarget.o DAGISelEmitter.o DAGISelMatcher.o DAGISelMatcherEmitter.o DAGISelMatcherGen.o DAGISelMatcherOpt.o DisassemblerEmitter.o EDEmitter.o FastISelEmitter.o FixedLenDecoderEmitter.o InstrEnumEmitter.o InstrInfoEmitter.o IntrinsicEmitter.o PseudoLoweringEmitter.o RegisterInfoEmi tter.o SetTheory.o StringMatcher.o SubtargetEmitter.o TGValueTypes.o TableGen.o X86DisassemblerTables.o X86RecognizableInstr.o /usr/obj/usr/src/tmp/usr/src/usr.bin/clang/tblgen/../../../lib/clang/libllvmtablegen/libllvmtablegen.a /usr/obj/usr/src/tmp/usr/src/usr.bin/clang/tblgen/../../../lib/clang/libllvmsupport/libllvmsupport.a -legacy > /usr/obj/usr/src/tmp/usr/src/usr.bin/clang/tblgen/../../../lib/clang/libllvmsupport/libllvmsupport.a(Atomic.o)(.text+0x25): In function `llvm::sys::AtomicIncrement(unsigned int volatile*)': > : undefined reference to `__sync_add_and_fetch_4' Hm, the only way I can imagine this happening, is then you compile your system with -march=i386. In that case the atomic primitives, such as __sync_add_and_fetch, are called as external functions, which would lead to a link error like the above. I tried building 9-STABLE from a 9-CURRENT box that was not updated since April 2011, and from a fairly recent 8-STABLE, but both did not exhibit this issue. Are you using any special other settings, e.g. in your environment, or on the make command line? In case, it would be handy if you post the full buildlog somewhere, so we can see which flags have been used to compile the llvmsupport library.