From owner-freebsd-questions@FreeBSD.ORG Thu Mar 7 19:37:49 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B9574FC4 for ; Thu, 7 Mar 2013 19:37:49 +0000 (UTC) (envelope-from vrwmiller@gmail.com) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id 90315EBF for ; Thu, 7 Mar 2013 19:37:49 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id 13so1065348iea.14 for ; Thu, 07 Mar 2013 11:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pc9prezbodIydj2keBuex6omdxvd0RVWujHzCBo5Bms=; b=eGVlydkyqnePfrBzUC/jCYSH/AkasR+tN0ZcdEKzVR81OaR5OaAzpFrC7Jlghvmc+z QFh3a9pgMynWkCRadA9uyb53dRtcjjZxObJlaJrpV6YXc+zB+/pZ1WDVHvvNo8tHAfPd JOfvH60qBztUUQEt/Xiioof7GIeXUO11boAexiGS1N+pNkq3G/cAgO2/eojy2lz6UpAv G99ecJXpQdd6IeHOy5yT4SHG7dtqFLbQ6Xs4B5gvWeOIPlwI01p4MvOJOrhugtyQoM8Z oFW3Qme4LPaF88JFbTG3AQ6dLU/UPgIkf63UvOPSN8MEqc/X1yDX3j7lnwcRNw64YSxO k7qQ== MIME-Version: 1.0 X-Received: by 10.50.41.167 with SMTP id g7mr15417006igl.47.1362685069263; Thu, 07 Mar 2013 11:37:49 -0800 (PST) Sender: vrwmiller@gmail.com Received: by 10.64.19.199 with HTTP; Thu, 7 Mar 2013 11:37:48 -0800 (PST) In-Reply-To: <82E7A4A3-B65D-4ECA-BEF4-FD67445AF1B2@fisglobal.com> References: <82E7A4A3-B65D-4ECA-BEF4-FD67445AF1B2@fisglobal.com> Date: Thu, 7 Mar 2013 14:37:48 -0500 X-Google-Sender-Auth: _DnpbK86mBpYrqtT5wSOoaWkoOU Message-ID: Subject: Re: building crunchgen fails From: Rick Miller To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2013 19:37:49 -0000 Hi All, In the thread below, my custom boot_crunch.conf works in releng/8, but fails in stable/8. Here is the failure message: cc -static -o boot_crunch boot_crunch.o hostname.lo pwd.lo rm.lo sh.lo ls.lo test.lo cat.lo df.lo sleep.lo camcontrol.lo dhclient.lo fsck_ffs.lo ifconfig.lo mount_nfs.lo newfs.lo route.lo rtsol.lo tunefs.lo kenv.lo sysctl.lo mdmfs.lo mdconfig.lo mount.lo dmesg.lo fdisk.lo bsdlabel.lo uname.lo cpio.lo find.lo minigzip.lo sed.lo awk.lo fetch.lo arp.lo sysinstall.lo usbconfig.lo grep.lo -ll -ledit -lfetch -lmd -lcrypt -lftpio -lz -lnetgraph -ldialog -lncurses -lcam -lsbuf -lutil -ldisk -lufs -ldevinfo -lkvm -lgeom -lbsdxml -larchive -lbz2 -lusb -lgnuregex -llzma -lssl -lcrypto -ljail -lm camcontrol.lo(.text+0x13fe): In function `mode_list': : undefined reference to `mode_sense' camcontrol.lo(.text+0x1e93): In function `mode_edit': : undefined reference to `mode_sense' camcontrol.lo(.text+0x1ee7): In function `mode_edit': : undefined reference to `mode_sense' camcontrol.lo(.text+0x1f6a): In function `mode_edit': : undefined reference to `mode_sense' camcontrol.lo(.text+0x209e): In function `mode_edit': : undefined reference to `mode_sense' camcontrol.lo(.text+0x2118): In function `mode_edit': : undefined reference to `mode_select' *** Error code 1 Stop in /usr/obj/usr/src/release/boot_crunch. *** Error code 1 Stop in /usr/src/release. + umount /dev *** Error code 1 Stop in /usr/src/release. I attempted my custom boot_crunch.conf as well as the default. Both fail with the same error. My custom boot_crunch.conf is @ http://pastebin.com/jfcJKb08 Note the "special" line included as Devin recommends the thread below. mode_sense and mode_select appear to be defined (but I am far from proficient with C to declare with any authority what the problem might be. I'm hoping someone could help me understand and correct the problem. On Wed, Jan 23, 2013 at 11:01 AM, Devin Teske w= rote: > > On Jan 23, 2013, at 7:22 AM, Rick Miller wrote: > >> Hi All, >> >> When executing crunchgen -o boot_crunch.conf && make -f boot_crunch.mk >> I get the following error: >> >> cc -static -o boot_crunch boot_crunch.o hostname.lo pwd.lo rm.lo sh.lo >> ls.lo test.lo cat.lo df.lo sleep.lo camcontrol.lo dhclient.lo >> fsck_ffs.lo ifconfig.lo mount_nfs.lo newfs.lo route.lo rtsol.lo >> tunefs.lo kenv.lo sysctl.lo mdmfs.lo dmesg.lo fdisk.lo bsdlabel.lo >> uname.lo cpio.lo find.lo minigzip.lo sed.lo awk.lo fetch.lo arp.lo >> sysinstall.lo usbconfig.lo grep.lo -lcam -lsbuf -lutil -ll -ledit >> -lfetch -lmd -lcrypt -lftpio -lz -lnetgraph -ldialog -lncurses -ldisk >> -lufs -ldevinfo -lkvm -lgeom -lbsdxml -larchive -lbz2 -lusb -lgnuregex >> -llzma -lssl -lcrypto -ljail -lm >> camcontrol.lo(.text+0x730b): In function `main': >> : undefined reference to `mode_edit' >> camcontrol.lo(.text+0x73fa): In function `main': >> : undefined reference to `mode_list' >> *** Error code 1 >> >> Stop in /tmp/crunchtmp. >> >> I understand that there may need to be some shuffling of the libraries >> in the boot_crunch.conf, but I've done that to no avail. Wondering if >> anyone else may be able to shed some light on this... >> >> The boot_crunch.conf can be viewed at http://pastebin.com/ZwVPQn3h >> > > According to the Makefile, if RELEASE_CRUNCH is defined, then modeedit.o = object is omitted (causing your undefined references). > > I perceive the long-term real solution would be to patch camcontrol.c (an= d pedantically camcontrol.h) to not use mode_edit()/mode_list() when RELEAS= E_CRUNCH is defined. > > However, you should be able to get through your problem by adjusting your= boot_crunch.conf slightly: > > Try http://pastebin.com/Ge6UCZEZ > > The difference being: > > --- boot_crunch.conf.orig 2013-01-03 16:29:20.000000000 -0800 > +++ boot_crunch.conf 2013-01-03 16:29:13.000000000 -0800 > @@ -17,6 +17,7 @@ > > srcdirs /usr/src/sbin > progs camcontrol > +special camcontrol objs camcontrol.o modeedit.o util.o > progs dhclient > progs fsck_ffs > progs ifconfig > > -- > Devin > > _____________ > The information contained in this message is proprietary and/or confident= ial. If you are not the intended recipient, please: (i) delete the message = and all copies; (ii) do not disclose, distribute or use the message in any = manner; and (iii) notify the sender immediately. In addition, please be awa= re that any message addressed to our domain is subject to archiving and rev= iew by persons other than the intended recipient. Thank you. --=20 Take care Rick Miller