Subject: toolchain/23236: tools/compat fails to build on solaris
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dmcmahill@netbsd.org>
List: netbsd-bugs
Date: 10/22/2003 19:37:42
>Number:         23236
>Category:       toolchain
>Synopsis:       tools/compat fails to build on solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 22 23:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dan McMahill
>Release:        NetBSD 20031020
>Organization:
NetBSD
>Environment:
solaris-2.6/sparc with gcc-2.95.1
	
	
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:

when trying to crossbuild netbsd from solaris-2.6/sparc with gcc-2.95.1 using
build.sh, tools/compat fails while trying to build the cross toolchain.

The failure is:

#   compile  gettemp.lo
gcc -O  -I. -I./include -I/export/home1/software/NetBSD/src-netbsd-current/tools/compat -DHAVE_CONFIG_
H  -D_FILE_OFFSET_BITS=64 -D_NETBSD_SOURCE -D__DBINTERFACE_PRIVATE -c -o gettemp.lo.o /export/home1/so
ftware/NetBSD/src-netbsd-current/tools/compat/../../lib/libc/stdio/gettemp.c
/export/home1/software/NetBSD/src-netbsd-current/tools/compat/../../lib/libc/stdio/gettemp.c:58: reent
rant.h: No such file or directory

	
>How-To-Repeat:

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

	
>Fix:
It appears that simply adding reentrant.h to tools/compat/configure.ac and
regenerating configure fixes it:


Index: tools/compat/configure
===================================================================
RCS file: /cvsroot/src/tools/compat/configure,v
retrieving revision 1.41
diff -u -2 -r1.41 configure
--- tools/compat/configure	2003/07/26 20:23:59	1.41
+++ tools/compat/configure	2003/10/22 11:51:31
@@ -3697,5 +3697,5 @@
 
 for ac_header in machine/bswap.h sys/cdefs.h sys/endian.h sys/featuretest.h \
-	err.h inttypes.h libgen.h paths.h stdint.h util.h
+	err.h inttypes.h libgen.h paths.h stdint.h util.h reentrant.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Index: tools/compat/configure.ac
===================================================================
RCS file: /cvsroot/src/tools/compat/configure.ac,v
retrieving revision 1.40
diff -u -2 -r1.40 configure.ac
--- tools/compat/configure.ac	2003/07/26 20:24:00	1.40
+++ tools/compat/configure.ac	2003/10/22 11:51:32
@@ -40,5 +40,5 @@
 	features.h malloc.h poll.h stddef.h)
 AC_CHECK_HEADERS(machine/bswap.h sys/cdefs.h sys/endian.h sys/featuretest.h \
-	err.h inttypes.h libgen.h paths.h stdint.h util.h,,
+	err.h inttypes.h libgen.h paths.h stdint.h util.h reentrant.h,,
 	[test -f include/$ac_header || touch include/$ac_header])
 AC_CHECK_HEADERS(rpc/types.h getopt.h netconfig.h,,
	
>Release-Note:
>Audit-Trail:
>Unformatted: