building pg_dump doesn't work - Mailing list pgsql-hackers

From Alvaro Herrera
Subject building pg_dump doesn't work
Date
Msg-id 20090303194228.GC4482@alvh.no-ip.org
Whole thread Raw
Responses Re: building pg_dump doesn't work  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Hi,

I noticed that if you start from a clean tree, it doesn't work to build
pg_dump because gram.h has not been generated yet:

make -C ../../../src/backend/parser keywords.o
make[1]: Entering directory `/home/alvherre/Code/CVS/pgsql/build/00head/src/backend/parser'
gcc -O0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv-g -I/pgsql/source/00head/src/backend/parser -I../../../src/include -I/pgsql/source/00head/src/include
-D_GNU_SOURCE-I/usr/include/libxml2   -c -o keywords.o /pgsql/source/00head/src/backend/parser/keywords.c -MMD -MP -MF
.deps/keywords.Po
/pgsql/source/00head/src/backend/parser/keywords.c:33:25: error: parser/gram.h: No such file or directory
/pgsql/source/00head/src/backend/parser/keywords.c:46: error: 'ABORT_P' undeclared here (not in a function)

I notice that there's a line in backend/parser that makes keywords.o
depend on gram.h, but apparently it doesn't work:

# Force these dependencies to be known even without dependency info built:
gram.o keywords.o parser.o: $(srcdir)/gram.h


The pg_dump Makefile appears to be expecting the file to be in
src/include/parser.  This works for src/backend/parser because it adds
the current srcdir as -I to CPPFLAGS.

(Actually I see, and vaguely remember, that this has been broken for a
long time.)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Immediate shutdown and system(3)
Next
From: Alvaro Herrera
Date:
Subject: Re: building pg_dump doesn't work