Date: Fri, 10 Jul 1998 11:24:01 +1000 From: Bruce Evans <bde@zeta.org.au> To: patton@sysnet.net, tcole@nihilist.org Cc: freebsd-current@FreeBSD.ORG Subject: Re: SOLUTION! 2.2.6-Release to -current Message-ID: <199807100124.LAA19511@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>somebody said: > >cd /usr/src > >make -m /usr/src/share/mk world (or buildworld) > >You'd think this would work but as others can attest to, it doesn't. I >can't believe we've all fatfingered the command. If you are using >2.2.6-STABLE or some previous incarnation of -current, this may work just >fine. It seems to work as advertised. Except /usr/src is wrong if the current sources are not in /usr/src. Somebody should have said: cd /wherever/the/current/sources/are make -m `pwd`/share/mk world >BTW, what's up with the following logic? > >.if (!make(world)) && (!make(buildworld)) && (!make(installworld)) > >.MAKEFLAGS:= -m ${.CURDIR}/share/mk ${.MAKEFLAGS} > >.endif Nothing. -m doesn't work in FreeBSD-2.1.any, so it can't be used unconditionally. Somebody should have said that the above only works in FreeBSD-2.2.any (and in certain versions of -current). >if we're doing any of the *world, don't we WANT to be using the mk files in >/usr/src/share/mk? No, we want to use the mk files in ${.CURDIR}/share/mk :-). > >cd /usr/src > >make -m buildworld MACHINE_ARCH="i386" BINFORMAT=aout > >is close but does *NOT* work from -RELEASE. You will get messages about the It is nonsense. It says to search for the mk files in the "buildworld" subdirectory of the current directory and make the default target (all). It has nothing to do with the world targets. Setting MACHINE_ARCH helps avoid syntax errors in src/Makefile and setting BINFORMAT helps avoid syntax errors in bsd.own.mk but otherwise have very little effect for the `all' target. >linker not finding "___error which was referenced from the text segment." >The problem is that a library is old. I don't know which one. Anyone know? >Rebuilding the libs solves it. libc. Libraries are rebuilt by `make world', by LIBDIR is set wrong by the old mk files, so the linker can't find the new libraries. The settings of LIBDIR, MACHINE_ARCH and BINFORMAT seem to be the only things that are really broken. >So, (drumroll) this is how you build -current from 2.2.6-RELEASE. I make no >promises about any earlier version. FWIW, I adopted the build procedure we >use in OpenBSD to get things rolling. > >1. cvsup src-all (8pm EST 9 July) >2. cd /usr/src/share/mk # not much point NOT to do this, also >obviates the need for the "-m /usr/src/share/mk" directive >3. make MACHINE_ARCH="i386" BINFORMAT=aout install >4. cd /usr/src/include # old sources can be dangerous >5. make MACHINE_ARCH="i386" BINFORMAT=aout install >6. cd /usr/src/lib # nukes the ___error problem >7. make MACHINE_ARCH="i386" BINFORMAT=aout >8. make MACHINE_ARCH="i386" BINFORMAT=aout install > *caution* a couple of make files are broken, see notes >9. cd /usr/src >10. make MACHINE_ARCH="i386" BINFORMAT=aout buildworld >11. wait an eternity (even on a PPro233 with 128mb of RAM), watch a movie >12. make MACHINE_ARCH="i386" BINFORMAT=aout installworld >13. quick, compile a new kernel About 11 steps too many for FreeBSD :-). Steps 2-8 break things in certain configurations that `make world' is supposed to handle. Steps 4-5 tend to _cause_ the ___error problem. Of course you can work around the breakage by doing fixup steps if you understand the makefiles. Bruce 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?199807100124.LAA19511>