Subject: pkg/30419: can't build devel/gmake
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <apb@cequrux.com>
List: pkgsrc-bugs
Date: 06/03/2005 20:12:00
>Number:         30419
>Category:       pkg
>Synopsis:       can't build devel/gmake
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 03 20:12:00 +0000 2005
>Originator:     Alan Barrett
>Release:        NetBSD 3.99.5
>Organization:
Not much
>Environment:
NetBSD/i386 3.995 (-current as of a few days ago)
pkgsrc -current as of a few days ago
>Description:
Attempting to build pkgsrc/devel/gmake fails
>How-To-Repeat:
Attempt to use pkg_comp to build devel/gmake.

# pkg_comp -c foo build devel/gmake

It fails with the following messages:

===> do-fetch [gmake-3.80nb4] ===> Checking for vulnerabilities in
gmake-3.80nb4
===> tools-message [gmake-3.80nb4] ===> Overriding tools for gmake-3.80nb4
ln: ./make: Read-only file system
*** Error code 1

Some investigation with PKG_DEBUG_LEVEL=2 shows that the failed command
was

	/bin/ln -fs /pkg_comp/obj/pkgsrc/devel/gmake/foo/.tools/bin/make

Some poking around in *.mk files shows that the failed command
came from these lines in pkgsrc/mk/tools/bsd.tools.mk:

        *)                                                              \
                ${LN} -fs ${TOOLS_REAL_CMD.${_t_}:Q} ${.TARGET:Q};      \
                ;;                                                      \

A little more investigation shows that TOOLS_REAL_CMD.make is blank:

pkg_comp:foo.conf# make -V 'TOOLS_REAL_CMD.make'
${MAKE_PROGRAM}
pkg_comp:foo.conf# make -V 'MAKE_PROGRAM'
${GMAKE}
pkg_comp:foo.conf# make -V 'GMAKE'

GMAKE is undefined, or perhaps it's defined but empty.

>Fix:
Unknown.  I suspect that pkgsrc/mk/tools/make.mk
should have set TOOLS_REAL_CMD.make=${MAKE}
(which would in turn expand to /usr/bin/make),
but that didn't happen.