SOLVED truenas/core-build `make release` fails on malformed conditional (${.SHELL:T} == "ksh")

brandon.arnold

Dabbler
Joined
Aug 6, 2022
Messages
11
I'm building TrueNAS CORE according to the procedure in truenas/core-build. I have the same results whether I build within a FreeBSD 12.3 VM or the TrueNAS clone jail.

The `make release` step errors out with the output below. Looking at the log at `/usr/build/freenas/_BE/objs/logs/buildworld`, I believe the error is `Malformed conditional (${.SHELL:T} == "ksh")`. It seems to correspond with this line of a Makefile in truenas/os.

What's going on?

Output from `make release`:
Code:
root@truenasbuild:/usr/build # make release
[0:00:00] ==> NOTICE: Selected profile: freenas
[0:00:00] ==> NOTICE: Build timestamp: 202208070644
[0:00:00] ==> Checking build environment...
[0:00:00] ==> Build environment is OK
[0:00:00] ==> Sandbox is fully checked out
Doing executing target release on host: truenasbuild
Build directory: /usr/build
[0:00:01] ==> Building world from /usr/build/freenas/_BE/os
[0:00:01] ==> Log file: /usr/build/freenas/_BE/objs/logs/buildworld
[0:00:23] ==> Failed command: env -u DEBUG -u MAKEFLAGS MAKEOBJDIRPREFIX=/usr/build/freenas/_BE/objs make -j 5 -C /usr/build/freenas/_BE/os __MAKE_CONF=/usr/build/freenas/_BE/objs/make-build.conf NOCLEAN=YES buildworld
[0:00:23] ==> Returned value: 2
[0:00:23] ==> ERROR: Build failed
*** Error code 1

Stop.
make[2]: stopped in /usr/build
*** Error code 1

Stop.
make[1]: stopped in /usr/build
*** Error code 1

Stop.
make: stopped in /usr/build
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Is your build environment running ksh?
 

brandon.arnold

Dabbler
Joined
Aug 6, 2022
Messages
11
Thanks for chiming in, @Samuel Tai . No, it was not. I just installed ksh93 package and made a symlink to it, to see if that changes anything. It does not. Even started the build from within ksh shell, no difference. Probably the error is correct and literally that line checking for ksh shell is malformed?
 
Top