Subject: Bootstrap failing on FreeBSD 6.0
To: None <tech-pkg@netbsd.org>
From: Peter Schuller <peter.schuller@infidyne.com>
List: tech-pkg
Date: 02/11/2006 08:36:54
Hello,

the bootstrap is failing for me on FreeBSD 6.0. The problem seems to be that 
during the bmake self-test, FreeBSD's native make is somehow invoked. However 
I am unable to reproduce the behavior when I run the tests manually.

The bootstrap script fails like this:

CC="gcc" LIBC= MAKEFLAGS= 
MAKESYSPATH=`pwd`/mk:mk:/usr/pkg/share/mk:/usr/share/mk:/usr/local/share/mk:/opt/share/mk 
`pwd`/bmake -f Makefile test
cd /usr/pkgsrc/bootstrap/work/bmake/FreeBSD/unit-tests 
&& /usr/pkgsrc/bootstrap/work/bmake/FreeBSD/bmake 
TEST_MAKE=/usr/pkgsrc/bootstrap/work/bmake/FreeBSD/bmake test
/usr/pkgsrc/bootstrap/work/bmake/FreeBSD/bmake -f Makefile > test.out 2>&1
diff -u /usr/pkgsrc/bootstrap/work/bmake/unit-tests/test.exp test.out
--- /usr/pkgsrc/bootstrap/work/bmake/unit-tests/test.exp        Sat Feb 11 
08:28:59 2006
+++ test.out    Sat Feb 11 08:29:39 2006

Followed by a long diff because the test output contains nothing like the 
expected output, but instead contains:

make: don't know how to make dirsyntax(continuing)
`.WARN' not remade because of errors.
make: "cond1" line 75: warning: extra else
make: "cond1" line 85: warning: extra else
make: don't know how to make dirsyntax(continuing)
`.WARN' not remade because of errors.
make: don't know how to make dirsyntax(continuing)
`.WARN' not remade because of errors.

(continues for a while)

The reason I believe the wrong make is being picked up is because the error 
says "make: ..." rather than "bmake: ...". Also, the string "dirsyntax" does 
not appear in any file in pkgsrc/bootstrap/work, nor in the resulting bmake 
binary being tested. It does however appear in /usr/bin/make.

If I manually run:

cd /usr/pkgsrc/bootstrap/work/bmake/FreeBSD/unit-tests 
&& /usr/pkgsrc/bootstrap/work/bmake/FreeBSD/bmake 
TEST_MAKE=/usr/pkgsrc/bootstrap/work/bmake/FreeBSD/bmake test

It completes successfully, and "test.out" contains the correct information.

The actual make instance that is failing (bmake -f Makefile) seems to do 
nothing but invoke the subtests using ${.MAKE} -f SUBTEST. I don't know if 
${.MAKE} is for whatever reason set incorrectly or if something else is 
happening...

Anyone else seen this or may have suggestions as to why the wrong make seems 
to be picked up? Or what might affect bmake's environment like this?

Thank you,

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org