Subject: Re: /usr/src/build.sh failure on port-alpha
To: None <port-alpha@netbsd.org, current-users@netbsd.org>
From: Michael G. Schabert <mikeride@mac.com>
List: current-users
Date: 12/31/2001 14:34:23
At 6:30 PM -0800 12/30/01, Jason R Thorpe wrote:
>On Sun, Dec 30, 2001 at 05:50:32PM -0800, Paul Goyette wrote:
>
>  > (Host machine, i386 running 1.5ZA -current as of this morning.  Target
>  > is alpha.)
>
>  > /usr/src/lib/libc/gen/__glob13.c: In function `g_opendir':
>  > /usr/src/lib/libc/gen/__glob13.c:939: internal error--unrecognizable insn:
>  > (insn 24 22 26 (set (reg:DI 82)
>  >         (and:DI (plus:DI (reg:DI 75)
>  >                 (const_int 578552706319253504 [0x8076e9f00000000]))
>  >             (const_int -8 [0xfffffffffffffff8]))) -1 (insn_list 22 (nil))
>  >     (nil))
>  > *** Error code 1
>  >
>  >
>  > So, are we not quite ready for prime-time yet?
>
>There are some known problems cross compiling from i386 -> alpha (probably
>any non-LP64 -> alpha).

Heh, on this note...I just tried a build.sh again without success. 
This is compiling on Alpha, for Alpha. My /etc/mk.conf file is 
totally empty (I removed my update=yes entry). My sources were 
current as of Sunday at 3:30am. Here's a stripped "script" file:

=====
Script started on Sun Dec 30 19:32:58 2001
alpha# cd /usr/src


alpha# ./build.sh -O /usr/obj -D /usr/destdir


===> Bootstrapping nbmake

===> DESTDIR path: /usr/destdir

===> TOOLDIR path: /usr/obj/tools/tools.NetBSD-1.5ZA-alpha

Build started at: Sun Dec 30 19:35:15 EST 2001

cleandir ===> tools

... various cleandirs ...

cleandir ===> regress/usr.bin/sort

rm -f a.out [Ee]rrs mklog core *.core

obj ===> tools

... various objdirs ...

obj ===> regress/usr.bin/sort

(cd /usr/src/tools && 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmake  dependall)

dependall ===> mkdep

touch .depend

cc -O -Wall   -c -o mkdep.lo /usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c

/usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c: In function `main':

/usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c:121: warning: 
variable `aflag' might be clobbered by `longjmp' or `vfork'

/usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c:121: warning: 
variable `pflag' might be clobbered by `longjmp' or `vfork'

/usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c:123: warning: 
variable `filename' might be clobbered by `longjmp' or `vfork'

/usr/src/tools/mkdep/../../usr.bin/mkdep/mkdep.c:123: warning: 
variable `pathname' might be clobbered by `longjmp' or `vfork'

cc -O -Wall   -c -o setprogname.lo /usr/src/tools/mkdep/../compat/setprogname.c

cc -O -Wall     -o mkdep mkdep.lo setprogname.lo

install ===> mkdep

... dependall and installs ...

install ===> pwd_mkdb

mkdir -p /usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall -c  -r -m 555 
pwd_mkdb /usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbpwd_mkdb

(cd /usr/src/etc && 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmake 
DESTDIR=/usr/destdir distrib-dirs)

STRIP=/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-strip 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall  -d -o root -g 
wheel -m 755 /usr/destdir

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmtree -def 
mtree/NetBSD.dist -p /usr/destdir/ -U

rm -f /usr/destdir/sys

STRIP=/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-strip 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall  -l s -o root 
-g wheel -m 755  usr/src/sys /usr/destdir/sys

includes ===> include

includes ===> include/rpc

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbrpcgen -C -h 
/usr/src/include/rpc/rpcb_prot.x -o rpcb_prot.h

includes ===> sys

... more includes ...

includes ===> share/locale/ctype

(cd /usr/src/lib/csu && 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmake  dependall)

