The following bug has been logged online:
Bug reference: 6073
Logged by: Hartmut "Hardy" Raschick
Email address: hartmut.raschick@keymile.com
PostgreSQL version: 9.1beta2
Operating system: Solaris
Description: VPATH build fails in src/backend/replication for src
tarball, repl_scanner.c not found
Details:
WHAT:
postgresql-9.1beta2.tar.bz
WHERE:
SunOS 5.9 Generic_122300-46 sun4u sparc SUNW,Sun-Fire-V440
GNU Make 3.80
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
HOW:
cd /tmp
tar xvjf postgresql-9.1beta2.tar.bz
cd postgresql-9.1beta2
mkdir build
cd build
../configure ...
make
/opt/studio12/SUNWspro/bin/cc -Xa -v -O -I../../../src/include
-I/tmp/postgresql-9.1beta2/build/../src/include -c -o repl_gram.o
/tmp/postgresql-9.1beta2/build/../src/backend/replication/repl_gram.c
"repl_gram.y", line 106: warning: enum type mismatch: op "="
"repl_gram.y", line 116: warning: enum type mismatch: op "="
"repl_gram.y", line 161: warning: enum type mismatch: op "="
"repl_gram.y", line 169: cannot find include file: "repl_scanner.c"
cc: acomp failed for
/tmp/postgresql-9.1beta2/build/../src/backend/replication/repl_gram.c
gmake: *** [repl_gram.o] Error 2
FIX:
adding
CFLAGS += -I$(top_srcdir)/src/backend/replication
say, between lines 13 and 15 in
src/backend/replication/Makefile
fixes this for me; this is surely not the "proper" fix though (seeing flex
build and all...).
NOTE:
"CFLAGS += -I." does not help, as this again is eval'd as the build dir (we
want src)
NOTE2:
Sun's (make that Oracle's) CC apparently does not, as gcc does, implicitly
add the current src dir (as seen from -c e.g.) to the list of include
dirs...