Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2014 09:15:41 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        sbruno@freebsd.org
Cc:        Ian Lepore <ian@FreeBSD.org>, freebsd-arch@FreeBSD.org
Subject:   Re: Total confusion over toolchain/xdev behavior
Message-ID:  <2D708C4F-31DB-4F9D-BC02-2050AD8765CD@bsdimp.com>
In-Reply-To: <1404831829.1662.7.camel@bruno>
References:  <1404688077.1059.115.camel@bruno> <1404766292.65432.43.camel@revolution.hippie.lan> <20B72004-1499-4F99-A7C7-13173C50C7C6@bsdimp.com> <1404831829.1662.7.camel@bruno>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

On Jul 8, 2014, at 9:03 AM, Sean Bruno <sbruno@ignoranthack.me> wrote:

>>> 
>>> 
>>> It looks to me like the permission part of the problem is being caused
>>> by a lack of DESTDIR=.  Without that, it's trying to install to /usr and
>>> you don't have permission for that.  Maybe the confusion is because the
>>> xdev target inherently builds-and-installs, unlike most other targets
>>> that separate those two actions.
>> 
>> OK. After some detective work, it looks like libstdc++ needs to be done before libsupc++ is done. I´ve added this dependency in r268377 and was able to do a full xdev build with a clean obj dir:
>> 
>> 	rm -rf $HOME/F $MAKEOBJDIRPREFIX/mips-freebsd
>> 	mkdir $HOME/F
>> 	make xdev DESTDIR=$HOME/F XDEV=mips XDEV_ARCH=mips WITHOUT_CLANG=t WITHOUT_CLANG_BOOTSTRAP=t WITH_GCC=t WITH_GCC_BOOTSTRAP=t WITH_GNUCXX=t -j 20
>> 
>> Sean, can you see if this works for you now? And sorry about the cumbersome options. Those are in line to get fixed, but I wanna fix the build-in-tree issues first (which, alas, are harder than you´d think). I suspect that bapt´s src.opts.mk diffs are likely good candidates to be used committed too, but the above works w/o it. Also, I just built the binaries, I didn´t see if they worked.
>> 
>> Warner
> 
> TL;DR --> Can we just *dump* XDDESTDIR and use DESTDIR? mtree seems to
> still be busted.
> 
> Updated this morning and did an attempted non-root xdev build with and
> without WITH_GCC_BOOTSTRAP.  
> 
> make xdev MAKEOBJDIRPREFIX=/var/tmp DESTDIR=/var/tmp/mips_cc XDEV=mips
> XDEV_ARCH=mips WITHOUT_CLANG=t WITHOUT_CLANG_BOOTSTRAP=t WITH_GCC=t
> WITH_GCC_BOOTSTRAP=t
> 
> ...
> mtree populating /var/tmp/mips_cc//usr/mips-freebsd
> mkdir -p /var/tmp/mips_cc//usr/mips-freebsd
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.root.dist
> -p /var/tmp/mips_cc//usr/mips-freebsd >/dev/null
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.usr.dist
> -p /var/tmp/mips_cc//usr/mips-freebsd/usr >/dev/null
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.include.dist
> -p /var/tmp/mips_cc//usr/mips-freebsd/usr/include >/dev/null
> _xi-cross-tools
> ===> xdev gnu/usr.bin/binutils (install)
> ===> gnu/usr.bin/binutils/libiberty (install)
> ===> gnu/usr.bin/binutils/libbfd (install)
> ===> gnu/usr.bin/binutils/libopcodes (install)
> ===> gnu/usr.bin/binutils/libbinutils (install)
> ===> gnu/usr.bin/binutils/addr2line (install)
> sh /home/sbruno/fbsd_head/tools/install.sh -s -o root -g wheel -m 555
> addr2line /var/tmp/mips_cc//usr/mips-freebsd/usr/bin/addr2line
> sh /home/sbruno/fbsd_head/tools/install.sh -T debug -o root -g wheel -m
> 444
> addr2line.debug /var/tmp/mips_cc//usr/mips-freebsd/usr/lib/debug/usr/bin/addr2line.debug
> install: /var/tmp/mips_cc//usr/mips-freebsd/usr/lib/debug/usr/bin/addr2line.debug: No such file or directory
> *** Error code 71

