Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2016 10:40:59 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, Gerald Pfeifer <gerald@FreeBSD.org>, Warner Losh <imp@bsdimp.com>, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: svn commit: r297435 - head: still problems for stage 3 when gcc 4.2.1 is avoided (powerpc64 self-hosted build)
Message-ID:  <068D322F-E46F-4FD8-8DA0-BD7D17FD2A06@dsl-only.net>
In-Reply-To: <0FA52C68-43C4-489D-9EB2-2339C2B812F5@dsl-only.net>
References:  <5A0ACA76-6F1D-4975-9E59-2A64BB8EFC77@dsl-only.net> <56FD9757.6040709@FreeBSD.org> <9E3033D5-F416-4B78-97C2-0A0AABF5A49E@dsl-only.net> <56FDA5F9.1090601@FreeBSD.org> <481DA341-0DFC-4AF1-AD4D-56C5388FA8E3@dsl-only.net> <56FDBAA8.5060407@FreeBSD.org> <7DEF97EC-D970-4F64-AF72-8939609A1D48@dsl-only.net> <DD969902-BCA8-480B-B32F-07DCC6C3E32B@dsl-only.net> <db60bcec-a6c4-02ac-da6c-1ac70821b806@FreeBSD.org> <4953F764-FC4E-491F-A6B7-4CAF65EAAEB7@dsl-only.net> <70a54660-775d-c12c-b991-507d26ce1342@FreeBSD.org> <72F5F9FD-5854-455D-8844-C4E1887DCE9F@dsl-only.net> <C23B8A92-8855-48CE-B442-3C7BEFCEF820@dsl-only.net> <0FA52C68-43C4-489D-9EB2-2339C2B812F5@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[Top post of failure to get rid of /usr/local/include from =
devel/powerpc64-gcc search list.]

I have tried:

> # svnlite diff /usr/ports/devel/powerpc64-gcc/
> Index: /usr/ports/devel/powerpc64-gcc/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
> --- /usr/ports/devel/powerpc64-gcc/Makefile	(revision 415874)
> +++ /usr/ports/devel/powerpc64-gcc/Makefile	(working copy)
> @@ -43,6 +43,7 @@
>  CONFIGURE_ARGS+=3D--target=3D${GCC_TARGET} --disable-nls =
--enable-languages=3Dc,c++ \
>  		--without-headers \
>  		--with-gmp=3D${LOCALBASE} \
> +		=
--with-local-prefix=3D${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION} =
\
>  		--with-pkgversion=3D"FreeBSD Ports Collection for =
${PKGNAMEPREFIX:C/-//g}" \
>  		--with-system-zlib \
>  		--with-as=3D${LOCALBASE}/bin/${BU_PREFIX}-as \

which when rebuilt in a powerpc64 context shows up with:

=
--with-local-prefix=3D/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3=
.0

in the "Configured with" (from using -v):

> Target: powerpc64-portbld-freebsd11.0
> Configured with: =
/usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure =
--target=3Dpowerpc64-portbld-freebsd11.0 --disable-nls =
--enable-languages=3Dc,c++ --without-headers --with-gmp=3D/usr/local =
--with-local-prefix=3D/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3=
.0 --with-pkgversion=3D'FreeBSD Ports Collection for powerpc64' =
--with-system-zlib --with-as=3D/usr/local/bin/powerpc64-freebsd-as =
--with-ld=3D/usr/local/bin/powerpc64-freebsd-ld --prefix=3D/usr/local =
--localstatedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/info/ --build=3Dpowerpc64-portbld-freebsd11.0

But /usr/local/include still shows up in the search list, for example:

> ignoring nonexistent directory =
"/usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/local/lib/g=
cc/powerpc64-portbld-freebsd11.0/5.3.0/include"
> ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/../../../../powerp=
c64-portbld-freebsd11.0/include"
> ignoring duplicate directory =
"/usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/src/lib/msun/powerpc
>  /usr/src/lib/msun/src
>  /usr/src/lib/libc/include
>  /usr/src/lib/libc/powerpc
>  /usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/include
>  /usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include
>  /usr/local/include
>  /usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include-fixed
> End of search list.

[Despite some prior mis-wording in other messages: The line match for =
--with-local-prefix=3D 's value with "/include" appended matches the =
line prior to /usr/local/include in the search list, not the following =
line.]

So far I'm unsuccessful at avoiding /usr/local/include being in the =
search list. I'm still at the stage of C_INCLUDE_PAPTH and =
CPLUS_INCLUDE_PATH being the best means that I've found to force =
/usr/include based paths to win when there are conflicts in =
/usr/local/include from ports that have been built.


So far I'm only doing the experiment with devel/powerpc64-gcc (used as =
the so-called "cross compiler" in my powerpc64 self-hosted context), not =
with the lang/gcc49 that I use as the system compiler. For lang/gcc49 =
I'm still using C_INCLUDE_PAPTH and CPLUS_INCLUDE_PATH to avoid =
/usr/local/include based paths from finding files. In part this is =
because I expect port building problems if I use lang/gcc49 to build =
ports without lang/gcc49 having /usr/local/include implicitly. I do not =
use devel/powerpc64-gcc to build ports.

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

