From owner-freebsd-current@freebsd.org Wed Oct 7 20:54:14 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BDC29D10BD for ; Wed, 7 Oct 2015 20:54:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D67E61D41; Wed, 7 Oct 2015 20:54:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 565C8B945; Wed, 7 Oct 2015 16:54:12 -0400 (EDT) From: John Baldwin To: "O. Hartmann" Cc: freebsd-current@freebsd.org, Dimitry Andric Subject: Re: CURRENT: build failure with clang 3.7.0 Date: Wed, 07 Oct 2015 13:50:54 -0700 Message-ID: <2790993.pgulpShlNy@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20151007210950.60474f36.ohartman@zedat.fu-berlin.de> References: <20151007093727.0db8e2e6@freyja.zeit4.iv.bundesimmobilien.de> <10633363.fQY0fDW1VU@ralph.baldwin.cx> <20151007210950.60474f36.ohartman@zedat.fu-berlin.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 07 Oct 2015 16:54:12 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 07 Oct 2015 20:54:14 -0000 On Wednesday, October 07, 2015 09:09:50 PM O. Hartmann wrote: > Am Wed, 07 Oct 2015 11:03 -0700 > John Baldwin schrieb: > > > On Wednesday, October 07, 2015 01:33:23 PM O. Hartmann wrote: > > > On Wed, 7 Oct 2015 13:23:48 +0200 > > > Dimitry Andric wrote: > > > > > > > On 07 Oct 2015, at 09:37, O. Hartmann wrote: > > > > > > > > > > I hit on a box this nasty/sticky error when performing buildworld. > > > > > > > > > > /usr/src is on r288980 > > > > ... > > > > > --- ieee802_11_common.o --- > > > > ... > > > > > -c /usr/src/usr.sbin/wpa/wpa_supplicant/../../../contrib/wpa//src/common/ieee802_11_common.c > > > > > -o ieee802_11_common.o Cannot emit physreg copy instruction UNREACHABLE > > > > > executed > > > > > at /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3935! > > > > > > > > Somebody else reported the same to me yesterday. This is an upstream > > > > bug with AVX (which is still present in llvm trunk), so for now you need > > > > to set your CPUTYPE to something that doesn't have AVX, or simply unset > > > > your CPUTYPE. > > > > > > > > The bug has been reported upstream, and once there is a fix, I will > > > > import it ASAP. > > > > > > > > -Dimitry > > > > > > > > > > Funny, I have several other boxes, definitely having AVX aboard: > > > > > > [... from dmesg] > > > Jul 29 07:05:52 freyja kernel: CPU: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz > > > (3491.98-MHz K8-class CPU) > > > Jul 29 07:05:52 freyja kernel: Origin="GenuineIntel" Id=0x306f2 Family=0x6 > > > Model=0x3f Stepping=2 > > > Jul 29 07:05:52 freyja kernel: > > > Features=0xbfebfbff > > > Jul 29 07:05:52 freyja kernel: > > > Features2=0x7dfefbff > > > Jul 29 07:05:52 freyja kernel: AMD > > > Features=0x2c100800 > > > Jul 29 07:05:52 freyja kernel: AMD Features2=0x21 > > > Jul 29 07:05:52 freyja kernel: Structured Extended > > > Features=0x37ab > > > > > > [...] > > > > > > which is a most recent Haswell XEON and builds world fine. My personal failing > > > box is a i3-32XX, IvyBridge, but the IvyBridge E3-124XX XEON builds well. > > > > It's not about whether your CPU supports it, it is about whether or not you have > > asked the compiler to use it. Normally by setting 'CPUTYPE' in /etc/make.conf > > or the like. (I also was bitten by this yesterday on my sandbridge laptop > > where I have 'CPUTYPE=corei7-avx' in /etc/src.conf.) The workaround is to not > > set CPUTYPE (or set it to something without AVX like just 'corei7'). > > > > Hello. > > Well, I guess I understood the usage of CPUTYPE. Maybe I did not express myself in the > clear, but I wanted to emphasize the fact that I'm using two CPUs supposedly of the same > architectural design and if the AVX feature is indeed the culprit, then the question is > why the one CPU compiles and the other not. I use on all machines the very same src.conf > and make.conf except for the kernel name. So this would imply that on all boxes the very > same feature set, identified by the CPU type, would be used. So far the theory. > > I did not check the expansion of CPUTYPE on both systems failing the buildworld, so maybe > there is a slight difference there ... Are you using CPUTYPE=native? If so, the Haswell box might very well follow a different chain of optimizations that avoids this edge case. -- John Baldwin