Subject: Re: solaris cross-build fails
To: Andrew Brown <atatat@atatdot.net>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 07/23/2003 23:17:31
Thus spake Andrew Brown ("AB> ") sometime Tomorrow...

AB> 	# /bin/ksh ./build.sh -B Solaris -D $DESTDIR -M /netbsd/obj \
AB> 		-m sparc -R $RELEASEDIR -r -T $TOOLDIR tools
AB>
AB> and it ends (after seventeen minutes of slow compilation on this poor
AB> little sparc-like machine), with this:
AB>
AB> 	/usr/local/bin/gcc -O  -I. -I./include -I/netbsd/src/tools/compat \
AB> 		-DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64 -D_NETBSD_SOURCE \
AB> 		-D__DBINTERFACE_PRIVATE -c -o gettemp.lo.o \
AB> 		/netbsd/src/tools/compat/../../lib/libc/stdio/gettemp.c
AB> 	/netbsd/src/tools/compat/../../lib/libc/stdio/gettemp.c:62: \
AB> 		reentrant.h: No such file or directory
AB>
AB> wrapping added by me so that this is readable.  of course.
AB>
AB> anyone got any helpful hints?  reentrant.h is clearly in
AB> /netbsd/src/tools/compat/../../lib/libc/stdio, but the compiler is
AB> also clearly not looking there...

More problems:

Mine is a NetBSD-i386 -> NetBSD-sparc cross-build, and I can't use -O dir
on mine for some reason (maybe the automounts?), as it gives me wacked
out .depend files of type "data".  I must use -M dir.

I cannot build sparc, either.  It dies in various places, almost never
the same place -- or the same way.  Sometimes it faults, sometimes it can't
find something.

Here's my latest:

dependall ===> gnu/usr.bin/cvs/cvs
/usr/src/tools/tools-sparc/bin/sparc--netbsdelf-gcc   -o cvs -nostdlib  /export/
arch/sparc/build/usr/lib/crt0.o /export/arch/sparc/build/usr/lib/crti.o /export/
arch/sparc/build/usr/lib/crtbegin.o add.o admin.o annotate.o buffer.o checkin.o
checkout.o classify.o client.o commit.o create_adm.o cvsrc.o diff.o edit.o entri
es.o error.o expand_path.o fileattr.o filesubr.o find_names.o hardlink.o hash.o
history.o ignore.o import.o lock.o log.o login.o logmsg.o main.o mkmodules.o mod
ules.o myndbm.o no_diff.o parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.
o remove.o repos.o root.o run.o scramble.o server.o status.o subr.o tag.o update
.o vers_ts.o version.o watch.o wrapper.o zlib.o /export/arch/sparc/obj/.amd/rive
ndell/.../src/gnu/usr.bin/cvs/libdiff/libdiff.a /export/arch/sparc/obj/.amd/rive
ndell/.../src/gnu/usr.bin/cvs/libcvs/libcvs.a -lcrypt -lz -lkrb -ldes -lcom_err
-lroken -lcrypt -lgssapi -lkrb5 -ldes -lasn1 -lcom_err -lroken -lcrypt -L/export
/arch/sparc/build/usr/lib -L/export/arch/sparc/build/usr/lib  -lgcc -lc -lgcc /e
xport/arch/sparc/build/usr/lib/crtend.o /export/arch/sparc/build/usr/lib/crtn.o
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_write_f
ile'
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_add'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `SHA1_Init'
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_egd_byt
es'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `RC4_set_key
'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `SHA1_Update
'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `SHA1_Final'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `MD4_Update'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `RC4'
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_file_na
me'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `MD4_Final'
/export/arch/sparc/build/usr/lib/libgssapi.so: undefined reference to `MD5_Init'
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_status'
/export/arch/sparc/build/usr/lib/libgssapi.so: undefined reference to `MD5_Final
'
/export/arch/sparc/build/usr/lib/libkrb.so: undefined reference to `RAND_bytes'
/export/arch/sparc/build/usr/lib/libkrb5.so: undefined reference to `MD4_Init'
/export/arch/sparc/build/usr/lib/libgssapi.so: undefined reference to `MD5_Updat
e'
collect2: ld returned 1 exit status
*** Error code 1

Stop.
nbmake: stopped in /.amd/rivendell/.../src/gnu/usr.bin/cvs/cvs
*** Error code 1

[ Command is: build.sh \
	-T /usr/src/tools/tools-sparc \
	-M /export/arch/sparc/obj \
	-D /export/arch/sparc/build \
	-R /export/arch/sparc/release \
	-V BUILD='you bet' \
	-m sparc \
	-u -o build ]

[the -V BUILD=whatever sets things so that for a build, it does some
"normal" things such as MKCATPAGES=yes, MKLINT=yes and MKPROFILE=yes,
most of which I turn off when just building locally and not intending
to build a release.]

I did the '-u -o' in there because the objdirs already existed, and
I wanted to see how far it would get.  Last time it was building something
extraordinarily huge and (probably) due to a memory leak in make or
something, it took a SIGBUS on the build; this time, as you can see,
it got to someplace completely different.

				--*greywolf;
--
Microshaft:  Where do you want to crash today?