From owner-freebsd-ports@freebsd.org Thu Dec 29 16:30:06 2016 Return-Path: Delivered-To: freebsd-ports@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 E5827C9518F; Thu, 29 Dec 2016 16:30:06 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF4C11DC; Thu, 29 Dec 2016 16:30:05 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.walstatt.dynvpn.de ([85.178.51.182]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LfCX2-1ctiIf096W-00olxd; Thu, 29 Dec 2016 17:29:57 +0100 Date: Thu, 29 Dec 2016 17:29:49 +0100 From: "O. Hartmann" To: Dimitry Andric Cc: "O. Hartmann" , FreeBSD CURRENT , FreeBSD Ports , Ed Maste Subject: Re: emulators/qemu: qemu ports failing due to compiler error on 12-CURRENT Message-ID: <20161229172949.48792b29@thor.walstatt.dynvpn.de> In-Reply-To: <782FAC01-9A7C-438F-912C-831628A08E63@FreeBSD.org> References: <20161207104203.7c9524a3@thor.walstatt.dynvpn.de> <782FAC01-9A7C-438F-912C-831628A08E63@FreeBSD.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/FQZM9f28OGiPQLlAC9HOXt="; protocol="application/pgp-signature" X-Provags-ID: V03:K0:/WmAPBzqjBTSpmicoytyoCU86IvXv/ZfkSV0JbRBrVvxoAbL+V2 2cVPuOPZFocAe1jGEt4IWZBqIxT96vLeRuTbaM9akpVZfbmLMj0AN0qaeefTckXLzofnQRH 3Zsn+PfMlsi33ReKUbyzuEg2IdPpmz2eD4tGhdNGzJ9FtanuX42poFGCS8V8+A+Pwnw6DfC ozaUtiewc9MaoycX6hEjg== X-UI-Out-Filterresults: notjunk:1;V01:K0:9Nd6s85hcPw=:eHgQ4VqYK1EyWnc9WaVPXv vfnkTg366egmYZ+aA+/6vKlSVTiunvRbpkmk1zLCs+nccB30L9GlkOyu7zXFaNAP06x83BcdU l5IB4enLDCbaYDhkFayiV4ngbmQImccEqSL0iHxWQMHicp+uCmGapVIpCHmh/hMAhGaepxrQX Fofta3gd+cTJvIqYE4iw8Ps+aZQnAbQe1WzLm6m+xZxdUGw/5xqqtva4Xkdy7xysdsSuDg3mV S2QdtRBDVCAv5y2j9Ja9Wfk8yyrkvVCkmOUbNiyOua+qy9oyzKZK4prfoZq6CJTnJDgczwG5m rlowNoTcWxpx/m+1xHRmSjgVonzvDtZM8oCr1XQWCFBnohe24erbH5xZGwInNAQ4RiQt6gZG3 QhItz4MlSwZ0+K/N/zTLIP+m7XxkdrnZsDe2FPotq//r/sorxg5HcDMRDD3oTZFc4puq27i4W BIVQjVeLKoaMb6PDWvLfBf74PP4g9V68iBEgcwxg9dJzdzFgX4wP1ILvZUlKEJ0M76Z+TAQuG D0S5bt5ZEfz436bf1C00iL8o9+95NkJ0pvqCHpapMl7J4+/XUSXIOOdwslChd6YSX345CiFhk DjdWs4P1tSfod+3dnqNmObw+22fCez3UJkA3Gjqc44MjUDH/vCFLIDWm4lEJ6fOiLpV+TlVTH eozt61a3OihQn1TgnDdYgnvMqFxZo/hRPHJ/oEt+8iZKn1hQpcbfD8cSk8B3xxKtcU/ENd26n 89TCtbI3SpdhuatB4unsSt7P1kExt0Zb/eSIPjci5+GJX3Ivc404bizKT5A= X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2016 16:30:07 -0000 --Sig_/FQZM9f28OGiPQLlAC9HOXt= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Wed, 7 Dec 2016 23:31:01 +0100 Dimitry Andric schrieb: > On 07 Dec 2016, at 10:42, O. Hartmann wrote: > >=20 > > I try my first steps in cross compiling ports with poudriere and theref= ore I try to > > setup an appropriate jail and QEMU environment. > >=20 > > Well, I'm failing at the jail setup due to the non-exitence of any suit= able QEMU > > environment and for that I tried to figure out to find some proper HOWT= O. > > Searching via google ave some hints, but in questions which QEMU from p= orts should be > > used, all leave me alone, so I tried > >=20 > > emulators/qemu > > emulators/qemu-devel > > emulators/qemu-static > >=20 > > emulators/qemu is known for me to fail since months and the days of 11-= CURRENT, there > > is a compiler error spit out with clang 3.8 and now 3.9. The very same = for qemu-devel > > (both ports used with standard options, no extras). See also Bug 214873 > > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214873) and Bug 21= 5100 > > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215100). =20 >=20 > I couldn't reproduce the compilation errors, it builds fine for me until > the link phase. Well, I face this in poudriere on the most recent 12-CURRENT, too as well a= s 12-CURRENT buildworld today. On the host I'd like to run qemu for testing aarch64 binaries for a Odroid-= C2 project, I use a customized /etc/src.conf - but on poudriere, there is no such customi= sation but the failing is identical. >=20 >=20 > > I tried also emulators/qemu-static, but it also fails compiling on most= recent > > 12-CURRENT (as the others, too, also my poudriere environment, which ha= s also CURRENT > > jails) with > >=20 > > [...] > > /usr/bin/ld:../config-host.ld:14: syntax error > > c++: error: linker command failed with exit code 1 (use -v to see invoc= ation) > > [...] =20 >=20 > But this I *can* reproduce. It appears qemu wants to set the text > segment start address, using the -Ttext-segment=3D0x60000000 option to ld. >=20 > However, our base ld does not yet support this option, and then the > configure script tries to patch the default linker script using the > following construct: >=20 > $ld --verbose | sed \ > -e '1,/=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D/d' \ > -e '/=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D/,$d' \ > -e "s/[.] =3D [0-9a-fx]* [+] SIZEOF_HEADERS/. =3D $textseg_addr += SIZEOF_HEADERS/" \ > -e "s/__executable_start =3D [0-9a-fx]*/__executable_start =3D $t= extseg_addr/" > > config-host.ld >=20 > Unfortunately, it seems to run /usr/local/bin/ld in this case, and this > results in the following busted linker script line, which cannot be > parsed: >=20 > PROVIDE (__executable_start =3D 0x60000000SEGMENT_START("text-segment",= 0x08048000)); . > =3D SEGMENT_START("text-segment", 0x08048000) + SIZEOF_HEADERS; >=20 > If it would use /usr/bin/ld instead, the patching would succeed, and > the line would become: >=20 > PROVIDE (__executable_start =3D 0x60000000); . =3D 0x60000000 + SIZEOF_= HEADERS; >=20 > which is probably what was intended. >=20 > Probably, the configure script needs to be patched to run base ld, > or use the same ld invocation for both checking the -Ttext-segment > option support and patching the linker script. >=20 > -Dimitry >=20 Since for now all three QEMU ports are incapacitated, I start to float like= a dead man in the water. I do not know where to start looking for possible sources for the miscompilations and I'm wondering why others running 12-CURRENT do not see = the problem. I tried on different 12-CURRENT systems I have access to and its everwhere th= e same. Either, a mysterious configuration issue that finds its way also into poudr= iere - over clang 3.8 as well as 3.9.0 and 3.9.1 (I think it is 3.9.1 the most recent o= ne I used). Any hope? --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/FQZM9f28OGiPQLlAC9HOXt= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWGU5/QAKCRDS528fyFhY lMAqAf0S+TfEDtlRmxuaPmPO2yG3Qo5gI/x2I3lPZLgM00PcJaGjNoPiVvPwbrLh xk7DF/qGuDSH064VZhbQT4S/fheJAf9W/YRpXHpkg7wpdb/B+5198H0re6ZJ06Ef LS75hBF2ZfkUbb8VnbaUc2GWivPDCQylC1ReaouS5DPjY2NBUGFc =N6fY -----END PGP SIGNATURE----- --Sig_/FQZM9f28OGiPQLlAC9HOXt=--