Subject: Re: PostgreSQL compiling problem
To: Matej 'Kockac' Kubik <kockac@aimant.sk>
From: Brian Chase <vaxzilla@jarai.org>
List: port-vax
Date: 03/14/2003 13:42:25
On Fri, 14 Mar 2003, Matej 'Kockac' Kubik wrote:

> Hello,
> I tried to compile PostgreSQL from (yesterday's) pkgsrc on my VAXStation
> (NetBSD 1.6.1_RC1 (MINICC) #1: Wed Feb 12 11:58:32 CET 2003), but it failed
> with following message:
>
> [make output stripped]
>
> cc -O2 -I/usr/pkg/include -Wall -Wmissing-prototypes -Wmissing-declarations -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/pkg/lib -Wl,-E access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lssl -lcrypto -lcrypt -lresolv -lcompat -lm -lutil  -o postgres
> access/SUBSYS.o: In function `XLogInsert':
> access/SUBSYS.o(.text+0x17688): undefined reference to `r0'
> access/SUBSYS.o(.text+0x17692): undefined reference to `r0'
> access/SUBSYS.o(.text+0x17698): undefined reference to `r0'
> access/SUBSYS.o(.text+0x17c49): undefined reference to `r0'
> access/SUBSYS.o(.text+0x17c53): undefined reference to `r0'
> access/SUBSYS.o(.text+0x17c59): more undefined references to `r0' follow
> gmake: *** [postgres] Error 1
>
> [make output stripped]
>
> I suppose the problem is in src/include/storage/s_lock.h (starting from
> line containing "defined(NEED_VAX_TAS_ASM)"), but I don't know the assembler
> syntax, so I can't tell.

Not too long ago, there was a change in the gas assembler syntax for the
VAX platform.  In the past, you'd use the names like: r0, r1, r2, ...,
r12, sp, fp, and ap, for the various VAX registers.  The newer syntax
prefixes those names with "%", so you'd have: %r0, %r1, ..., etc.  My
guess, without actually looking at the source, is that you can fix this
by prefixing the register names in the affected source files with "%".

-brian.