.debug? We only generate those when MK_DEBUG_FILES=yes. Try removing WITH_DEBUG_FILES from your environment. It looks to be broken.

> -----------------------------------------------------------------------------------------
> 
> make xdev MAKEOBJDIRPREFIX=/var/tmp DESTDIR=/var/tmp/mips_cc XDEV=mips
> XDEV_ARCH=mips WITHOUT_CLANG=t WITHOUT_CLANG_BOOTSTRAP=t WITH_GCC=t
> WITH_GCC_BOOTSTRAP=t WITH_GNUCXX=t
> 
> ...
> mtree populating /var/tmp/mips_cc
> mkdir -p /var/tmp/mips_cc
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.root.dist
> -p /var/tmp/mips_cc >/dev/null
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.usr.dist
> -p /var/tmp/mips_cc/usr >/dev/null
> mtree -deU -f /home/sbruno/fbsd_head/etc/mtree/BSD.include.dist
> -p /var/tmp/mips_cc/usr/include >/dev/null
> _xi-cross-tools
> ===> xdev gnu/usr.bin/binutils (install)
> ===> gnu/usr.bin/binutils/libiberty (install)
> ===> gnu/usr.bin/binutils/libbfd (install)
> ===> gnu/usr.bin/binutils/libopcodes (install)
> ===> gnu/usr.bin/binutils/libbinutils (install)
> ===> gnu/usr.bin/binutils/addr2line (install)
> sh /home/sbruno/fbsd_head/tools/install.sh -s -o root -g wheel -m 555
> addr2line /var/tmp/mips_cc/usr/bin/addr2line
> sh /home/sbruno/fbsd_head/tools/install.sh -T debug -o root -g wheel -m
> 444
> addr2line.debug /var/tmp/mips_cc/usr/lib/debug/usr/bin/addr2line.debug
> install: /var/tmp/mips_cc/usr/lib/debug/usr/bin/addr2line.debug: No such
> file or directory
> *** Error code 71
> -----------------------------------------------------------------------------------------
> 
> Doesn't look like the install target for addr2line is creating its
> directory tree?
> 
> ~/fbsd_head % ls /var/tmp/mips_cc/usr/lib/
> aout    compat  dtrace  engines i18n    private

but what’s in /var/tmp/mips_cc//usr/bin?

Warner

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTvAsdAAoJEGwc0Sh9sBEAwFkQAOy4neq+1nByu0cgTR8JLpjV
oqc1vMi5SfyPv10tGO5MaiznL6yp5fnyJ59gznwa+2Ryo5DnxtllPEmXu9UdI34j
rfGB/AwarXxq5KM1fCOpTJvrG9YeT1b7EVBdOBOcc+K3dDDtg8rmOzT4JnZemfNl
UUWwbMisEW1+EJVkgcaPDI3CpxXqq+dTxH8WaeV4C34q/Fy3g082RBSeG18Qxivb
u/AvV5NUrdhqQojSBuoWL6gJ022D7I/2xs/nSWcPM4+TARa39uQijTu58fL9ukpK
bTNuh4NrERH2wLJcmbPmuRJ+VvhWXg4t3yIiMPfFCpogRCuNhdGuYcQ39E2WDC65
dhxf6a+KkqsAF5WWz4jty+Vb6Wlg7aQCvVlq4e4Rjel/1/D6nFRzwAaTxXyUAOcj
ZhihbihjH74rW2/xhbKDnq1K/Xg17wWjLJlZaflcZfQvo9Z+uY8IkegdCorAwJj8
JAKb7FPSUDM1WCtApc54xHJ/t5PkjrrjUcSTel5uUUkhUQA3poG0iZ48PlLPtV5a
g8SvDDEGrUUGz1H28pT3+fCSALKvN/e2AVSWuKpMHc++6AiGvmxw+dTYfXzaPryZ
IWhEvGX8XZzWXiNwLbueGnvlnXvu8uWs51m3Oieug4uccuF6aN6Rkx82+SgY64or
sR2vBvoXbB3FFoJ+7DyV
=XI/d
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2D708C4F-31DB-4F9D-BC02-2050AD8765CD>