From owner-freebsd-ports@freebsd.org Sun Apr 8 01:10:59 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91D13F94D88 for ; Sun, 8 Apr 2018 01:10:59 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic304-23.consmr.mail.gq1.yahoo.com (sonic304-23.consmr.mail.gq1.yahoo.com [98.137.68.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 166637B5AA for ; Sun, 8 Apr 2018 01:10:58 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: gph0To0VM1kw9kSONz_3BBKLlyElF3GV_x.3wB8oci5knbt5nFoT.bUjSS_wH7M r1L2qbClVZzrNt0igUtHeft_lObMoYHwWYnTDf5kQcEGzVun4fA.ziu4V1dSoZh8VkooW3uAu8Oe Us9ZRyPE0zIAErx.EbWGdNjmnXWDMkxe0q4awyVShuvr6a3SzDqFY7EN5N018RyOqPJWnFxHIxAb eoLOPvxARyYpFEc2lqFdhsHKaEUqS6dN4tWwpWye36uOUfn3qfJIWI4qURbtx7P6HrxlCA_1U_1R 88zbOFt_C7DnNoPBrEA2fVtxjIYbL36u0omMmQs_BmSXZMfSzUldaPgqGZH0KqhzPWdm5OzWXOod PqJB4s4SU7RPl.7SZAxRNyvTlqWb6Bje99RGgIIFgS8pSGqUwmaWFXk9_u7q0Tf5.kRD54StTF7t fo1UL9omRYuufc9vQv0XA4avUxN9VxncCmMCOLSa9Sh8lyrWbv0HaUhLCUxWVpw0D.RsaAFNEou7 z.9KeEO5NNmEzoA.XHCKdd1OgK6DGOsPjjQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sun, 8 Apr 2018 01:10:52 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp416.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 79fad1c6c00a9c2ac155ff9053219590; Sun, 08 Apr 2018 01:00:39 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: Attempting a xtoolchain-gcc head amd64->aarch64 cross buildworld failed for liblto_plugin.so loading error From: Mark Millard In-Reply-To: <2EEE5E34-12BB-4F21-A5F2-17F232433BD8@yahoo.com> Date: Sat, 7 Apr 2018 18:00:38 -0700 Cc: freebsd-arm@freebsd.org, freebsd-toolchain@freebsd.org, FreeBSD Ports Content-Transfer-Encoding: quoted-printable Message-Id: <60F5D584-4A93-4D49-94C1-209CC74ABF3A@yahoo.com> References: <20180407183525.2e72ee42@kan> <2EEE5E34-12BB-4F21-A5F2-17F232433BD8@yahoo.com> To: Alexander Kabaev X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2018 01:10:59 -0000 [The static build of binutils is what gets the lto involved.] On 2018-Apr-7, at 5:29 PM, Mark Millard = wrote: > On 2018-Apr-7, at 3:35 PM, Alexander Kabaev = wrote: >=20 >> On Sat, 7 Apr 2018 15:23:50 -0700 >> Mark Millard via freebsd-arm wrote: >>=20 >>> My attempted, xtoolchain-gcc based, amd64->aarch64 >>> cross-buildworld-buildkernel failed with: >>>=20 >>> --- libc.so.7.full --- >>> /usr/local/bin/aarch64-unknown-freebsd12.0-ld: = /usr/local/libexec/gcc/aarch64-unknown-freebsd12.0/6.3.0/liblto_plugin.so:= >>> error loading plugin: Service unavailable collect2: error: ld >>> returned 1 exit status *** [libc.so.7.full] Error code 1 >>>=20 >>> (I've not attempted such a build in a long time, so I do not >>> know how new this is. Historically I've done lots of such >>> builds. cortex-a53 was specifically targeted here.) >>> . . . >>=20 >> IIRC, I had to disable LTO plugin in binutils and this need to >> disable it was there for a while.=20 >=20 > Hmm . . . >=20 > # pkg info aarch64-binutils > aarch64-binutils-2.30_2,1 > Name : aarch64-binutils > Version : 2.30_2,1 > Installed on : Tue Feb 6 17:37:31 2018 PST > Origin : devel/aarch64-binutils > Architecture : FreeBSD:12:amd64 > Prefix : /usr/local > Categories : devel > Licenses : GPLv3, LGPL3 > Maintainer : bapt at FreeBSD.org > WWW : http://sources.redhat.com/binutils/ > Comment : GNU binutils for AArch64 cross-development > Options : > RELRO : off > STATIC : on > . . . (no more options listed) . . . >=20 > # poudriere options -jFBSDFSSDjail -s devel/aarch64-binutils > [00:00:00] Appending to make.conf: = /usr/local/etc/poudriere.d/make.conf > =3D=3D=3D> The following configuration options are available for = aarch64-binutils-2.30_2,1: > RELRO=3Doff: enable -z relro in ELF linker by default > STATIC=3Don: Build static executables and/or libraries > =3D=3D=3D> Use 'make config' to modify these settings > . . . >=20 >=20 > Controlling LTO's presence via my port build does > not seem to be the way to disable LTO. >=20 > This would suggest that I need to override part > of what buildworld does in order to force avoiding > lto. Such would be the first time that I've run > into that. >=20 > Looks like I've some research to do for how. >=20 > Thanks for letting me know. I had forgotten but I'd analyzed this once before: = https://lists.freebsd.org/pipermail/freebsd-ports/2017-August/109769.html and it traced back to: STATIC=3Don: Build static executables and/or libraries for aarch64-binutils. (Static was at the time required for a poudriere/qemu mix that used aarch64-binutils.) (I do-not/did-not see such problems for powerpc64 targeted cross builds using xtoolchain material, such as powerpc64-binutils and powerpc64-gcc. This is specific to aarch64 for some reason.) So I'll see about turning STATIC off to enable buildworld. =3D=3D=3D Mark Millard marklmi26-fbsd at yahoo.com ( dsl-only.net went away in early 2018-Mar)