lang/gcc6-aux build error due to internal Makefile/sh syntax: $${PWDCMD-pwd} is missing a ":"

Mark Millard markmi at dsl-only.net
Mon Apr 10 19:12:08 UTC 2017


Context (on a BPI-M3 arm64 board):

# svnlite info /usr/ports/ | grep "Re[plv]"
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 438141
Last Changed Rev: 438141


I was trying to build synth on an arm64 (BPI-M3) and it in turn tried
to build gcc6-aux. That failed with:

checking for autoheader... no
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.intl
config.status: creating config.h
config.status: executing default-1 commands
gmake[3]: Leaving directory '/usr/obj/portswork/usr/ports/lang/gcc6-aux/work/build'
gmake[2]: *** [Makefile:875: all] Error 2
gmake[2]: Leaving directory '/usr/obj/portswork/usr/ports/lang/gcc6-aux/work/build'
*** Error code 2

Looking around in:

/usr/obj/portswork/usr/ports/lang/gcc6-aux/work/build/Makefile

shows. . .

SHELL = /bin/sh

# pwd command to use.  Allow user to override default by setting PWDCMD in
# the environment to account for automounters.  The make variable must not
# be called PWDCMD, otherwise the value set here is passed to make
# subprocesses and overrides the setting from the user's environment.
# Don't use PWD since it is a common shell environment variable and we
# don't want to corrupt it.
PWD_COMMAND = $${PWDCMD-pwd}

. . .

# The target built for a native non-bootstrap build.
.PHONY: all
all:
        @: $(MAKE); $(unstage)
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
        && :



with line 875 being the one with: @r=`${PWD_COMMAND}`

It appears to me that the notation $${PWDCMD-pwd} is not
what was intended. My guess is that a ":" is missing:

PWD_COMMAND = $${PWDCMD:-pwd}

(/bin/sh notation to avoid an empty PWDCMD by then using pwd).


NOTE on arm64 and fork() behavior:

head (12) has received 2 fixes to arm64 fork behavior in recent times:

-r316679
-r313772

stable/11 is supposed to get an MFC for -r316679 in a couple
of weeks.

-r313772 was from February and has yet to be MFC'd but is needed.
No explicit MFC schedule has been set.


===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-ports mailing list