Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2016 23:56:49 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: base/gcc (from ports/head -r424540) requires older mpfr (3.1.4 vs. the installed 3.1.5); other points to get a build. . .
Message-ID:  <AB5C6ADD-3E50-40ED-BD3B-BCBBBCD60547@dsl-only.net>
In-Reply-To: <C43755D4-7D5C-4949-BFF4-C4590CE0625D@dsl-only.net>
References:  <C43755D4-7D5C-4949-BFF4-C4590CE0625D@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-Nov-8, at 8:14 PM, Mark Millard <markmi@dsl-only.net> wrote:

> My attempt to build (package) base/gcc for targeting powerpc64 failed:
>=20
>> Script started on Tue Nov  8 19:59:23 2016
>> Command: make CROSS_TOOLCHAIN=3Dpowerpc64-gcc =
CROSS_SYSROOT=3D/usr/obj/DESTDIRs/xtoolchain-powerpc64-installworld =
package
> . . .
>> =3D> mpfr-3.1.4.tar.xz doesn't seem to exist in =
/usr/ports/distfiles/.
>> =3D> Attempting to fetch =
http://www.mpfr.org/mpfr-current/mpfr-3.1.4.tar.xz
>> fetch: http://www.mpfr.org/mpfr-current/mpfr-3.1.4.tar.xz: Not Found
>> =3D> Attempting to fetch =
http://distcache.FreeBSD.org/ports-distfiles/mpfr-3.1.4.tar.xz
>> fetch: =
http://distcache.FreeBSD.org/ports-distfiles/mpfr-3.1.4.tar.xz: Not =
Found
>> =3D> Couldn't fetch it - please try to retrieve this
>> =3D> port manually into /usr/ports/distfiles/ and try again.
>> *** Error code 1
>>=20
>> Stop.
>> make: stopped in /usr/ports/base/gcc
>>=20
>> Script done, output file is /root/ports_typescripts/gcc_00.typescript
>=20
> # pkg info | grep mpfr
> mpfr-3.1.5                     Library for multiple-precision =
floating-point computations

After updating it locally to reference 3.1.5 there were two more =
problems. . .

> configure: error: Specified CC_FOR_BUILD doesn't seem to work
> gmake[1]: *** [Makefile:4519: configure-gmp] Error 1
> gmake[1]: *** Waiting for unfinished jobs....
> . . .
> gmake[1]: Leaving directory =
'/usr/obj/portswork/usr/ports/base/gcc/work/.build'
> =3D=3D=3D> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the =
failure to
> the maintainer.
> *** Error code 1
>=20
> Stop.
> make: stopped in /usr/ports/base/gcc

Needed the command to exist: gcc

So I created:

# ls -l /usr/local/bin/gcc
lrwxr-xr-x  1 root  wheel  4 Nov  8 20:29 /usr/local/bin/gcc -> gcc6

(The only host gcc installed is gcc6 in my context.)

(base/binutils also required such a gcc that would be found by default.)

Then it got farther but there was later:

> configure: error: C++ compiler missing or inoperational
> gmake[1]: *** [Makefile:2717: configure-build-libcpp] Error 1
> gmake[1]: *** Waiting for unfinished jobs....

Needed the command to exist: g++

So I created:

# ls -l /usr/local/bin/g++
lrwxr-xr-x  1 root  wheel  4 Nov  8 20:33 /usr/local/bin/g++ -> g++6

(base/bintutils did not require this.)


After that it got much farther. But it stopped with missing files, =
including sparc ones for a powerpc64 context:

> =3D=3D=3D>  Building package for freebsd-gcc-5.4.0
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/include/visintrin.h: No such file or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/sparc/freebsd.h: No such =
file or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/sparc/sparc-opts.h: No such =
file or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/sparc/sparc-protos.h: No =
such file or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/sparc/sparc.h: No such file =
or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/sparc/sysv4.h: No such file =
or directory
> pkg-static: Unable to access file =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/vxworks-dummy.h: No such =
file or directory
> *** Error code 1
>=20
> Stop.
> make: stopped in /usr/ports/base/gcc

As far as what is really there for powerpc64:

> # ls =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/include/ | grep "^v"
> varargs.h
> vec_types.h

> # ls =
/usr/obj/portswork/usr/ports/base/gcc/work/stage/usr/lib/gcc/powerpc64-por=
tbld-freebsd12.0/5.4.0/plugin/include/config/
> dbxelf.h                elfos.h                 freebsd-spec.h         =
 freebsd-stdint.h        freebsd.h               initfini-array.h        =
rs6000

The references to the non-existent files are from the pkg-plist lines:

> lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/visintrin.h
. . .
> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/initfini-arra=
y.h
> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/%%OPSYS=
%%.h
> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-o=
pts.h
> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-p=
rotos.h
> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc.h=

> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sysv4.h=

> =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/vxworks-dummy=
.h

The base/README only mentions generation of pkg-plist for base/binutils =
.

Doing a quick check for base/gcc :

> # make CROSS_TOOLCHAIN=3Dpowerpc64-gcc =
CROSS_SYSROOT=3D/usr/obj/DESTDIRs/xtoolchain-powerpc64-installworld =
makeplist > pkg-plist-powerpc64
> # diff pkg-plist pkg-plist-powerpc64  | more
> 0a1
> > /you/have/to/check/what/makeplist/gives/you
> 17a19
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/libmilter/mfapi.h
> 31a34
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/altivec.h
> 32a36,37
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/htmintrin.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/htmxlintrin.h
> 33a39,44
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/paired.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/ppc-asm.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/ppu_intrinsics.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/si2vmx.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/spe.h
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/spu2vmx.h
> 45c56
> < lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/visintrin.h
> ---
> > lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/vec_types.h
> 107,112c118,126
> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/%%OPSYS=
%%.h
> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-o=
pts.h
> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-p=
rotos.h
> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc.h=

> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sysv4.h=

> < =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/vxworks-dummy=
.h
> ---
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/defaul=
t64.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/%%OPSY=
S%%64.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/option=
-defaults.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs6000=
-builtin.def
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs6000=
-cpus.def
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs6000=
-opts.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs6000=
-protos.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs6000=
.h
> > =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/sysv4.=
h


This leads to targeting powerpc64 using (in my context):

> # ls -l /usr/local/bin/gcc
> lrwxr-xr-x  1 root  wheel  4 Nov  8 20:29 /usr/local/bin/gcc -> gcc6

> # ls -l /usr/local/bin/g++
> lrwxr-xr-x  1 root  wheel  4 Nov  8 20:33 /usr/local/bin/g++ -> g++6


> # svnlite diff .
> Index: Makefile
> =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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- Makefile    (revision 424540)
> +++ Makefile    (working copy)
> @@ -8,7 +8,7 @@
>                 GNU/gmp:gmp \
>                 http://www.multiprecision.org/mpc/download/:mpc
>  DISTFILES=3D     ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
> -               mpfr-3.1.4.tar.xz:mpfr \
> +               mpfr-3.1.5.tar.xz:mpfr \
>                 gmp-5.1.3.tar.xz:gmp \
>                 mpc-1.0.3.tar.gz:mpc
>  PKGNAMEPREFIX=3D ${OPSYS:tl}-
> @@ -55,7 +55,7 @@
>  INSTALL_TARGET?=3D       install-gcc
> =20
>  post-extract:
> -       cd ${WRKSRC}; ${LN} -sf ../mpfr-3.1.4 mpfr ; \
> +       cd ${WRKSRC}; ${LN} -sf ../mpfr-3.1.5 mpfr ; \
>                 ${LN} -sf ../gmp-5.1.3 gmp ; \
>                 ${LN} -sf ../mpc-1.0.3 mpc
> =20
> Index: distinfo
> =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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- distinfo    (revision 424540)
> +++ distinfo    (working copy)
> @@ -1,8 +1,8 @@
>  TIMESTAMP =3D 1472596046
>  SHA256 (gcc-5.4.0.tar.bz2) =3D =
608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a
>  SIZE (gcc-5.4.0.tar.bz2) =3D 95661481
> -SHA256 (mpfr-3.1.4.tar.xz) =3D =
761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5
> -SIZE (mpfr-3.1.4.tar.xz) =3D 1122152
> +SHA256 (mpfr-3.1.5.tar.xz) =3D =
015fde82b3979fbe5f83501986d328331ba8ddf008c1ff3da3c238f49ca062bc
> +SIZE (mpfr-3.1.5.tar.xz) =3D 1126668
>  SHA256 (gmp-5.1.3.tar.xz) =3D =
dee2eda37f4ff541f30019932db0c37f6f77a30ba3609234933b1818f9b07071
>  SIZE (gmp-5.1.3.tar.xz) =3D 1818812
>  SHA256 (mpc-1.0.3.tar.gz) =3D =
617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3
> Index: pkg-plist
> =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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- pkg-plist   (revision 424540)
> +++ pkg-plist   (working copy)
> @@ -15,6 +15,7 @@
>  bin/%%GCC_TARGET%%-gcov
>  bin/%%GCC_TARGET%%-gcov-tool
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/README
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/libmilter/mfapi.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/limits.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/netinet/ip_fil.h
>  =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/netinet/ip_lookup.h
> @@ -29,8 +30,17 @@
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/syslimits.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/unistd.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include-fixed/wchar.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/altivec.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/float.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/htmintrin.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/htmxlintrin.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/iso646.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/paired.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/ppc-asm.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/ppu_intrinsics.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/si2vmx.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/spe.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/spu2vmx.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/stdalign.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/stdarg.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/stdatomic.h
> @@ -42,7 +52,7 @@
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/stdnoreturn.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/tgmath.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/varargs.h
> -lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/visintrin.h
> +lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/include/vec_types.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/install-tools/fixinc_list
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/install-tools/gsyslimits.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/install-tools/include/README
> @@ -104,12 +114,15 @@
>  =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/%%OPSYS%%-std=
int.h
>  =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/%%OPSYS%%.h
>  =
lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/initfini-arra=
y.h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/%%OPSY=
S%%.h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-=
opts.h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc-=
protos.h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sparc.=
h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/sparc/sysv4.=
h
> =
-lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/vxworks-dumm=
y.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/defau=
lt64.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/%%OPS=
YS%%64.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/optio=
n-defaults.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs600=
0-builtin.def
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs600=
0-cpus.def
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs600=
0-opts.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs600=
0-protos.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/rs600=
0.h
> =
+lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/config/rs6000/sysv4=
.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/configargs.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/context.h
>  lib/gcc/%%GCC_TARGET%%/%%GCC_VERSION%%/plugin/include/convert.h

With those things in place the base/gcc build completed.

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AB5C6ADD-3E50-40ED-BD3B-BCBBBCD60547>