tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

debugging early failure of build.sh (in rebuilding nbmake)




I'm trying a crossbuild of NetBSD-current/amd64 on a NetBSD 6.0/i386 host, and get:

        ...
        ===> Bootstrapping nbmake
        checking for sh... /bin/sh
        checking for gcc... cc
        checking for C compiler default output... configure: error: C compiler  
cannot create executables
        ERROR: Configure of nbmake failed
        *** BUILD ABORTED ***

Not very useful. Digging and chopping to get at config.log (and ignoring what the error for this was, for a second), I wonder if we should print the nbmake configure's config.log if we detect an error.

The patch below does this for me. Any comments?


 - Hubert


Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.260
diff -u -r1.260 build.sh
--- build.sh    2 Dec 2012 19:19:36 -0000       1.260
+++ build.sh    13 Jan 2013 00:15:07 -0000
@@ -1454,7 +1454,9 @@
${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \
                        ${HOST_SH} "${TOP}/tools/make/configure" ||
-                   bomb "Configure of ${toolprefix}make failed"
+                   ( echo Contents of ${tmpdir}/config.log: ;
+                     cat ${tmpdir}/config.log ;
+                     bomb "Configure of ${toolprefix}make failed" )
                ${runcmd} ${HOST_SH} buildmake.sh ||
                    bomb "Build of ${toolprefix}make failed"
                make="${tmpdir}/${toolprefix}make"


Home | Main Index | Thread Index | Old Index