hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20060808] CVS and stickiness
For the past few weeks, I've tried to build NetBSD-current on my slow old PC, and it always bombed out in src/distrib/i386/cdroms, complaining that my bootxx_cd9660 is busted:
/home/cvs/src-current/obj.i386/tooldir/bin/nbinstallboot  -t raw  \
	-mi386  bootxx /home/cvs/src-current/obj.i386/destdir/usr/\
	mdec/bootxx_cd9660
nbinstallboot: Invalid magic in stage1 bootstrap 0 != 7886b6d1
nbinstallboot: Set bootstrap operation failed 
This worked fine a few weeks ago, and the only major change that happened in NetBSD since then was the switch from gcc3 to gcc4. Suspecting some breakage there, I started building everying without any optimisation today ("nbinstallboot" needs HOST_CFLAGS="", also "bootxx" and "bootxx_cd9660"), but that didn't change anything.

I've verified that daily releng builds work, so this was probably a problem on my side, but where? I didn't want to blindly rebuild the whole toolchain on this slow PC, so tried investigating. Comparing /usr/mdec/bootxx_cd990 from my own and the releng build showed that there *was* some difference, so I continued looking in src/sys/arch/i386/stand/bootxx/bootxx_cd9660 to see what the matter was. Using hexdump -C showed that there was a difference between my bootxx_cd9660 and the releng one, and after getting the intermediate files of the build (bootxx_cd9660.tmp, cdboot.o) from a helpful being on #NetBSD, nm(1) showed that my version of cdboot.o lacked several symbols, e.g. a "start1".

As the cdboot.o file is made directly from a cdboot.S file, there's probably not much chance for the compiler to break things, and I didn't really believe that the assembler would add symbols on its own. Asking other people, they confirmed that they had "start1" in their cdboot.S files, while my copy of the same file lacked such a symbol. From there it was just a quick look at src/sys/arch/i386/stand/cdboot/CVS/Entries to fine the problem:

miyu% cat CVS/Entries
/Makefile/1.6/Wed Jun 28 20:23:05 2006//
/cdboot.S/1.2/Mon Aug  7 23:24:18 2006//T1.2
D 
Apparently I used "cvs update -r1.2 cdboot.S" some time ago to get that specific version, and forgot to tell CVS to remove that sticky tag to get the latest version on later 'cvs update' runs. Also, 'cvs update' doesn't tell that a file is sticky and so this was never detected, until it exploded. Now if the CVS update would print something for sticky files as it does for modified files, that would have saved me some time this evening. Doh!

Next thing to do: cd src ; cvs up -A, just to be on the safe side.

[Tags: , , ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 35082558
Copyright (c) Hubert Feyrer