On 2016-May-28, at 2:24 AM, Mark Millard <markmi at dsl-only.net> wrote:

> --with-local-prefix=3D/usr was insufficient to avoid =
/usr/local/include in the search list in powerpc64-gcc:
>=20
>> ignoring duplicate directory =
"/usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/include"
>> ignoring nonexistent directory =
"/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/../../../../powerp=
c64-portbld-freebsd11.0/include"
>> ignoring duplicate directory =
"/usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/include"
>> #include "..." search starts here:
>> #include <...> search starts here:
>> /usr/src/gnu/lib/libssp/libssp_nonshared/..
>> =
/usr/src/gnu/lib/libssp/libssp_nonshared/../../../../contrib/gcclibs/libss=
p
>> =
/usr/src/gnu/lib/libssp/libssp_nonshared/../../../../contrib/gcclibs/inclu=
de
>> /usr/obj/xtoolchain_noclang/powerpc.powerpc64/usr/src/tmp/usr/include
>> /usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include
>> /usr/local/include
>> /usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include-fixed
>> End of search list.
>=20
> Which came from (which shows the --with-local-prefix=3D/usr use):
>=20
>> Configured with: =
/usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure =
--target=3Dpowerpc64-portbld-freebsd11.0 --disable-nls =
--enable-languages=3Dc,c++ --without-headers --with-gmp=3D/usr/local =
--with-local-prefix=3D/usr --with-pkgversion=3D'FreeBSD Ports Collection =
for powerpc64' --with-system-zlib =
--with-as=3D/usr/local/bin/powerpc64-freebsd-as =
--with-ld=3D/usr/local/bin/powerpc64-freebsd-ld --prefix=3D/usr/local =
--localstatedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/info/ --build=3Dpowerpc64-portbld-freebsd11.0
>=20
> In Makefile terms:
>=20
>> # svnlite diff /usr/ports/devel/powerpc64-gcc/Makefile=20
>> Index: /usr/ports/devel/powerpc64-gcc/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
>> --- /usr/ports/devel/powerpc64-gcc/Makefile	(revision 415874)
>> +++ /usr/ports/devel/powerpc64-gcc/Makefile	(working copy)
>> @@ -43,6 +43,7 @@
>> CONFIGURE_ARGS+=3D--target=3D${GCC_TARGET} --disable-nls =
--enable-languages=3Dc,c++ \
>> 		--without-headers \
>> 		--with-gmp=3D${LOCALBASE} \
>> +		--with-local-prefix=3D/usr \
>> 		--with-pkgversion=3D"FreeBSD Ports Collection for =
${PKGNAMEPREFIX:C/-//g}" \
>> 		--with-system-zlib \
>> 		--with-as=3D${LOCALBASE}/bin/${BU_PREFIX}-as \
>=20
>=20
> Note: "Specifying --prefix has no effect on which directory GCC =
searches for local header files".
>=20
> Some interesting wording is: "The same value can be used for both =
--with-local-prefix and --prefix provided it is not /usr" and "This can =
be used to avoid the default search of /usr/local/include". Also: "The =
purpose of --prefix is to specify where to install GCC" and "The local =
header files in /usr/local/include=97if you put any in that =
directory=97are not part of GCC".
>=20
> My overall interpretation of that is that in my context:
>=20
> =
--with-local-prefix=3D/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3=
.0
>=20
> a.k.a.:
>=20
> --with-local-prefix=3D${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION}
>=20
> would make for a redundant overall search path without changing the =
ordering.
>=20
> I have not figured out why /usr/local/include continued to show up and =
/usr/include did not. I wonder if they have special logic for if /usr is =
assigned and so force back there specified default.
>=20
> I'll try rebuilding devel/powerpc64-gcc again based on:
>=20
> --with-local-prefix=3D${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION}
>=20
>=20
>=20
> =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?068D322F-E46F-4FD8-8DA0-BD7D17FD2A06>