Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2001 10:09:58 +0300
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        John Hay <jhay@icomtek.csir.co.za>, Brian Somers <brian@FreeBSD.ORG>, Josef Karthauser <joe@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: make release broken in telnetd
Message-ID:  <20010402100958.D17079@sunbay.com>
In-Reply-To: <200104012140.f31Lekn79771@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Sun, Apr 01, 2001 at 10:40:46PM %2B0100
References:  <ru@FreeBSD.org> <200104012140.f31Lekn79771@hak.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 01, 2001 at 10:40:46PM +0100, Brian Somers wrote:
> Hi,
> 
> I'm not convinced that the patch will help.  It looks like the error 
> is because it's using the ppp.lo that was built with crypto support 
> but without the mppe bits.  Maybe other objects (such as ccp.o in 
> this case - which seems to be built with HAVE_DES and therefore 
> includes MPPEAlgorithm in it's struct ccp_algorithm) aren't being 
> rebuilt ?  Maybe the make clean isn't cleaning ccp.o etc ?
> 
I thought I have explained this in details, below.

Previously, a special hack existed in ppp/Makefile to build stub
objects because ${OBJS} was not selected properly by crunchgen(1).
Now that -DRELEASE_CRUNCH was moved from release/Makefile into
crunchgen(1) config files, `subclean' did not clean the object
files.

This was fixed twice: crunchgen(1) was modified to pass the value
of `buildopts' (here is where -DRELEASE_CRUNCH currently lives)
when running `subclean', and this special hack was removed from
ppp/Makefile because ${OBJS} now determined correctly.


> > 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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010402100958.D17079>