From owner-freebsd-arch@FreeBSD.ORG Mon Jul 7 20:51:36 2014 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FBE2C5A; Mon, 7 Jul 2014 20:51:36 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43A742063; Mon, 7 Jul 2014 20:51:35 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1X4Fst-0002TX-0q; Mon, 07 Jul 2014 20:51:35 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s67KpXtF001473; Mon, 7 Jul 2014 14:51:33 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/4ilmMvxDznmBm6zX3Zgah Subject: Re: Total confusion over toolchain/xdev behavior From: Ian Lepore To: sbruno@FreeBSD.org In-Reply-To: <1404688077.1059.115.camel@bruno> References: <1404688077.1059.115.camel@bruno> Content-Type: text/plain; charset="us-ascii" Date: Mon, 07 Jul 2014 14:51:32 -0600 Message-ID: <1404766292.65432.43.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 20:51:36 -0000 On Sun, 2014-07-06 at 16:07 -0700, Sean Bruno wrote: > Objective: install an xcompile toolchain into a jail for use by > poudriere during arm/mips/sparc/power ports pkgs builds. The build > should be possible from a non-root user. > > As far as I can tell, the xdev target is completely busted for non-clang > arch's right now as it tries to build clang no matter what I do. Its > missing some pretty key documentation to making it work correctly, so a > lot of my attempts have been "guess and check" with verbose make. > > ----------------------------------------------------------------------- > Attempt #1: > I have been trying non-root xdev builds: > MAKEOBJDIRPREFIX=/var/tmp make -s -j8 xdev XDEV=mips XDEV_ARCH=mips > -- dies because it tries to compile CLANG. > ----------------------------------------------------------------------- > > Attempt #2: > Apply a hack from Baptiste that isn't quite right, but at least gets > farther, note the missing variable causing "//usr/mips-freebsd" > http://people.freebsd.org/~sbruno/src.ops.mk.diff > > ===> gnu/usr.bin/cc/gcov (all) > mtree populating //usr/mips-freebsd > mkdir: //usr/mips-freebsd: Permission denied > *** Error code 1 > ----------------------------------------------------------------------- > > Attempt #3: Add XDTP > MAKEOBJDIRPREFIX=/var/tmp make -s xdev XDEV=mips XDEV_ARCH=mips > XDTP=/var/tmp/mips_cc > > Try defining a XDTP=/var/tmp/mips_cc with the above patch applied, get's > a bit farther but compile failure in locating critical include files. > > ===> gnu/lib/libstdc++ (obj,depend,all,install) > In file included from /home/sbruno/bsd/fbsd_head/gnu/lib/libstdc > ++/../../../contrib/libstdc++/src/bitmap_allocator.cc:30: > /home/sbruno/bsd/fbsd_head/gnu/lib/libstdc++/../../../contrib/libstdc > ++/include/ext/bitmap_allocator.h:37:54: error: cstddef: No such file or > directory > ----------------------------------------------------------------------- > > Attempt #4: Add the additional XDDESTDIR > MAKEOBJDIRPREFIX=/var/tmp make -s xdev XDEV=mips XDEV_ARCH=mips > XDTP=/var/tmp/mips_cc XDESTDIR=/var/tmp/mips_dst > -- Same results as attempt #3 > ----------------------------------------------------------------------- > > 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 > > ----------------------------------------------------------------------- > Adding XDTP and XDDESTDIR results in a little more progress but obvious > failures to attempt and install things directly into my host system: > > MAKEOBJDIRPREFIX=/var/tmp make -s xdev XDEV=arm XDEV_ARCH=armv6 > XDDESTDIR=/var/tmp/arm_cc XDTP=/var/tmp/armv6_cc > ===> secure/lib/libssh (install) > ===> usr.bin/lex/lib (obj,depend,all,install) > mkdir: ../../../../usr: Permission denied > *** Error code 1 > > Stop. > make[1]: stopped in /home/sbruno/bsd/fbsd_head > *** Error code 1 > > Stop. > make: stopped in /home/sbruno/bsd/fbsd_head 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. -- Ian