Page MenuHomeFreeBSD

Attempt to unbreak bmake bootstrap on Linux
Needs ReviewPublic

Authored by arichardson on Mon, Nov 16, 11:33 AM.

Details

Reviewers
sjg
Summary

The ksh test fails if ksh is not installed, but appears to pass just fine if I
use /bin/sh as a fallback path.

The gmake test fails like this, not sure what's going wrong there

--- /local/scratch/alr48/cheri/freebsd/contrib/bmake/unit-tests/directive-export-gmake.exp	2020-11-11 12:32:25.266223155 +0000
+++ directive-export-gmake.out	2020-11-16 11:23:31.789318202 +0000
@@ -1 +1,3 @@
+make: "" returned non-zero status
+make: "" returned non-zero status
 exit status 0
Failed tests: directive-export-gmake
*** Error code 1
Stop.
bmake[1]: stopped in /local/scratch/alr48/cheri/freebsd/contrib/bmake/unit-tests

Possibly caused by dash being more strict on the values that can be used for environment variable names.

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 34821
Build 31856: arc lint + arc unit

Event Timeline

arichardson created this revision.

GitHub's CI shows me that this has been broken since https://github.com/freebsd/freebsd/commit/75b18a5d5f4a8355e59917a640f80db350e178d3

I could also not run the tests when bootstrapping bmake, but there is currently no option for that and I'd have to manually replicate boot-strap inside make.py.

The ksh issue is already fixed in bmake-20201114
can you try http://www.crufty.net:/ftp/pub/sjg/beta/bmake-20201114.tar.gz to confirm the other issue is also fixed

In D27234#608288, @sjg wrote:

The ksh issue is already fixed in bmake-20201114
can you try http://www.crufty.net:/ftp/pub/sjg/beta/bmake-20201114.tar.gz to confirm the other issue is also fixed

I just tried that archive on an Ubuntu 18.04 machine and get the following errors:

--- /local/scratch/alr48/tmp/bmake/unit-tests/directive-export-gmake.exp	2020-10-02 23:40:20.000000000 +0100
+++ directive-export-gmake.out	2020-11-17 11:10:25.612611154 +0000
@@ -1 +1,3 @@
+make: "" returned non-zero status
+make: "" returned non-zero status
 exit status 0
--- /local/scratch/alr48/tmp/bmake/unit-tests/var-op-shell.exp	2020-11-11 23:09:00.000000000 +0000
+++ var-op-shell.out	2020-11-17 11:10:40.906017242 +0000
@@ -1,7 +1,7 @@
 make: "var-op-shell.mk" line 28: warning: "echo "failed"; false" returned non-zero status
 make: "var-op-shell.mk" line 34: warning: "false" returned non-zero status
 make: "var-op-shell.mk" line 59: warning: "kill -14 $$" exited on a signal
-/bin/no/such/command: not found
+1: /bin/no/such/command: not found
 make: "var-op-shell.mk" line 65: warning: "/bin/no/such/command" returned non-zero status
 stderr
 exit status 0
Failed tests: directive-export-gmake var-op-shell
*** Error code 1

Stop.
bmake[1]: stopped in /local/scratch/alr48/tmp/bmake/unit-tests
*** Error code 1

Stop.
bmake: stopped in /local/scratch/alr48/tmp/bmake

Also would it be possible to include the missing/sys/cdefs.h file in the next import so that it can build on Linux? This would allow me to remove some hacks from the bootstrap make.py script.

The failures can almost be worked around by using --with-defshell=/bin/bash, so another option would be to configure with bash as the default shell on ubuntu and relax the vardebug test:

--- /local/scratch/alr48/tmp/bmake/unit-tests/vardebug.exp	2020-10-31 22:57:02.000000000 +0000
+++ vardebug.out	2020-11-17 11:19:20.201759664 +0000
@@ -77,7 +77,7 @@
 Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES
 make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED})
 Global:delete .SHELL (not found)
-Command:.SHELL = /bin/sh
+Command:.SHELL = /bin/bash
 Command:.SHELL = overwritten ignored (read-only)
 Global:.MAKEFLAGS =  -r -k -d v -d
 Global:.MAKEFLAGS =  -r -k -d v -d 0
Failed tests: vardebug
*** Error code 1

Stop.
bmake[1]: stopped in /local/scratch/alr48/tmp/bmake/unit-tests
*** Error code 1

Stop.
bmake: stopped in /local/scratch/alr48/tmp/bmake