From owner-freebsd-arch@FreeBSD.ORG Mon Jul 7 23:27:18 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 292AC4E3 for ; Mon, 7 Jul 2014 23:27:18 +0000 (UTC) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E96F12CC2 for ; Mon, 7 Jul 2014 23:27:17 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id w10so6138375pde.10 for ; Mon, 07 Jul 2014 16:27:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=ppjZPgBL4XU2CsXsG4v06NXxWl123TmKfBDK/AJ0Q50=; b=N+qbBDbyV0jbF0xQoQSq44gMx2SHYji4zpvK0W3estmr66u24l1RqKW7zxo+Qao/2r tzdhjSxqMDWG4eyBnMGn0rrVd7DOuMGfcfLFc8ndosZ3VlTvw3Qw9Dg7NGZkLVy3sazz CnoVnqOMq0bdK0cnkLnjDa1UxvSj2rXQhI1D1gtpuLKMmiyIAUE8kifPxbhjV/l78U8e FPXZfZ/EkEFnEYS+jEhGHKps44YxeWAW6yGjqpnly/QSCNYxun9Ybv7F1+77QtqELnEf NsP2hivS4esvInG3RD3I1g5HzV19hcTYzKp2ivEKsGGufm2KjCcZEX1JYi55alGmzNyo bJCw== X-Gm-Message-State: ALoCoQkJGMTZB98X57t2t0qAuwvz0Wpo2agXmuWRF/pDbM+nvmUuZXHIc/s994zjJM9qRCd7V+FC X-Received: by 10.70.92.49 with SMTP id cj17mr1518271pdb.53.1404775636780; Mon, 07 Jul 2014 16:27:16 -0700 (PDT) Received: from [10.64.26.2] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id mz8sm21793054pdb.62.2014.07.07.16.27.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Jul 2014 16:27:16 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_3B3E7ECB-F0D7-46C6-B81D-F7FF65D1BE03"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Total confusion over toolchain/xdev behavior From: Warner Losh In-Reply-To: <1404766292.65432.43.camel@revolution.hippie.lan> Date: Mon, 7 Jul 2014 17:27:25 -0600 Message-Id: <20B72004-1499-4F99-A7C7-13173C50C7C6@bsdimp.com> References: <1404688077.1059.115.camel@bruno> <1404766292.65432.43.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: sbruno@FreeBSD.org, 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 23:27:18 -0000 --Apple-Mail=_3B3E7ECB-F0D7-46C6-B81D-F7FF65D1BE03 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 7, 2014, at 2:51 PM, Ian Lepore wrote: > 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. >>=20 >> 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. >>=20 >> = ----------------------------------------------------------------------- >> Attempt #1: >> I have been trying non-root xdev builds: >> MAKEOBJDIRPREFIX=3D/var/tmp make -s -j8 xdev XDEV=3Dmips = XDEV_ARCH=3Dmips >> -- dies because it tries to compile CLANG. >> = ----------------------------------------------------------------------- >>=20 >> 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 >>=20 >> =3D=3D=3D> gnu/usr.bin/cc/gcov (all) >> mtree populating //usr/mips-freebsd >> mkdir: //usr/mips-freebsd: Permission denied >> *** Error code 1 >> = ----------------------------------------------------------------------- >>=20 >> Attempt #3: Add XDTP >> MAKEOBJDIRPREFIX=3D/var/tmp make -s xdev XDEV=3Dmips XDEV_ARCH=3Dmips >> XDTP=3D/var/tmp/mips_cc >>=20 >> Try defining a XDTP=3D/var/tmp/mips_cc with the above patch applied, = get's >> a bit farther but compile failure in locating critical include files. >>=20 >> =3D=3D=3D> 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 >> = ----------------------------------------------------------------------- >>=20 >> Attempt #4: Add the additional XDDESTDIR >> MAKEOBJDIRPREFIX=3D/var/tmp make -s xdev XDEV=3Dmips XDEV_ARCH=3Dmips >> XDTP=3D/var/tmp/mips_cc XDESTDIR=3D/var/tmp/mips_dst >> -- Same results as attempt #3 >> = ----------------------------------------------------------------------- >>=20 >> Even attempting to do stuff for *clang* enabled architectures bails >> because its not respecting prefixes: >> MAKEOBJDIRPREFIX=3D/var/tmp make -s -j 8 xdev XDEV=3Darm = XDEV_ARCH=3Darmv6 >> -- bails because it tries to: >> =3D=3D=3D> usr.bin/clang/tblgen (all) >> mtree populating //usr/armv6-freebsd >> mtree: etc/ntp: Permission denied >> _xi-cross-tools >> =3D=3D=3D> xdev gnu/usr.bin/binutils (install) >> =3D=3D=3D> gnu/usr.bin/binutils/libiberty (install) >> =3D=3D=3D> gnu/usr.bin/binutils/libbfd (install) >> =3D=3D=3D> gnu/usr.bin/binutils/libopcodes (install) >> =3D=3D=3D> gnu/usr.bin/binutils/libbinutils (install) >> =3D=3D=3D> gnu/usr.bin/binutils/addr2line (install) >> =3D=3D=3D> gnu/usr.bin/binutils/as (install) >> =3D=3D=3D> gnu/usr.bin/binutils/ld (install) >> install: //usr/armv6-freebsd/usr/bin/ld: Permission denied >> *** Error code 71 >>=20 >> = ----------------------------------------------------------------------- >> Adding XDTP and XDDESTDIR results in a little more progress but = obvious >> failures to attempt and install things directly into my host system: >>=20 >> MAKEOBJDIRPREFIX=3D/var/tmp make -s xdev XDEV=3Darm XDEV_ARCH=3Darmv6 >> XDDESTDIR=3D/var/tmp/arm_cc XDTP=3D/var/tmp/armv6_cc >> =3D=3D=3D> secure/lib/libssh (install) >> =3D=3D=3D> usr.bin/lex/lib (obj,depend,all,install) >> mkdir: ../../../../usr: Permission denied >> *** Error code 1 >>=20 >> Stop. >> make[1]: stopped in /home/sbruno/bsd/fbsd_head >> *** Error code 1 >>=20 >> Stop. >> make: stopped in /home/sbruno/bsd/fbsd_head >=20 > It looks to me like the permission part of the problem is being caused > by a lack of DESTDIR=3D. 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=92ve 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=3D$HOME/F XDEV=3Dmips XDEV_ARCH=3Dmips = WITHOUT_CLANG=3Dt WITHOUT_CLANG_BOOTSTRAP=3Dt WITH_GCC=3Dt = WITH_GCC_BOOTSTRAP=3Dt WITH_GNUCXX=3Dt -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=92d think). = I suspect that bapt=92s 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=92t see if they worked. Warner --Apple-Mail=_3B3E7ECB-F0D7-46C6-B81D-F7FF65D1BE03 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTuyzdAAoJEGwc0Sh9sBEArLsP/id8fth4V1UeN+54B2oIDDVf bttt5/22zrONP2Jk5NZXPxQvyVIFnNs8d24u0hdhApqjl++hjF5oXfao7hv4qysh Pcwik+x9lmoORQE8rGRpZAJu3VxdDH2mEsokJVLq0H6cV0LT46K1mgqQloe91ok4 6JrjJKNMuuv9X+2nY8fqglRFAVOV8Jf82i0gqRBrU0blzH07prJZKpIvrjsKpSgy x+UYzFfP2vlq4NcQlXZeYIKmVW4JHmKQA8hkTobO1KJMrvaY+/XK1s+dn4nCOIjP VIXK01/cQmSII/sBDtobDwa4LHttMY9JHLxGbmF5pnbisRurwErYXJycMbfU89Gn AfVYmmCH0po34lxFotMF6MLcMgJfnUfn9FABUr9jGk01Xu8q2f/OiHJ64LaZlE3Y Rmcb5twJr3u9hhrC1fb4ILDL4vMP5C6f2l+Su7Rx6SFhVYmdRqbsx4rN6A6On2+U hVW4aHpTHQItjUvi5t8p2ya30A6D89qBVpgjpsIzZyrsQOxjZxv7HpxZSUvxOlpr EXSkNKDOT7/RV2C/c4NHjdvdQuu8xwCx0eewM0izdThSp1wgDSC15+43mR+BWPaG tehBPq3gtFJClP1Z7XuvqnFVXTZOpULtd4ST8I3ZycB1EHW7N6sVc8Uv2Klwt88A KORvWsnAR1Yt1IC1XIsu =LExT -----END PGP SIGNATURE----- --Apple-Mail=_3B3E7ECB-F0D7-46C6-B81D-F7FF65D1BE03--