From owner-freebsd-toolchain@FreeBSD.ORG Thu Apr 2 15:27:06 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 8F67B267; Thu, 2 Apr 2015 15:27:06 +0000 (UTC) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) (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 EB122373; Thu, 2 Apr 2015 15:27:05 +0000 (UTC) Received: by labe2 with SMTP id e2so62734425lab.3; Thu, 02 Apr 2015 08:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=T5R2MPswVNhx8zxwb1cQgPs7zuatB8hscH9pcs/vIE8=; b=ebE4dSbjgnD4PbVz6BLQ5Slu5tWVTyNFgE1FZh8zyxcz4Y7ka58mLad0AYMZexQqEI Dyk+3jBt/cWYK68MaOx2Fr/JHq1cZ4fA1O7i2ZLvU91Wg3THHwcz48hr0K8+reOhr2tX NnTmcZJ6ZexYt7MYrUPW89OHTuChK9s2pkoO9LfTxWfWfbeyiVzJ4wyGASLdeatd+pNk Y4RQD7hlw45qz7dXkl/0BE+VoI2B9YjOl9fHSuQx6mTDjktD7UdPhvwszdO/XqlgIY40 vxHTdkHkjkmJunbF3LBRPKQTGFV66v2YQjlAWqHKaiJid3AHc12LiIaDdCeX8sA0rJV3 VKTg== MIME-Version: 1.0 X-Received: by 10.152.36.169 with SMTP id r9mr18079878laj.29.1427988424045; Thu, 02 Apr 2015 08:27:04 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.108.168 with HTTP; Thu, 2 Apr 2015 08:27:03 -0700 (PDT) In-Reply-To: References: Date: Thu, 2 Apr 2015 08:27:03 -0700 X-Google-Sender-Auth: DuSntYqIfX7HjYk1qtkgIJHHKZM Message-ID: Subject: Re: Failed to build rescue with gcc 4.9 From: Craig Rodrigues To: FreeBSD Toolchain , "freebsd-testing@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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:27:06 -0000 On Sat, Mar 28, 2015 at 2:34 PM, Craig Rodrigues wrote: > Hi, > > The build host VM that I used was FreeBSD 10.1-RELEASE, amd64. > > I took this patch for libc++ and applied it to my tree: > > http://reviews.llvm.org/D8461 > > I used this script to build with gcc 4.9: > > > https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-build.sh > > Building rescue failed. You can see the full build log here: > > > https://jenkins.freebsd.org/job/FreeBSD_HEAD_external_toolchain_gcc/26/console > > The relevant section seems to be this: > > --- rescue --- > /usr/local/bin/x86_64-portbld-freebsd10.0-gcc -isystem > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/tmp/usr/include > > -L/builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/tmp/usr/lib > > --sysroot=/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 > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/exec.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/getusershell.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/login_class.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/popen.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/rcmdsh.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue/../librescue/sysctl.o > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_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 > > make[5]: stopped in > > /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/rescue/rescue > 1 error > > > 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 > > Any ideas? > -- > Craig > > On Tue, Mar 31, 2015 at 1:41 PM, Dimitry Andric wrote: > > I'm suspecting this might have something to do with crunchide, or least, > the copy of crunchide that is run for this: > > --- 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_external_toolchain_gcc/rescue/rescue//builds/FreeBSD_HEAD_external_toolchain_gcc/bin/cat/cat.o > crunchide -k _crunched_cat_stub cat.lo > > 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}: > > .if ${TARGET_ARCH} != ${MACHINE_ARCH} > .if ${MK_RESCUE} != "no" || defined(RELEASEDIR) > _crunchide= usr.sbin/crunch/crunchide > .endif > > 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... > > 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? > > Actually, I am building on a 10.1-RELEASE box. I was able to get this successful build: https://jenkins.freebsd.org/job/FreeBSD_HEAD_external_toolchain_gcc/38/console by applying this patch (the ${TARGET_ARCH} != ${MACHINE_ARCH} checks seemed wrong to me): Index: Makefile.inc1 =================================================================== --- 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} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif -.endif -.if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${MK_RESCUE} != "no" || defined(RELEASEDIR) _crunchide= usr.sbin/crunch/crunchide .endif @@ -1469,7 +1466,6 @@ .if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR) _kgzip= usr.sbin/kgzip .endif -.endif # If we're given an XAS, don't build binutils. .if ${XAS:M/*} == "" -- Craig