From owner-freebsd-current Fri Mar 30 0: 9:20 2001 Delivered-To: freebsd-current@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 0C82E37B71C; Fri, 30 Mar 2001 00:09:09 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f2U88VJ57295; Fri, 30 Mar 2001 11:08:31 +0300 (EEST) (envelope-from ru) Date: Fri, 30 Mar 2001 11:08:31 +0300 From: Ruslan Ermilov To: John Hay Cc: Brian Somers , Josef Karthauser , current@FreeBSD.org Subject: Re: make release broken in telnetd Message-ID: <20010330110831.A50935@sunbay.com> Mail-Followup-To: John Hay , Brian Somers , Josef Karthauser , current@FreeBSD.ORG References: <20010329150521.B21904@sunbay.com> <200103291710.f2THAvv42640@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103291710.f2THAvv42640@zibbi.icomtek.csir.co.za>; from jhay@icomtek.csir.co.za on Thu, Mar 29, 2001 at 07:10:57PM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! This was tricky. Due to the old bug in release/Makefile (it did not pass -DRELEASE_CRUNCH when building list of object files for crunched binary), ${OBJS} list for ppp was computed incorrectly, and ppp/Makefile had a special glue to build empty object files: : .if defined(RELEASE_CRUNCH) : # We must create these objects because crunchgen will link them, : # and we don't want any unused symbols to spoil the final link. : CFLAGS+=-DNONAT -DNORADIUS -DNOI4B -DNOSUID : OBJS+= chap_ms.o mppe.o id.o nat_cmd.o radius.o : chap_ms.o mppe.o id.o nat_cmd.o radius.o: : >null_${.PREFIX}.c : cc -c -o ${.TARGET} null_${.PREFIX}.c : .endif Recall that release/Makefile executes `make subclean all' against the crunchgen(1) generated .mk file. Previously, `subclean' was executed with the -DRELEASE_CRUNCH; this removed chap_ms.o, and subsequent `make all' had a chance to build chap_ms.o from the stub rule above: : # make -n -DRELEASE_CRUNCH chap_ms.o : >null_chap_ms.c : cc -c -o chap_ms.o null_chap_ms.c Now that -DRELEASE_CRUNCH is moved to crunchgen(1) .conf files (recall that I needed this so that ${OBJS} are computed correctly for telnet/Makefile), ppp/Makefile got broken. `subclean' does not cleans chap_ms.o, and subsequent `make all' considers it up-to-date. The attached patch should fix this. Please let me know... Actually, I have just committed a fix to crunchgen(1) so that it runs `make clean' with the ${BUILDOPTS}, to avoid possible failures in the future. This fix alone should be enough to fix the broken `make release', but please test with the attached patch too. : ru 2001/03/30 00:04:25 PST : : Modified files: : usr.sbin/crunch/crunchgen crunchgen.c : Log: : `buildopts' may affect the selection of object files. : Make sure we pass $(BUILDOPTS) to the `clean' target : so that `make clean' works on the same set of object : files. Otherwise, we may end up with an incorrectly : built and up-to-date object file. : : Revision Changes Path : 1.26 +2 -2 src/usr.sbin/crunch/crunchgen/crunchgen.c On Thu, Mar 29, 2001 at 07:10:57PM +0200, John Hay wrote: > Hi Ruslan, > > > > > Could you please try the attached patch and let me know? > > > > I had to move -DRELEASE_CRUNCH to *_fixit.conf so that > > ${OBJS} are computed correctly for usr.bin/telnet. > > I have tried it, but now it breaks in boot_crunch: > > ########## > cc -O -pipe -DCRUNCHED_BINARY -c tunefs_stub.c > ld -dc -r -o tunefs.lo tunefs_stub.o /usr/obj//usr/src/sbin/tunefs/tunefs.o > crunchide -k _crunched_tunefs_stub tunefs.lo > cc -static -o boot_crunch boot_crunch.o sh.lo find.lo sed.lo test.lo rm.lo pwd.l > o ppp.lo sysinstall.lo newfs.lo minigzip.lo cpio.lo fsck.lo ifconfig.lo route.lo > slattach.lo mount_nfs.lo dhclient.lo arp.lo hostname.lo rtsol.lo pccardc.lo pcc > ardd.lo usbd.lo usbdevs.lo tunefs.lo -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpi > o -lz -lnetgraph -ldialog -lncurses -lmytinfo -ldisk -lipx > ppp.lo: In function `MakeKey': > ppp.lo(.text+0xfe): undefined reference to `des_set_odd_parity' > ppp.lo: In function `DesEncrypt': > ppp.lo(.text+0x142): undefined reference to `des_set_key' > ppp.lo(.text+0x14f): undefined reference to `des_ecb_encrypt' > ppp.lo: In function `MPPEKeyChange': > ppp.lo(.text+0x7b6): undefined reference to `RC4_set_key' > ppp.lo(.text+0x7ca): undefined reference to `RC4' > ppp.lo: In function `MPPEOutput': > ppp.lo(.text+0x85b): undefined reference to `RC4_set_key' > ppp.lo(.text+0x898): undefined reference to `RC4' > ppp.lo(.text+0x8bd): undefined reference to `RC4' > ppp.lo: In function `MPPEInput': > ppp.lo(.text+0x9f7): undefined reference to `RC4_set_key' > ppp.lo(.text+0xa18): undefined reference to `RC4' > ppp.lo(.text+0xa4e): undefined reference to `RC4' > *** Error code 1 > > Stop in /usr/src/release/boot_crunch. > *** Error code 1 > ... > ########### -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: Makefile =================================================================== RCS file: /home/ncvs/src/usr.sbin/ppp/Makefile,v retrieving revision 1.84 diff -u -p -r1.84 Makefile --- Makefile 2001/03/26 14:41:22 1.84 +++ Makefile 2001/03/30 07:16:55 @@ -92,13 +92,7 @@ DPADD+= ${LIBNETGRAPH} .endif .if defined(RELEASE_CRUNCH) -# We must create these objects because crunchgen will link them, -# and we don't want any unused symbols to spoil the final link. CFLAGS+=-DNONAT -DNORADIUS -DNOI4B -DNOSUID -OBJS+= chap_ms.o mppe.o id.o nat_cmd.o radius.o -chap_ms.o mppe.o id.o nat_cmd.o radius.o: - >null_${.PREFIX}.c - cc -c -o ${.TARGET} null_${.PREFIX}.c .endif .include --ikeVEW9yuYc//A+q-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message