svn commit: r297435 - head: still problems for stage 3 when gcc 4.2.1 is avoided (powerpc64 self-hosted build)
Mark Millard
markmi at dsl-only.net
Sat May 28 17:41:02 UTC 2016
[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
> ===================================================================
> --- /usr/ports/devel/powerpc64-gcc/Makefile (revision 415874)
> +++ /usr/ports/devel/powerpc64-gcc/Makefile (working copy)
> @@ -43,6 +43,7 @@
> CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
> --without-headers \
> --with-gmp=${LOCALBASE} \
> + --with-local-prefix=${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION} \
> --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
> --with-system-zlib \
> --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \
which when rebuilt in a powerpc64 context shows up with:
--with-local-prefix=/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=powerpc64-portbld-freebsd11.0 --disable-nls --enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-local-prefix=/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0 --with-pkgversion='FreeBSD Ports Collection for powerpc64' --with-system-zlib --with-as=/usr/local/bin/powerpc64-freebsd-as --with-ld=/usr/local/bin/powerpc64-freebsd-ld --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=powerpc64-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/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include"
> ignoring nonexistent directory "/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/../../../../powerpc64-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= '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.
===
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=/usr was insufficient to avoid /usr/local/include in the search list in powerpc64-gcc:
>
>> 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/../../../../powerpc64-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/libssp
>> /usr/src/gnu/lib/libssp/libssp_nonshared/../../../../contrib/gcclibs/include
>> /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.
>
> Which came from (which shows the --with-local-prefix=/usr use):
>
>> Configured with: /usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure --target=powerpc64-portbld-freebsd11.0 --disable-nls --enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-local-prefix=/usr --with-pkgversion='FreeBSD Ports Collection for powerpc64' --with-system-zlib --with-as=/usr/local/bin/powerpc64-freebsd-as --with-ld=/usr/local/bin/powerpc64-freebsd-ld --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=powerpc64-portbld-freebsd11.0
>
> In Makefile terms:
>
>> # svnlite diff /usr/ports/devel/powerpc64-gcc/Makefile
>> Index: /usr/ports/devel/powerpc64-gcc/Makefile
>> ===================================================================
>> --- /usr/ports/devel/powerpc64-gcc/Makefile (revision 415874)
>> +++ /usr/ports/devel/powerpc64-gcc/Makefile (working copy)
>> @@ -43,6 +43,7 @@
>> CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
>> --without-headers \
>> --with-gmp=${LOCALBASE} \
>> + --with-local-prefix=/usr \
>> --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
>> --with-system-zlib \
>> --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \
>
>
> Note: "Specifying --prefix has no effect on which directory GCC searches for local header files".
>
> 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—if you put any in that directory—are not part of GCC".
>
> My overall interpretation of that is that in my context:
>
> --with-local-prefix=/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0
>
> a.k.a.:
>
> --with-local-prefix=${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION}
>
> would make for a redundant overall search path without changing the ordering.
>
> 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.
>
> I'll try rebuilding devel/powerpc64-gcc again based on:
>
> --with-local-prefix=${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION}
>
>
>
> ===
> Mark Millard
> markmi at dsl-only.net
More information about the freebsd-ppc
mailing list