From owner-freebsd-toolchain@FreeBSD.ORG Thu Apr 2 15:42:00 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E7D08BE for ; Thu, 2 Apr 2015 15:42:00 +0000 (UTC) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26B787E3 for ; Thu, 2 Apr 2015 15:41:59 +0000 (UTC) Received: by pactp5 with SMTP id tp5so87617679pac.1 for ; Thu, 02 Apr 2015 08:41:53 -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:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=o37khhpnpPMRlzPPXzFxDeRUJi5x0HQiYQjOVrMUgE8=; b=gzMBAU652KnG6Lp2E9bFtYUGPAvm5gCzf2RqAvfHFTpsrg03Sx7kFd0409cPLX+VE5 rzvj2hxK1QN0MXk54PTcTXoMoEPsn7CaseJlU02LFpN1vTJDUOqWoai88YzJQVlGkp+a 2p3wy6sCIsIWz4pwd4S4UJaIrwuaBn3GLzN7AIL2C3kQae2jqLcXhzOnArZGmRBGgBEE 8QGIOr+b6MNskK4IF5rtWvSSfDdAmSleod4S0KfUQQU6y2/EU8U0dXzd/4lFVNNXjt+A NVkafsW5ITr8o4stZzG+3+6K8eVMW4wKEFrREDsl9n8vxLkRwP9Ut5tvue7j2GuPxHoR 9uEA== X-Gm-Message-State: ALoCoQlw2SurRR+IKwUo1GDo/gCIP+1fdRmrJYql8YltmmB2Y7/s25VdJSWKwvvFojXIZVtnW3CC X-Received: by 10.70.129.72 with SMTP id nu8mr88071396pdb.72.1427989312956; Thu, 02 Apr 2015 08:41:52 -0700 (PDT) Received: from [198.18.104.37] ([12.27.65.194]) by mx.google.com with ESMTPSA id ob7sm5608122pdb.13.2015.04.02.08.41.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 08:41:52 -0700 (PDT) Sender: Warner Losh Subject: Re: Failed to build rescue with gcc 4.9 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_121E348A-F3E2-4DB3-ADB8-0B3ABFD4A1B9"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Thu, 2 Apr 2015 08:41:50 -0700 Message-Id: References: To: Craig Rodrigues X-Mailer: Apple Mail (2.2070.6) Cc: "freebsd-testing@freebsd.org" , FreeBSD Toolchain X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2015 15:42:00 -0000 --Apple-Mail=_121E348A-F3E2-4DB3-ADB8-0B3ABFD4A1B9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 2, 2015, at 8:27 AM, Craig Rodrigues = wrote: >=20 > On Sat, Mar 28, 2015 at 2:34 PM, Craig Rodrigues > wrote: >=20 >> Hi, >>=20 >> The build host VM that I used was FreeBSD 10.1-RELEASE, amd64. >>=20 >> I took this patch for libc++ and applied it to my tree: >>=20 >> http://reviews.llvm.org/D8461 >>=20 >> I used this script to build with gcc 4.9: >>=20 >>=20 >> = https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-buil= d.sh >>=20 >> Building rescue failed. You can see the full build log here: >>=20 >>=20 >> = https://jenkins.freebsd.org/job/FreeBSD_HEAD_external_toolchain_gcc/26/con= sole >>=20 >> The relevant section seems to be this: >>=20 >> --- rescue --- >> /usr/local/bin/x86_64-portbld-freebsd10.0-gcc -isystem >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/tmp/usr/include >>=20 >> = -L/builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_exte= rnal_toolchain_gcc/tmp/usr/lib >>=20 >> = --sysroot=3D/builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD= _HEAD_external_toolchain_gcc/tmp >> -B/usr/local/x86_64-freebsd/bin/ -static -o rescue rescue.o cat.lo >> chflags.lo chio.lo chmod.lo cp.lo date.lo dd.lo df.lo echo.lo ed.lo >> expr.lo getfacl.lo hostname.lo kenv.lo kill.lo ln.lo ls.lo mkdir.lo >> mv.lo pkill.lo ps.lo pwd.lo realpath.lo rm.lo rmdir.lo setfacl.lo >> sh.lo sleep.lo stty.lo sync.lo test.lo rcp.lo csh.lo badsect.lo >> camcontrol.lo ccdconfig.lo clri.lo devfs.lo dmesg.lo dump.lo = dumpfs.lo >> dumpon.lo fsck.lo fsck_ffs.lo fsck_msdosfs.lo fsdb.lo fsirand.lo >> gbde.lo geom.lo ifconfig.lo init.lo kldconfig.lo kldload.lo = kldstat.lo >> kldunload.lo ldconfig.lo md5.lo mdconfig.lo mdmfs.lo mknod.lo >> mount.lo mount_cd9660.lo mount_msdosfs.lo mount_nfs.lo = mount_nullfs.lo >> mount_udf.lo mount_unionfs.lo newfs.lo newfs_msdos.lo nos-tun.lo >> ping.lo reboot.lo restore.lo rcorder.lo route.lo routed.lo rtquery.lo >> rtsol.lo savecore.lo spppcontrol.lo swapon.lo sysctl.lo tunefs.lo >> umount.lo atmconfig.lo ping6.lo ipf.lo zfs.lo zpool.lo bsdlabel.lo >> fdisk.lo dhclient.lo head.lo mt.lo nc.lo sed.lo tail.lo tee.lo >> gzip.lo bzip2.lo less.lo xz.lo tar.lo vi.lo id.lo zdb.lo chroot.lo >> chown.lo >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/exec.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/getusershell.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/login_class.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/popen.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/rcmdsh.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/sysctl.o >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue/../librescue/system.o >> -lcrypt -ledit -ljail -lkvm -ll -ltermcapw -lutil -lxo -lalias -lcam >> -lncursesw -ldevstat -lipsec -llzma -lavl -lzpool -lzfs_core -lzfs >> -lnvpair -lpthread -luutil -lumem -lgeom -lbsdxml -lkiconv -lmt >> -lsbuf -lufs -lz -lbz2 -larchive -lcrypto -lmd -lm cat.lo: file not >> recognized: File truncated collect2: error: ld returned 1 exit >> status *** [rescue] Error code 1 >>=20 >> make[5]: stopped in >>=20 >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue >> 1 error >>=20 >>=20 >> I double checked. cat.lo is not a truncated file. >> # ls -l cat.lo ; file cat.lo >> -rw-r--r-- 1 jenkins wheel 13112 Mar 28 21:17 cat.lo >> cat.lo: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), = stripped >>=20 >> Any ideas? >> -- >> Craig >>=20 >>=20 >=20 > On Tue, Mar 31, 2015 at 1:41 PM, Dimitry Andric = wrote: >=20 >>=20 >> I'm suspecting this might have something to do with crunchide, or = least, >> the copy of crunchide that is run for this: >>=20 >> --- cat.lo --- >> /usr/local/x86_64-freebsd/bin/ld -dc -r -o cat.lo cat_stub.o >> = /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_extern= al_toolchain_gcc/rescue/rescue//builds/FreeBSD_HEAD_external_toolchain_gcc= /bin/cat/cat.o >> crunchide -k _crunched_cat_stub cat.lo >>=20 >> If I look at my own build logs, it seems to pick the crunchide >> executable in /usr/bin, and Makefile.inc1 does *not* build it during = the >> cross-tools stage if ${TARGET_ARCH} is the same as ${MACHINE_ARCH}: >>=20 >> .if ${TARGET_ARCH} !=3D ${MACHINE_ARCH} >> .if ${MK_RESCUE} !=3D "no" || defined(RELEASEDIR) >> _crunchide=3D usr.sbin/crunch/crunchide >> .endif >>=20 >> However, this does not explain why my /usr/bin/crunchide seems to not >> screw up cat.lo, while yours does. As far as I can see, we're both >> building this on a stable/10 amd64 box... >>=20 >> Maybe, as a hack, you can force cross-tools to build crunchide, by >> patching Makefile.inc1 to ignore the arch check, and see what that >> results in? >>=20 >>=20 > Actually, I am building on a 10.1-RELEASE box. >=20 > I was able to get this successful build: > = https://jenkins.freebsd.org/job/FreeBSD_HEAD_external_toolchain_gcc/38/con= sole >=20 > by applying this patch (the ${TARGET_ARCH} !=3D ${MACHINE_ARCH} = checks > seemed wrong to me): Why do they seem wrong. The intent is that you=E2=80=99d only build = these tools when you are cross building. A long time ago, they were in the bootstrap = path, but every FreeBSD system for a long time now has adequate versions of them. If that=E2=80=99s not the case, then we perhaps need to revisit the = logic here. If we=E2=80=99ve suddenly started needing newer versions, that should be expressed in the logic as well. Warner > Index: Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Makefile.inc1 (revision 280979) > +++ Makefile.inc1 (working copy) > @@ -1457,12 +1457,9 @@ > # we get done with the earlier stages. It is the last set of tools = needed > # to begin building the target binaries. > # > -.if ${TARGET_ARCH} !=3D ${MACHINE_ARCH} > .if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "i386" > _btxld=3D usr.sbin/btxld > .endif > -.endif > -.if ${TARGET_ARCH} !=3D ${MACHINE_ARCH} > .if ${MK_RESCUE} !=3D "no" || defined(RELEASEDIR) > _crunchide=3D usr.sbin/crunch/crunchide > .endif > @@ -1469,7 +1466,6 @@ > .if ${TARGET_ARCH} =3D=3D "i386" && defined(RELEASEDIR) > _kgzip=3D usr.sbin/kgzip > .endif > -.endif >=20 > # If we're given an XAS, don't build binutils. > .if ${XAS:M/*} =3D=3D "" >=20 >=20 > -- > Craig > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" --Apple-Mail=_121E348A-F3E2-4DB3-ADB8-0B3ABFD4A1B9 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 iQIcBAEBCgAGBQJVHWM+AAoJEGwc0Sh9sBEAP/YP/RYs/abLU74nd3LgbTSexke/ sUIB83gfr1PHOqaYVRmXfwm8H3a64BUpWzsgQ67z98a3T+GRC8Be7WGm59rwOBAF 9otI2SCL9E6Tmi13HldcEzSMJL79mmx2wWQr60vHt3XlMXf8gFljIQ5c117pZnXg r0+mkTPp7ZM5ibjxn/Q/0wadx9ONLdZXC3mEbmfitz+eHyU6vn3TJGfxyeT+my5C yjEEwT0B1hV1BzzyAlAMU3uohV/eZjsWWancnp4U8CA29+SfYDhOSjnv7tdbqkWQ yXK4IBYYEXTYDOipSbThOtNj/EBCINiTxG9v6aiua6vuxPQ92q0AxCq9rpAlkm8x vz8WScrAxO8OL3EU3PRHVY8WHW71BnhFCNXW0UQmL2jmtU3V8PmbJ/fyzLzKNQmf 7mgmf+hNaR5gbHpdipGlb07S1Ig7fgyNLZjTchA46Bqpmq75wwNi1/HvRmVrdh2Z f6M61PVfpTSv35qfOcKrZZZlSL/Oc/vgxrUKrKQq5LkMgYsJyqr4x3q/b0+qQ6mE L/xYKmnSq2VsYSMc4mGyawOfTXPVZniATyQyqb/7XsF12BNGQdrmqY7X4WreB7P9 RMQmZHWyJxYTpzOnl8ssd1Xy20MxBdX6XubK4baL8Z8GGjayT0jaOtzxMS3+y8DK ovssSbmQKO9opSSPa1XN =uhe9 -----END PGP SIGNATURE----- --Apple-Mail=_121E348A-F3E2-4DB3-ADB8-0B3ABFD4A1B9--