Re: Attempting a xtoolchain-gcc head amd64->aarch64 cross buildworld failed for liblto_plugin.so loading error

2018-04-07 Thread Mark Millard via freebsd-ports
[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:
> 
>> On Sat, 7 Apr 2018 15:23:50 -0700
>> Mark Millard via freebsd-arm  wrote:
>> 
>>> My attempted, xtoolchain-gcc based, amd64->aarch64
>>> cross-buildworld-buildkernel failed with:
>>> 
>>> --- 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
>>> 
>>> (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.)
>>> . . .
>> 
>> IIRC, I had to disable LTO plugin in binutils and this need to
>> disable it was there for a while. 
> 
> Hmm . . .
> 
> # 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) . . .
> 
> # poudriere options -jFBSDFSSDjail -s devel/aarch64-binutils
> [00:00:00] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf
> ===> The following configuration options are available for 
> aarch64-binutils-2.30_2,1:
> RELRO=off: enable -z relro in ELF linker by default
> STATIC=on: Build static executables and/or libraries
> ===> Use 'make config' to modify these settings
> . . .
> 
> 
> Controlling LTO's presence via my port build does
> not seem to be the way to disable LTO.
> 
> 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.
> 
> Looks like I've some research to do for how.
> 
> 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=on: 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.

===
Mark Millard
marklmi26-fbsd at yahoo.com
( dsl-only.net went
away in early 2018-Mar)






___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Attempting a xtoolchain-gcc head amd64->aarch64 cross buildworld failed for liblto_plugin.so loading error

2018-04-07 Thread Mark Millard via freebsd-ports
On 2018-Apr-7, at 3:35 PM, Alexander Kabaev  wrote:

> On Sat, 7 Apr 2018 15:23:50 -0700
> Mark Millard via freebsd-arm  wrote:
> 
>> My attempted, xtoolchain-gcc based, amd64->aarch64
>> cross-buildworld-buildkernel failed with:
>> 
>> --- 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
>> 
>> (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.)
>> . . .
> 
> IIRC, I had to disable LTO plugin in binutils and this need to
> disable it was there for a while. 

Hmm . . .

# 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) . . .

# poudriere options -jFBSDFSSDjail -s devel/aarch64-binutils
[00:00:00] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf
===> The following configuration options are available for 
aarch64-binutils-2.30_2,1:
 RELRO=off: enable -z relro in ELF linker by default
 STATIC=on: Build static executables and/or libraries
===> Use 'make config' to modify these settings
. . .


Controlling LTO's presence via my port build does
not seem to be the way to disable LTO.

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.

Looks like I've some research to do for how.

Thanks for letting me know.


===
Mark Millard
marklmi26-fbsd at yahoo.com
( dsl-only.net went
away in early 2018-Mar)






___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Attempting a xtoolchain-gcc head amd64->aarch64 cross buildworld failed for liblto_plugin.so loading error

2018-04-07 Thread Mark Millard via freebsd-ports
My attempted, xtoolchain-gcc based, amd64->aarch64 cross-buildworld-buildkernel 
failed with:

--- 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

(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.)

For reference:

# uname -apKU
FreeBSD FBSDFSSD 12.0-CURRENT FreeBSD 12.0-CURRENT  r332181M  amd64 amd64 
1200061 1200061

# pkg info "*binutils"
aarch64-binutils-2.30_2,1
amd64-binutils-2.30_2,1
binutils-2.30_2,1
powerpc64-binutils-2.30_2,1

# svnlite info /usr/ports/ | grep "Re[plv]"
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 466704
Last Changed Rev: 466704

# file /usr/local/libexec/gcc/*/*/liblto*
/usr/local/libexec/gcc/aarch64-unknown-freebsd12.0/6.3.0/liblto_plugin.so:  
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/aarch64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0:
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/aarch64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0.0.0:
   ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically 
linked, with debug_info, not stripped
/usr/local/libexec/gcc/powerpc64-unknown-freebsd12.0/6.3.0/liblto_plugin.so:
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/powerpc64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0:  
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/powerpc64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0.0.0:
 ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, 
with debug_info, not stripped
/usr/local/libexec/gcc/x86_64-unknown-freebsd12.0/6.3.0/liblto_plugin.so:   
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/x86_64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0: 
   symbolic link to liblto_plugin.so.0.0.0
/usr/local/libexec/gcc/x86_64-unknown-freebsd12.0/6.3.0/liblto_plugin.so.0.0.0: 
   ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically 
linked, with debug_info, not stripped



make[4]: stopped in /usr/src/lib/libc
.ERROR_TARGET='libc.so.7.full'
.ERROR_META_FILE='/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/lib/libc/libc.so.7.full.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='@echo building shared library libc.so.7; @rm -f libc.so.7 libc.so; 
/usr/local/bin/aarch64-unknown-freebsd12.0-gcc -mcpu=cortex-a53 -isystem 
/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/usr/include
 
-L/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/usr/lib
 
-B/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/usr/lib
 
--sysroot=/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp
 -B/usr/local/aarch64-unknown-freebsd12.0/bin/  -nodefaultlibs 
-Wl,--version-script=Version.map  -shared -Wl,-x -Wl,--fatal-warnings 
-Wl,--warn-shared-textrel  -o libc.so.7.full -Wl,-soname,libc.so.7  
`NM='/usr/local/aarch64-unknown-freebsd12.0/bin/nm' NMFLAGS='' lorder 
machdep_ldisQ.pico
. . .
wcspbrk.pico wcsrchr.pico wcsspn.pico wcsstr.pico wcstok.pico wcswidth.pico 
wcsxfrm.pico wmemchr.pico wmemcmp.pico wmemcpy.pico wmemmove.pico wmemset.pico 
|  tsort -q`  -lcompiler_rt  -lssp_nonshared;'
.CURDIR='/usr/src/lib/libc'
.MAKE='make'
.OBJDIR='/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/lib/libc'
.TARGETS='all'
DESTDIR='/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp'
LD_LIBRARY_PATH=''
MACHINE='arm64'
MACHINE_ARCH='aarch64'
MAKEOBJDIRPREFIX=''
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20180222'
PATH='/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/legacy/usr/sbin:/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/legacy/usr/bin:/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/legacy/bin:/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/usr/sbin:/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk 
/usr/src/share/mk/src.sys.env.mk 
/root/src.configs/src.conf.cortexA53-xtoolchain-gcc.amd64-host 
/usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk 
/usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk 
/root/src.configs/make.conf /usr/src/share/mk/local.sys.mk 
/usr/src/share/mk/src.sys.mk /dev/null /usr/src/lib/libc/Makef