From owner-freebsd-toolchain@freebsd.org Sat May 28 09:24:37 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF231B4C60E for ; Sat, 28 May 2016 09:24:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-167.reflexion.net [208.70.211.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E5351FF4 for ; Sat, 28 May 2016 09:24:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 13311 invoked from network); 28 May 2016 09:25:07 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 28 May 2016 09:25:07 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Sat, 28 May 2016 05:25:13 -0400 (EDT) Received: (qmail 25560 invoked from network); 28 May 2016 09:25:13 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 28 May 2016 09:25:13 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 4DBF51C43D2; Sat, 28 May 2016 02:24:34 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r297435 - head: still problems for stage 3 when gcc 4.2.1 is avoided (powerpc64 self-hosted build) From: Mark Millard In-Reply-To: Date: Sat, 28 May 2016 02:24:34 -0700 Cc: FreeBSD Current , FreeBSD Toolchain , FreeBSD PowerPC ML , Gerald Pfeifer , Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <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> <4953F764-FC4E-491F-A6B7-4CAF65EAAEB7@dsl-only.net> <70a54660-775d-c12c-b991-507d26ce1342@FreeBSD.org> <72F5F9FD-5854-455D-8844-C4E1887DCE9F@dsl-only.net> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2016 09:24:37 -0000 --with-local-prefix=3D/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/../../../../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. Which came from (which shows the --with-local-prefix=3D/usr use): > 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 In Makefile terms: > # 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 \ 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=97if you put any in that = directory=97are not part of GCC". My overall interpretation of that is that in my context: = --with-local-prefix=3D/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3= .0 a.k.a.: --with-local-prefix=3D${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=3D${LOCALBASE}/lib/gcc/${GCC_TARGET}/${PORTVERSION} =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-May-27, at 7:35 PM, Mark Millard wrote: > On 2016-May-27, at 7:04 PM, Mark Millard = wrote: >=20 >> FYI. . . >>=20 >> I expect that building gcc49 with: >>=20 >> + --with-local-prefix=3D/usr \ >>=20 >> will help with system build activities via gcc49/g++49 by avoiding = /usr/local/include interfering. >>=20 >> But I also expect that various port builds based on that same = gcc49/g++49 will have problems from not explicitly forcing = /usr/local/include to be looked at when appropriate/required --unless = something else is in place to do that separately. I expect some implicit = /usr/local/include references to the likes of some of the below list: >>=20 >>> # diff -qr /usr/include/ /usr/local/include/ | grep /local/ | more >>> Only in /usr/local/include/: apr-1 >>> Files /usr/include/atf-c/defs.h and /usr/local/include/atf-c/defs.h = differ >>> Only in /usr/local/include/: autosprintf.h >>> Only in /usr/local/include/: bfd.h >>> Only in /usr/local/include/: bfdlink.h >>> Only in /usr/local/include/: boost >>> Only in /usr/local/include/: curl >>> Only in /usr/local/include/: db5 >>> Only in /usr/local/include/: dis-asm.h >>> Files /usr/include/dwarf.h and /usr/local/include/dwarf.h differ >>> Only in /usr/local/include/: editline >>> Only in /usr/local/include/: expat.h >>> Only in /usr/local/include/: expat_config.h >>> Only in /usr/local/include/: expat_external.h >>> Only in /usr/local/include/: ffi.h >>> Only in /usr/local/include/: ffitarget.h >>> Only in /usr/local/include/: gdbm.h >>> Only in /usr/local/include/: gettext-po.h >>> Only in /usr/local/include/: gmp.h >>> Only in /usr/local/include/: gmpxx.h >>> Only in /usr/local/include/: gnumake.h >>> Files /usr/include/histedit.h and /usr/local/include/histedit.h = differ >>> Only in /usr/local/include/: idn-free.h >>> Only in /usr/local/include/: idn-int.h >>> Only in /usr/local/include/: idna.h >>> Only in /usr/local/include/: layout >>> Files /usr/include/libdwarf.h and /usr/local/include/libdwarf.h = differ >>> Only in /usr/local/include/: libintl.h >>> Only in /usr/local/include/: lua52 >>> Only in /usr/local/include/: lutok >>> Only in /usr/local/include/: mpc.h >>> Only in /usr/local/include/: mpf2mpfr.h >>> Only in /usr/local/include/: mpfr.h >>> Only in /usr/local/include/: pkg.h >>> Only in /usr/local/include/: plugin-api.h >>> Only in /usr/local/include/: pr29.h >>> Only in /usr/local/include/: punycode.h >>> Only in /usr/local/include/: python2.7 >>> Only in /usr/local/include/: readline >>> Only in /usr/local/include/: ruby-2.2 >>> Only in /usr/local/include/: serf-1 >>> Only in /usr/local/include/: sqlite3.h >>> Only in /usr/local/include/: sqlite3ext.h >>> Only in /usr/local/include/: stringprep.h >>> Only in /usr/local/include/: subversion-1 >>> Only in /usr/local/include/: sudo_plugin.h >>> Only in /usr/local/include/: symcat.h >>> Only in /usr/local/include/: tld.h >>> Only in /usr/local/include/: unicode >>> Only in /usr/local/include/: yaml.h >>=20 >> It might be that even gcc compilers built by the adjusted gcc49 would = not find, say, gmp.h or mpfr.h . >>=20 >> dwarfdump's build/install installs /usr/local/include/dwarf.h and = /usr/local/include/libdwarf.h to match its code. Such examples can need = careful control over which file is used (here dwarf.h and libdwarf.h in = /usr/include vs. /usr/local/include ). >>=20 >> (It will still be some time before I get to switch to this = with-local-prefix experiment.) >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >=20 > Given the above I may try using >=20 > + --with-local-prefix=3D/usr \ >=20 > only for building devel/powerpc64-gcc initially because I do not use = devel/powerpc64-gcc to build ports, just for system-build activities. = devel/powerpc64-gcc has the /usr/local/include problem for system build = activities too. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 >=20 On 2016-May-27, at 5:23 PM, Bryan Drewery = wrote: > On 5/27/2016 5:15 PM, Mark Millard wrote: >> + --with-local-prefix=3D/usr/include \ >>=20 >> looks wrong to me. The default is not /usr/local/include but just = /usr/local . Quoting https://gcc.gnu.org/install/configure.html : >>=20 >> --with-local-prefix=3Ddirname >> Specify the installation directory for local include files. The = default is /usr/local. Specify this option if you want the compiler to = search directory dirname/include for locally installed header files = instead of /usr/local/include. >>=20 >> So your change would generate /usr/include/include for the overall = include path from what I can tell. >>=20 >> Do you want: >>=20 >> + --with-local-prefix=3D/usr \ >>=20 >> instead? >=20 > You're right, but it makes no real difference since it removes > /usr/local/include: >=20 >> ignoring nonexistent directory = "/root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/x86_= 64-portbld-freebsd11.0/4.9.4/../../../../../x86_64-portbld-freebsd11.0/inc= lude" >> ignoring duplicate directory = "/root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/../.= ./../lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include" >> ignoring nonexistent directory "/usr/include/include" >=20 > ^ yes wrong >=20 >> ignoring duplicate directory = "/root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/../.= ./../lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/include-fixed" >> ignoring nonexistent directory = "/root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/../.= ./../lib/gcc49/gcc/x86_64-portbld-freebsd11.0/4.9.4/../../../../../x86_64-= portbld-freebsd11.0/include" >> #include "..." search starts here: >> #include <...> search starts here: >> = /root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/x86_6= 4-portbld-freebsd11.0/4.9.4/include >> = /root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/x86_6= 4-portbld-freebsd11.0/4.9.4/include-fixed >> = /root/svn/ports/lang/gcc49/work/stage/usr/local/bin/../lib/gcc49/gcc/../..= /../include >> /usr/include >=20 > ^ Still added >=20 >> End of search list. >=20 >=20 >=20 > --=20 > Regards, > Bryan Drewery >=20 >=20