Date: Thu, 1 Jan 2015 10:42:38 -0800 From: Garrett Cooper <yaneurabeya@gmail.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers <src-committers@freebsd.org>, Garrett Cooper <ngie@FreeBSD.org>, Ian Lepore <ian@FreeBSD.org> Subject: Re: svn commit: r276052 - head Message-ID: <CF7A718E-4B6D-4F1F-A0CA-E3127F8EDCC2@gmail.com> In-Reply-To: <CE0B8F8D-264D-4EC8-A5DB-FEA49652E19B@gmail.com> References: <201412220452.sBM4qPAx096443@svn.freebsd.org> <68874DE1-3EAE-4A4D-9760-7661DA7AE846@FreeBSD.org> <1420130463.85983.0.camel@freebsd.org> <9A1C084E-B491-4581-A21C-AAB82687C588@FreeBSD.org> <1420133565.85983.5.camel@freebsd.org> <AC80C56B-46E9-4831-9B5F-976E28498F1D@FreeBSD.org> <CE0B8F8D-264D-4EC8-A5DB-FEA49652E19B@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Jan 1, 2015, at 10:38, Garrett Cooper <yaneurabeya@gmail.com> wrote: > On Jan 1, 2015, at 9:50, Dimitry Andric <dim@FreeBSD.org> wrote: > >> On 01 Jan 2015, at 18:32, Ian Lepore <ian@FreeBSD.org> wrote: >>> >>> On Thu, 2015-01-01 at 18:14 +0100, Dimitry Andric wrote: >>>> On 01 Jan 2015, at 17:41, Ian Lepore <ian@freebsd.org> wrote: >>>>> >>>>> On Thu, 2015-01-01 at 16:50 +0100, Dimitry Andric wrote: >>>>>> On 22 Dec 2014, at 05:52, Garrett Cooper <ngie@FreeBSD.org> wrote: >>>>>>> >>>>>>> Author: ngie >>>>>>> Date: Mon Dec 22 04:52:24 2014 >>>>>>> New Revision: 276052 >>>>>>> URL: https://svnweb.freebsd.org/changeset/base/276052 >>>>>>> >>>>>>> Log: >>>>>>> Build selective portions of gnu/usr.bin/texinfo as part of build-tools to >>>>>>> ensure that building on a host without makeinfo (i.e. a host where >>>>>>> make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes >>>>>>> doesn't manifest in build errors when building info pages >>>>>> .. >>>>>>> @@ -1398,6 +1403,16 @@ build-tools: .MAKE >>>>>>> ${MAKE} DIRPRFX=${_tool}/ depend && \ >>>>>>> ${MAKE} DIRPRFX=${_tool}/ all >>>>>>> .endfor >>>>>>> +.for _tool in \ >>>>>>> + ${_texinfo} >>>>>>> + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ >>>>>>> + cd ${.CURDIR}/${_tool} && \ >>>>>>> + ${MAKE} DIRPRFX=${_tool}/ obj && \ >>>>>>> + ${MAKE} DIRPRFX=${_tool}/ depend && \ >>>>>>> + ${MAKE} DIRPRFX=${_tool}/ all && \ >>>>>>> + ${MAKE} DIRPRFX=${_tool}/ install DESTDIR=${WORLDTMP} >>>>>>> +.endfor >>>>>> >>>>>> Strangely, this hunk seems to work incorrectly for non-native builds. >>>>>> For example, I tried a TARGET=arm buildworld just now, and that dies >>>>>> with the following error: >>>>>> >>>>>> [...] >>>>>>>>> stage 2.3: build tools >>>>>> [...] >>>>>> ===> gnu/usr.bin/texinfo/makeinfo (obj,depend,all,install) >>>>>> [...] >>>>>> gzip -cn /usr/src/gnu/usr.bin/texinfo/makeinfo/../../../../contrib/texinfo/doc/makeinfo.1 > makeinfo.1.gz >>>>>> sh /usr/src/tools/install.sh -s -o root -g wheel -m 555 makeinfo /usr/obj/arm.arm/arm.arm/usr/src/tmp/usr/bin/makeinfo >>>>>> install: /usr/obj/arm.arm/arm.arm/usr/src/tmp/usr/bin/makeinfo: No such file or directory >>>>>> *** Error code 71 >>>>>> >>>>>> Specifically, the /usr/obj/arm.arm/arm.arm directory is incorrect, there >>>>>> should be only one "arm.arm" in that path. I don't really understand >>>>>> how that value comes to pass, though. When I put an echo statement just >>>>>> before the make install, which shows the values of ${_tool} and >>>>>> ${WORLDTMP}, it prints: >>>>>> >>>>>> DEBUG: _tool=gnu/usr.bin/texinfo/makeinfo, WORLDTMP=/usr/obj/arm.arm/arm.arm/usr/src/tmp >>>>>> >>>>>> So for some strange reason, ${WORLDTMP} is incorrect at that point? I >>>>>> think something is appending one path component too many... >>>>>> >>>>>> -Dimitry >>>>>> >>>>> >>>>> try TARGET_ARCH=arm >>>> >>>> No, that does not help, unfortunately. The problem seems to be that in >>>> Makefile.inc1, TMAKE is passing MAKEOBJDIRPREFIX=${OBJTREE} via its >>>> environment, and this changes the value of WORLDTMP to an incorrect >>>> value. >>>> >>>> At first it looked like I could just force the correct WORLDTMP value >>>> via the command line instead, e.g. like this: >>>> >>>> Index: Makefile.inc1 >>>> =================================================================== >>>> --- Makefile.inc1 (revision 276480) >>>> +++ Makefile.inc1 (working copy) >>>> @@ -270,6 +270,7 @@ >>>> TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ >>>> ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ >>>> TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ >>>> + WORLDTMP=${WORLDTMP} \ >>>> DESTDIR= \ >>>> BOOTSTRAPPING=${OSRELDATE} \ >>>> SSP_CFLAGS= \ >>>> >>>> However, this leads to other problems further down the road, where it >>>> gets errors installing parts of libllvmsupport and tblgen. >>>> >>>> So at this point, non-native builds with MK_INFO=yes are broken. >>>> >>>> -Dimitry >>>> >>> >>> You seem to be implying that the whole process of cross building is >>> broken, but it's not. I do this all day long every day. "make >>> TARGET_ARCH=arm [make targets and other vars here]" works. Do you have >>> something in make.conf or src.conf causing problems? >> >> No, just MK_INFO=yes, as I said. That is what Garrett tried to fix in >> this commit, but which only works for native builds. >> >> I'll be coming up with a fix shortly. > > OBJTREE is being populated with TARGET.TARGET_ARCH twice… That’s the bug. > > Unfortunately this commit only made this issue apparent. Sorry for not testing with a non-native build :(... I suspect this will fix it. Going to do a tinderbox run then I’ll put it out for review: Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 276492) +++ Makefile.inc1 (working copy) @@ -267,8 +267,7 @@ MK_LLDB=no MK_TESTS=no # build-tools stage -TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ - ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ +TMAKE= ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUpZUeAAoJEMZr5QU6S73eU/4IAIpoTYVNHQnjBZ2ARbv3M9kx bWtuVb/6Lyzwf+sRQaqfCiTMGv/PNitb7U3AQWsuKsD4aYlsCCLkYzZDPUIb+KHe EOP6oJnbZ/vqs2ixTtnshifc+0sSYz1OuoPqSbez0UzW38X74BH0hSvSjeeOhAZZ 5GpoJY2OBfen4tJt1kfnrafPEgmtb5LZ+sVIgfHecVvBMy64B5wGMF5Yhgl49PJ3 8qRNG9xjeY4iAcQ+cMCpAxHcn/At1CQhQRgr6cBrCoSDqBLBPJozvDJIOWNKJ9xz vWr6j8vmGNfj3njivuGyv1QGEdC7En3Gh3+sGDV7CJjtLU3ulxlUMmyU+AOFMkA= =bjgR -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CF7A718E-4B6D-4F1F-A0CA-E3127F8EDCC2>
