Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2014 13:28:55 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        sbruno@freebsd.org
Cc:        Benjamin Kaduk <bjk@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Total confusion over toolchain/xdev behavior
Message-ID:  <9CE37432-1028-44FE-B0B7-224625EB9AB3@bsdimp.com>
In-Reply-To: <1404756848.1105.1.camel@bruno>
References:  <1404688077.1059.115.camel@bruno> <alpine.GSO.1.10.1407071144310.17412@multics.mit.edu> <1404756848.1105.1.camel@bruno>

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

[-- Attachment #1 --]

On Jul 7, 2014, at 12:14 PM, Sean Bruno <sbruno@ignoranthack.me> wrote:

> On Mon, 2014-07-07 at 11:46 -0400, Benjamin Kaduk wrote:
>> On Sun, 6 Jul 2014, Sean Bruno wrote:
>> 
>>> -----------------------------------------------------------------------
>>> 
>>> Even attempting to do stuff for *clang* enabled architectures bails
>>> because its not respecting prefixes:
>>> MAKEOBJDIRPREFIX=/var/tmp make -s -j 8 xdev XDEV=arm XDEV_ARCH=armv6
>>> -- bails because it tries to:
>>> ===> usr.bin/clang/tblgen (all)
>>> mtree populating //usr/armv6-freebsd
>>> mtree: etc/ntp: Permission denied
>>> _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)
>>> ===> gnu/usr.bin/binutils/as (install)
>>> ===> gnu/usr.bin/binutils/ld (install)
>>> install: //usr/armv6-freebsd/usr/bin/ld: Permission denied
>>> *** Error code 71
>> 
>> This seems to be "obviously a bug" that should not be too hard to make 
>> progress on, especially if you already have make debug logs.
>> 
>> -Ben
> 
> 
> Sure.  I agree its a bug, if my usage of the XDEV target is supposed to
> be supported.

I built the xdev target years ago. There was no notion of it supporting root-less build, since FreeBSD src didn’t support it at all. The folks that added it to FreeBSD missed xdev.

> I don't know who owns this target, what its supposed to be used for, nor
> what its requirements are.  All I know is that people tell me its
> supposed to meat my requirements from my original "Objective" statement.

Well, the folks that did clang didn’t update this target. Nor did the folks that did the cross build stuff. Nor the folks that did… Well, you get the idea. It has been an unloved target for some time now, or at least not a priority for people adding things to the system. I’ve done bits and pieces here and there over the years, but I’m sure that it is quite rough around the edges. I fear that your experience validates that assessment.

Having said that, though, the whole cross build ports thing is getting renewed interest after a decade of dormancy (I did xdev maybe 10 years ago to allow Timing Solutions to build some ports with the native arm compiler). Lately bugs have been fixed. You are quite likely the first person to try it without root ever. There will be bumps for that :).

> Is this even the right make target to use?

It is the only target we have that supports building outside the crazy build environment we have.

Just for grins, I did the following on a stock system (without your change to src.opts.mk from Bapt) and not as root:

% mkdir $HOME/D
% make DESTDIR=$HOME/D XDEV=mips XDEV_ARCH=mips xdev WITHOUT_CLANG=t WITHOUT_CLANG_BOOTSTRAP=t WITH_GCC=t WITH_GCC_BOOTSTRAP=t
% 

and it hit the stdc++ bits not being defined. Please see above with the "clang folks didn’t properly integrate”  Or possibly some other reason.

However, when I remove DESTDIR and build normally as root, it works. If I add DESTDIR to the root build, it works… So there’s definitely something wrong with the non-root build.

Warner

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

iQIcBAEBCgAGBQJTuvT3AAoJEGwc0Sh9sBEAV8cQALV+oco/VF26i5daXLr+wWIY
SAbg+eg7o185CjkYiYs439cB+gtEufwCaUlkm/DC9ZYGnd4lpXEaQQtYJtvRDxku
wKUienXshtht7c3wLT0YS9ZEZU/qrmzB3v8Jvv6BUZKD3E/dCrM6NrJFwWHuHzXz
m7ddIhtTi02GrKhTCu+gvR8sc5y4LrYtq2JjDYXU2TyZbZdNtrglpEfZiT9z0omU
I+z4ggO+F4UsjFimQYRAxviT+9PGzPaLWYw8zPiMRMo/yMgJD6fRuvWQ+pRSrDuo
xoM+vcLUEKUFZhIMXeT/vsisQFfx8Mn4M90t1K+kVyzFW3KjssAVjS7crWHAHPnp
5UV0HldbBRKz/fuFLZeoZ40R818sYWp9Y5pJPyXcoaCf/AUJbkFsNOX2GXrA5y2E
wZVi/xmH1whwdxWpvvcw7ks13z7NNHL7vTY+4ahL+/5LIQG6Rwj/jWVkI6OTE6N0
seIKpZAcEhOuau702gnlJEqMzzGpanfo+jMNReV+km4FIIvxGWiWUOflsFTax5H9
TJWXcTxLq3LI+MEqQ+jfWcaUy/bAGoMMDm0WY+A6Oi7U035hzaJibJBhMxsqLgLV
oPPq4sKp9aS6uEpQ5iaXnbFhlWBn6H1tKihoJ+vyDNYxlr8PUTtJ/UX+10LIBMwC
u6CN2rH96TiYh1wAJbxV
=r4Fp
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9CE37432-1028-44FE-B0B7-224625EB9AB3>