Problems compiling GPC on NetBSD/sparc

Waldek Hebisch hebisch at
Thu Aug 29 18:47:33 CEST 2002

> Hi folks,
> I've been trying to compile GPC on my NetBSD/sparc 1.5.2 system.  
> Unfortunately it fails with a bunch of 'undefined reference' errors for
> calls to libc functions.
> Here are a few snips of the output from make.  If anyone could suggest a
> fix, I'd be very grateful.
> bash-2.05$  uname -a
> NetBSD helios 1.5.2 NetBSD 1.5.2 (GENERIC) #0: Wed Aug 22 04:33:09 CST
> 2001     toor at proxima:/usr/src/sys/arch/sparc/compile/GENERIC sparc
> bash-2.05$ make
> make all-recursive
> Making all in intl
> Making all in lib
> Making all in makeinfo
> gcc  -DIN_GCC -DHAIFA   -g -O2   -DHAVE_CONFIG_H  -o cccp cccp.o cexp.o
> intl.o prefix.o version.o  mbchar.o obstack.o
> ../libiberty/libiberty.a
> /usr/lib/crt0.o: In function `___start':
> /usr/lib/crt0.o(.text+0xf8): undefined reference to `main'
> cccp.o: In function `safe_read':
> /usr/tmp/gcc-2.95.2/gcc/cccp.c(.text+0x224): undefined reference to
> `_read'
Those look like standard underscore problem, some systems like all 
names with underscore prepended (a.out), other not (ELF). They have 
nothing to do with Pascal. 
I think (like other posters) that you just misconfigured GCC (or 
there is a bug in configure). 
You should first try to build GCC _without_ GPC. If nothing else 
helps, you should be able to find GCC build directory in system sources. 
Once GCC builds, you should have no problems with GPC.

                              Waldek Hebisch
hebisch at    or hebisch at 

More information about the Gpc mailing list