Subject: Re: Update on Can't startx
To: None <port-arm32@netbsd.org>
From: Adrian Ireland <aireland@mail.indigo.ie>
List: port-arm32
Date: 09/07/1998 18:44:38
In message <Pine.SOL.3.95q.980907103230.9775A-100000@red.csi.cam.ac.uk>
          David Forbes <dmf20@hermes.cam.ac.uk> wrote:

> > Investigating further, the simple hello world program will compile
> > and link fine provided I dont have a line like
> > #include "stdio.h"
> > in it.
> 
> Personally, I've always used #include <stdio.h>
> I don't know whether this should make loads of difference though.
> 
> > If I have that line the compiler barfs, gives a core dump and prints
> > a backtrace.
> 
> What does it say exactly?  (For the "Hello world" example)
Here is the offening c program

-- start of hello.c ---
#include <stdio.h>

int main(void)
{
  printf("Hello world!\n");

  return(1);
}
-- end of hello.c ---

I try to compile this with 
gcc hello.c
Data abort: 'Permission error (page)' status = 00f address = 00000010 PC = 000ef7f0
Process = f1595000 pid = 288 comm = cc1
CPSR=60000013 Traceback info (frame=f2a24fb8)
fp->lr=f011bf08 fp->pc=f0126d74
fp->lr=f011a304 fp->pc=f011b458
Trapframe PC = 000ef7f0
Trapframe SPSR = 60000010
Sep  7 09:52:29 unknown /netbsd: Data abort: 'Permission error (page)' status = 00f address = 00000010 PC = 000ef7f0
Sep  7 09:52:30 unknown /netbsd: Process = f1595000 pid = 288 comm = cc1
Sep  7 09:52:30 unknown /netbsd: CPSR=60000013 Traceback info (frame=f2a24fb8)
gcc: INternal complier error: program cc1 got fatal signal 11
Sep  7 09:52:30 unknown /netbsd: fp->lr=f011bf08 fp->pc=f0126d74
Sep  7 09:52:30 unknown /netbsd: fp->lr=f011a304 fp->pc=f011b458
Sep  7 09:52:30 unknown /netbsd: Trapframe PC = 000ef7f0
Sep  7 09:52:30 unknown /netbsd: Trapframe SPSR = 60000010

My kernel is the one from the netbsd site that says riscpc/gz
uname -a gives

NetBSD unknown.host.domain 1.3.2 NetBSD 1.3.2 (VOYAGER) #0: Sun May 24 20:14:46 BST 1998     root@ebsa:/home/cyclone/netbsd-1.3.2/src/sys/arch/arm32/compile/VOYAGER arm32
-r--r--r--  1 bin  bin  12541 May 14 23:57 /usr/include/stdio.h

(some of) set gives 

cdpath	(/sys /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin /usr/src/lib /usr/src/libexec /usr/src/share /usr/src/contrib /usr/src/local /usr/src/games /usr/src/old /usr/src/gnu/usr.bin /usr/src/gnu/libexec /usr/src/gnu/lib /usr/src/gnu/games)
path	(/sbin /usr/sbin /usr/local/sbin /bin /usr/bin /usr/local/bin /usr/libexec /usr/X11R6.3/bin /usr/X11R6.3/lib)
shell	/bin/csh

Of interest gcc -E (Preprocess only) does not crash and the first two lines printed are

# 1 "hello.c"
# 1 "/usr/include/stdio.h" 1 3

gcc -S (Preprocess and assemble) starts up creates the file hello.s (which is empty) and crashes with the above error.

ll hello.* gives
-rw-r--r--  1 root  wheel  81 Sep  6 09:07 hello.c
-rw-r--r--  1 root  wheel   0 Sep  7 10:08 hello.s

gcc is in /usr/bin
-r-xr-xr-x  2 bin  bin  57344 May 19 19:03 /usr/bin/gcc
and cc1 is in /usr/libexec
-r-xr-xr-x  1 bin  bin  1470464 May 19 19:03 /usr/libexec/cc1

Dont know where that other (2) link to gcc is.


> 
> HTH,
> David.

I think if I can sort this include problem out it may help me
get X running (optimism).


Adrian
-- 
Adrian Ireland mailto:aireland@indigo.ie http://indigo.ie/~aireland/
Never lick a gift horse in the mouth.