dependall ===> alpha

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-gcc -O2 
-fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow 
-Werror  -I- -I/usr/src/lib/csu/alpha -DLIBC_SCCS -DPIC -DDYNAMIC 
-DELFSIZE=64 -I/usr/src/lib/csu/alpha/../../../libexec/ld.elf_so 
-I/usr/src/lib/csu/alpha/../common_elf 
-I/usr/src/lib/csu/alpha/../../libc/dlfcn -DDWARF2_EH -nostdinc 
-isystem /usr/destdir/usr/include  -c -DCRT0 
/usr/src/lib/csu/alpha/crt0.c -o crt0.o

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-gcc -O2 
-fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow 
-Werror  -I- -I/usr/src/lib/csu/alpha -DLIBC_SCCS -DPIC -DDYNAMIC 
-DELFSIZE=64 -I/usr/src/lib/csu/alpha/../../../libexec/ld.elf_so 
-I/usr/src/lib/csu/alpha/../common_elf 
-I/usr/src/lib/csu/alpha/../../libc/dlfcn -DDWARF2_EH -nostdinc 
-isystem /usr/destdir/usr/include  -c -DMCRT0 
/usr/src/lib/csu/alpha/crt0.c -o gcrt0.o

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-gcc -O2 
-fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow 
-Werror  -I- -I/usr/src/lib/csu/alpha -DLIBC_SCCS -DPIC -DDYNAMIC 
-DELFSIZE=64 -I/usr/src/lib/csu/alpha/../../../libexec/ld.elf_so 
-I/usr/src/lib/csu/alpha/../common_elf 
-I/usr/src/lib/csu/alpha/../../libc/dlfcn -DDWARF2_EH -nostdinc 
-isystem /usr/destdir/usr/include  -c 
/usr/src/lib/csu/alpha/../common_elf/crtbegin.c -o crtbegin.o

/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-gcc -O2 
-fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wreturn-type -Wpointer-arith -Wswitch -Wshadow 
-Werror  -I- -I/usr/src/lib/csu/alpha -DLIBC_SCCS -DPIC -DDYNAMIC 
-DELFSIZE=64 -I/usr/src/lib/csu/alpha/../../../libexec/ld.elf_so 
-I/usr/src/lib/csu/alpha/../common_elf 
-I/usr/src/lib/csu/alpha/../../libc/dlfcn -DDWARF2_EH -nostdinc 
-isystem /usr/destdir/usr/include  -c 
/usr/src/lib/csu/alpha/../common_elf/crtend.c -o crtend.o

(cd /usr/src/lib/csu && 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmake  install)

install ===> alpha

... more dependalls & installs ...

install ===> csu

install ===> csu/alpha

STRIP=/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-strip 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall  -c  -r  -o 
root  -g wheel  -m 444  crt0.o /usr/destdir/usr/lib/crt0.o

STRIP=/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-strip 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall  -c  -r  -o 
root  -g wheel  -m 444  crtbegin.o /usr/destdir/usr/lib/crtbegin.o

STRIP=/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/alpha--netbsd-strip 
/usr/obj/tools/tools.NetBSD-1.5ZA-alpha/bin/nbinstall  -c  -r  -o 
root  -g wheel  -m 444  crtbeginS.o /usr/destdir/usr/lib/crtbeginS.o

nbinstall: crtbeginS.o: No such file or directory

*** Error code 1

Stop.

nbmake: stopped in /usr/src/lib/csu/alpha

*** Error code 1

22881.872u 4701.484s 11:22:59.25 67.3%	0+0k 37764+267711io 31569pf+147w

alpha#
=====


On a similar note, I just tried making a kernel, & ran into a bit of trouble:

=====
alpha# config prez

Don't forget to run "make depend"

alpha# cd ../compile/prez

alpha# make depend

depending the kern library objects

CC=cc /usr/src/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmkdep -a 
-D_LOCORE -I../../../../../../lib/libkern/arch/alpha -Dalpha 
-I../../. -I../../../../../../arch -I../../../../../.. -nostdinc 
-DDIAGNOSTIC -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT 
-traditional-cpp ../../../../../../lib/libkern/arch/alpha/_mcount.S 
../../../../../../lib/libkern/arch/alpha/byte_swap_2.S 
../../../../../../lib/libkern/arch/alpha/byte_swap_4.S 
../../../../../../lib/libkern/arch/alpha/bcopy.S 
../../../../../../lib/libkern/arch/alpha/bzero.S 
../../../../../../lib/libkern/arch/alpha/ffs.S 
../../../../../../lib/libkern/arch/alpha/memcpy.S 
../../../../../../lib/libkern/arch/alpha/memmove.S __divqu.S __divq.S 
__divlu.S __divl.S __remqu.S __remq.S __remlu.S __reml.S

/usr/src/tools/tools.NetBSD-1.5ZA-alpha/bin/nbmkdep: not found

*** Error code 127
=====

I think that I'm getting this because I had manually specified -O 
/usr/obj when I did my build.sh so my /etc/mk.conf file doesn't hold 
that info...but should a manual kernel build, from within 
/usr/src/sys/arch/alpha/ be using the new "bootstrap" toolchain? I 
was under the impression that that system was only for doing complete 
system builds. I would much rather that a kernel build use the 
standard, installed tools...especially since I haven't gotten these 
new tools to work at all yet. I don't want to have to explicitly 
specify not to use the new tools when doing a custom kernel build.


I commented my crontab "cvs" entries while doing my build.sh, so 
unless I hear from anyone by tonight, I'll uncomment it & update my 
source and try again tomorrow.


Thanks for any insight,
Mike
-- 
Bikers don't *DO* taglines.