Update: crossbuilding under older 4.x FreeBSD

Matthew Dillon dillon at apollo.backplane.com
Fri Aug 27 16:20:21 PDT 2004

    This can't be it.  The osreldate.h-in-the-source-tree issue
    usually means that a build was done without the proper
    object environment being created.  Stale files in the 
    source tree can cause the buildworld to get confused.  If we
    are actually missing part of the object hierarchy here we
    need to fix that rather then hack around the modules where
    the error occurs.

    Try a completely fresh source tree checked out from cvs and
    run a from-scratch buildworld (without -j either), and if it
    still fails put the output somewhere where I can fetch it (don't
    post it, it's going to be too big).

    rm -rf /usr/obj; mkdir /usr/obj
    rm -rf /usr/src
    cd /usr
    cvs -d blah checkout src
    cd /usr/src
    make buildworld >& /tmp/bw.out

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

:[don't reply to me yet -- keep replies on the list for now]
:Hm...  This isn't particularly useful, but I thought I'd send
:an update.
:If you remember, I'm crossbuilding DFly on an older FreeBSD-4
:system, which has conflicting or missing includes files needed
:for the DFly build.  I previously revealed my hack to work around
:that, which was little more than a hack, and indeed, later I
:noted problems this hack had not addressed when creating an
:includes directory to be used during the build.
:The specific problem was that certain includes would try to
:write into my source.  So my latest workaround was to abuse
:the BOOTSTRAPPING define in order to skip those particular
:includes, rather than try to get them in the right place.
:With this, I can now build without problems and a read-only
:source.  Whee.  Also, this probably avoids the osreldate.h
:conflicts that may have caused problems (note that I don't
:know enough about the build process to be accused of anything).
:This is *not* a useful patch, except for me.  The latest
:FreeBSD seems to build a legacy step where such includes
:would be handled.  I still haven't tried a non-fast `includes'
:build to see if it works better for the few out-of-date/missing
:includes files in my crossbuild.
:--- /dist/src/DragonFly-src/source-hacks/include/Makefile-UNHACKED	Mon Aug 23 18:33:02 2004
:+++ /dist/src/DragonFly-src/source-hacks/include/Makefile	Mon Aug 23 21:04:34 2004
:@@ -8,7 +8,11 @@
: # links.
: CLEANFILES= osreldate.h version vers.c
:+###  HACK  the following try to be put in the source hierarchy, so skip
:+###        until I have a more vague idea what I'm trying to do
:+.if !defined(BOOTSTRAPPING)
: SUBDIR= arpa protocols rpc rpcsvc
: INCS=	a.out.h ar.h assert.h bitstring.h complex.h cpio.h ctype.h db.h \
: 	dirent.h disktab.h \
: 	dlfcn.h elf.h elf-hints.h err.h fnmatch.h fstab.h \
:@@ -85,7 +89,11 @@
: #SHARED=	symlinks
: SHARED?=	copies
:+#### HACK  don't build this (builds in source directory) when populating
:+####       an includes tree for crossbuilds, for what it's worth
:+.if !defined(BOOTSTRAPPING)
: INCS+=	osreldate.h
: osreldate.h:	${.CURDIR}/../sys/conf/newvers.sh \
: 		${.CURDIR}/../sys/sys/param.h
:As a result of this, what I now do in my _crossincludes target
:(seen in a previous mail) is thus:
:+       cd ${.CURDIR}/include; ${BMAKEENV} ${MAKE}  -DBOOTSTRAPPING installincludes
:Apart from the out-of-date/missing includes problem, I need no
:other patches to get my 4.5? or .7? -ish FreeBSD world to build
:the latest DragonFly.
:barry bouwsma

More information about the Submit mailing list