Subject: toolchain/23067: several build problems under src/gnu
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pr200310@veego.de>
List: netbsd-bugs
Date: 10/05/2003 21:42:46
>Number:         23067
>Category:       toolchain
>Synopsis:       several build problems under src/gnu
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 05 19:43:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Ernesti
>Release:        NetBSD 1.6ZC
>Organization:
	
>Environment:
	
	
System: NetBSD arresum.veego.de 1.6ZC NetBSD 1.6ZC (ARRESUM) #690: Sun Oct 5 09:29:45 CEST 2003 bernd@arresum.veego.de:/usr/obj/src.i386/sys/arch/i386/compile/ARRESUM i386
Architecture: i386
Machine: i386
>Description:
	There are a few build problems in src/gnu.

	1. The build in src/gnu/lib/libsupc++ fails:

mkdep -f del_op.d       -nostdinc++ -I/src/gnu/dist/gcc/gcc -I/src/gnu/dist/gcc/include -I/src/gnu/dist/gcc/libstdc++-v3/libsupc++ -I/src/gnu/lib/libsupc++/../libstdc++-v3/arch/i386 -DHAVE_STDLIB_H -DHAVE_STRING_H     /src/gnu/dist/gcc/libstdc++-v3/libsupc++/del_op.cc
In file included from /src/gnu/dist/gcc/libstdc++-v3/libsupc++/del_op.cc:31:
/src/gnu/dist/gcc/libstdc++-v3/libsupc++/new:41:19: cstddef: No such file or directory

	2. src/gnu/usr.bin/groff/tmac tries to install files in $(DESTDIR) while
	   doing a make dependall:

install  -N /src/etc -c  -r  -o root  -g wheel  -m 444   /src/gnu/dist/groff/tmac/andoc.tmac /usr/share/tmac/andoc.tmac
install: /usr/share/tmac/inst.01307a: mkstemp: Permission denied

	3. to workaround problem 2. i did a make depend in src/gnu/usr.bin
	   and it failed in gcc3/backend:

depend ===> gcc3
depend ===> gcc3/host-libiberty
depend ===> gcc3/libiberty
[..]
depend ===> gcc3/backend
rm -rf .ab &&  mkdir .ab &&  (cd .ab &&  /bin/sh /src/gnu/dist/gcc/gcc/configure  --build=`/src/gnu/usr.bin/gcc3/backend/../../../dist/gcc/config.guess`  --host=`/src/gnu/usr.bin/gcc3/backend/../../../dist/gcc/config.guess`  --target=i386--netbsdelf &&  mv auto-host.h ../auto-build.h) &&  rm -rf .ab
creating cache ./config.cache
[..]
cc -O -I. -I/src/gnu/usr.bin/gcc3/backend/../arch/i386 -DIN_GCC -DHAVE_CONFIG_H -I/src/gnu/dist/gcc/gcc -I/src/gnu/dist/gcc/gcc/. -I/src/gnu/dist/gcc/gcc/config -I/src/gnu/dist/gcc/gcc/../include -I/src/gnu/usr.bin/gcc3/backend/.. -c /src/gnu/dist/gcc/gcc/gengenrtl.c
cc -O -I. -I/src/gnu/usr.bin/gcc3/backend/../arch/i386 -DIN_GCC -DHAVE_CONFIG_H -I/src/gnu/dist/gcc/gcc -I/src/gnu/dist/gcc/gcc/. -I/src/gnu/dist/gcc/gcc/config -I/src/gnu/dist/gcc/gcc/../include -I/src/gnu/usr.bin/gcc3/backend/..  -o gengenrtl gengenrtl.o  /src/gnu/usr.bin/gcc3/host-libiberty/obj.i386/libiberty/libiberty.a
cc: /src/gnu/usr.bin/gcc3/host-libiberty/obj.i386/libiberty/libiberty.a: No such file or directory
*** Error code 1

>How-To-Repeat:
	See above how to repeat it. You also have to not use the build.sh script.
>Fix:
	1. But I don't know if that cause a side effect, at least it builds now:

Index: Makefile.common
===================================================================
RCS file: /cvsroot/src/gnu/lib/libsupc++/Makefile.common,v
retrieving revision 1.2
diff -c -r1.2 Makefile.common
*** Makefile.common	1 Aug 2003 13:55:43 -0000	1.2
--- Makefile.common	5 Oct 2003 19:34:02 -0000
***************
*** 7,13 ****
  LIBSTDCXXSRCS=	${G_SRC_SOURCES}
  LIBSUPCXXSRCS=	${G_LIBSUPCXX_SOURCES} ${G_LIBSUPCXX_C_SOURCES}
  
- CPPFLAGS+=	-nostdinc++
  CPPFLAGS+=	-I${DIST}/gcc
  CPPFLAGS+=	-I${DIST}/include
  CPPFLAGS+=	-I${DIST}/libstdc++-v3/libsupc++
--- 7,12 ----

	2. Maybe work with a tmp file in objdir and install it only in the
	   install stage

	3. Add a ${HOSTLIBIBERTY} target which builds the host libiberty for the
	   dependencies ?

>Release-Note:
>Audit-Trail:
>Unformatted: