Subject: bin/23210: usr.bin/make/util.c needs asprintf
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dmcmahill@netbsd.org>
List: netbsd-bugs
Date: 10/20/2003 18:32:58
>Number:         23210
>Category:       bin
>Synopsis:       usr.bin/make/util.c needs asprintf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 20 22:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dan McMahill
>Release:        NetBSD 20031020
>Organization:
NetBSD
>Environment:
	
	
System: NetBSD bondage 1.6.1 NetBSD 1.6.1 (BONDAGE) #0: Mon Apr 21 18:28:45 EDT 2003 dan@bondage:/export/disk1/src/src-netbsd-1-6-1/sys/arch/alpha/compile/BONDAGE alpha
Architecture: alpha
Machine: alpha
>Description:

Rev 1.81 from 2003/09/27 of usr.bin/make/var.c introduces the use of asprintf() to make.
There should be an autoconf check in src/tools/make/configure.ac as well as a portable
asprintf() implementation in usr.bin/make/util.c to allow cross building from systems
which do not have asprintf() such as solaris 2.6 with gcc-2.95.1.

	
>How-To-Repeat:

on solaris 2.6 with gcc-2.95.1 do:

env HOST_CC=gcc ./build.sh -m sparc64 \
    -T /export/home1/software/build/tools \
    -D /export/home1/software/build/destdir.sparc64 \
    -R /export/home1/software/build/release/sparc64 release

and watch the nbmake bootstrap fail.

	
>Fix:

add a portable asprintf().  I tried just pasting in the one from libc, but
it didn't work.  I didn't have time to figure out why.  Pasting in a portable
asprintf() that had a GPL license (which is why I didn't send that patch in)
got the nbmake build to go.
	
>Release-Note:
>Audit-Trail:
>Unformatted: