FYI on aarch64: building and installing devel/aarch64-gcc fails with "Unable to access file" for 6 files

Mark Millard markmi at dsl-only.net
Thu Apr 20 00:09:37 UTC 2017


The attempt to build & install devel/aarch64-gcc on a aarch64 environment
gets (I use WRKDIRPREFIX=/usr/obj/portswork ):

===>  Installing for aarch64-gcc-6.3.0
===>  Checking if aarch64-gcc already installed
===>   Registering installation for aarch64-gcc-6.3.0 as automatic
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/bin/aarch64-unknown-freebsd12.0-gcov:No such file or directory
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/bin/aarch64-unknown-freebsd12.0-gcov-tool:No such file or directory
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-cpp.1.gz:No such file or directory
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-g++.1.gz:No such file or directory
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-gcc.1.gz:No such file or directory
pkg-static: Unable to access file /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-gcov.1.gz:No such file or directory
*** Error code 74

Stop.
make: stopped in /usr/ports/devel/aarch64-gcc

===>>> Installation of aarch64-gcc-6.3.0 (devel/aarch64-gcc) failed


A hack before doing a portmaster -CDK lang/aarch64-gcc to continue
the build/install is to execute the script shown below (I use
WRKDIRPREFIX=/usr/obj/portswork ):

# more ~/aarch64-gcc_fixup.sh 
#!/bin/sh
cp -ax /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/.build/gcc/gcov /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/bin/aarch64-unknown-freebsd12.0-gcov

cp -ax /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/.build/gcc/gcov-tool /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/bin/aarch64-unknown-freebsd12.0-gcov-tool

gzip -c /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/gcc-*/gcc/doc/cpp.1 > /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-cpp.1.gz

gzip -c /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/.build/gcc/doc/g++.1 > /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-g++.1.gz

gzip -c /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/.build/gcc/doc/gcc.1 > /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-gcc.1.gz

gzip -c /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/gcc-*/gcc/doc/gcov.1 > /usr/obj/portswork/usr/ports/devel/aarch64-gcc/work/stage/usr/local/man/man1/aarch64-unknown-freebsd12.0-gcov.1.gz

That puts in place the files that are not where they are expected.

Of course this sort of hack-then-continue would not fit well
with poudriere use or analogous build techniques.


The same sort of thing happens for lang/powerpc64 on a powerpc64
environment.

As I remember. . .
The same sort of thing happens for lang/amd64 on a amd64
environment.

So I have ~/powerpc64-gcc_fixup.sh and ~/amd64-gcc_fixup.sh
as well.


I get to these ???-gcc's by trying to install a
self-hosted lang/???-xtoolchain-gcc in each case.
Such allows for experimenting with self-hosted gcc
based system builds that are libc++ based (instead
of using gcc 4.2.1).

===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-arm mailing list