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, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age
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 <bsd.prog.mk>