From owner-freebsd-stable@FreeBSD.ORG Thu May 10 19:39:20 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AFA3E106564A for ; Thu, 10 May 2012 19:39:20 +0000 (UTC) (envelope-from jeff+freebsd@wagsky.com) Received: from smtp.wagsky.com (wildside.wagsky.com [75.101.96.15]) by mx1.freebsd.org (Postfix) with ESMTP id 868D58FC08 for ; Thu, 10 May 2012 19:39:20 +0000 (UTC) Received: from [192.168.6.7] (port7.pn.wagsky.com [192.168.6.7]) by mailgw.pn.wagsky.com (Postfix) with ESMTP id 4D88061C2B; Thu, 10 May 2012 12:39:18 -0700 (PDT) Message-ID: <4FAC1965.7070800@wagsky.com> Date: Thu, 10 May 2012 12:39:17 -0700 From: Jeff Kletsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Two build problems -- "make memstick" and "make release" with -DWITHOUT_CLANG X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 19:39:20 -0000 I'm trying to do bisection to locate when a specific bug appeared and can replicate the issue when I boot from a memstick and use the LiveCD option. This keeps any questions of "upgrade or install" out of the picture. Unfortunately, I've run into a couple problems. After reading the new build(7) and release(7) information, I built everything locally then tried # cd /usr/src/release # make memstick At first, I attributed the hours of 100% CPU time for bsdtar to my reasonably slow Atom 330 box. After a day, I decided that wasn't the issue. Looking at the results, the files were being put in /usr/src/release, not under /usr/obj/ somewhere, as I would have expected. I believe that the process encountered a filesystem loop when copying the source for the memstick. If you look at the output of the make process, the first few lines are: mkdir /usr/src/release/dist mkdir /usr/src/release/dist mkdir -p /usr/src/release/dist/usr cd /usr/src/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 distributeworld DISTDIR=/usr/src/release/dist mkdir -p /usr/src/release/dist/usr mkdir: /usr/src/release/dist: File exists cd /usr/src/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 distributekernel packagekernel DISTDIR=/usr/src/release/dist ln -fs /usr/ports /usr/src/release/dist/usr/ports ln -fs /usr/src/release/.. /usr/src/release/dist/usr/src It looks like that last ln -fs creates a loop, which eventually results in tar output of: a usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/sys/dev/e1000/e1000_osdep.c a usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/release/dist/usr/src/sys/dev/e1000/e1000_osdep.h Running # cd /usr/src/release # make -n -p memstick indicates that .OBJDIR is set to /usr/src/release (and is set to /usr/obj/usr/src when make is executed in /usr/src). # cd /usr/src # make memstick tells me that "memstick" isn't a recognized target. I've tried setting MAKEOBJDIR in the environment, but that didn't change the value of .OBJDIR reported by make. So that is question #1 -- How can I build a memstick from an already-compiled tree? === I can successfully # cd /usr/src/release # ./generate_release.sh stable/9 /usr/release/stable-9 or the like, but a build with clang enabled takes me close to three hours. Since the issue isn't clang-related, I'd like to be able to build without clang to the point of having a bootable memstick. release(7) suggests that the environment variable MAKE_FLAGS could be used to pass flags, however # cd /usr/src/release # export MAKE_FLAGS='-DWITHOUT_CLANG' # ./generate_release.sh stable/9@226702 /usr/release/stable-9 ends up failing. >>> World build started on Wed May 9 06:59:00 PDT 2012 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims [...] Checked out revision 226702. -------------------------------------------------------------- >>> World build started on Wed May 9 08:15:36 PDT 2012 -------------------------------------------------------------- -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- rm -rf /usr/obj/usr/release/226702/usr/src/tmp rm -rf /usr/obj/usr/release/226702/usr/src/lib32 [...] >>> World build completed on Wed May 9 09:40:48 PDT 2012 >>> Making hierarchy >>> Installing everything starts off nicely, but then eventually dies with ===> usr.bin/clang (install) ===> usr.bin/clang/clang (install) install -s -o root -g wheel -m 555 clang /usr/release/226702/usr/bin install: clang: No such file or directory *** Error code 71 (plus the remaining errors up the chain) I'm guessing that -DWITHOUT_CLANG isn't being passed to the installworld process. Which leads to the second question -- how can I "clean-build" a memstick (or ISO) without having to build clang? While I understand the need to get clang vetted out, for the purposes of bisection, cutting an hour or two off of each of my builds is very desirable. Thanks! Jeff