Re: BUG #5665: catalog/schemapg.h: No such file or directory - Mailing list pgsql-bugs

From Dylan Alex Simon
Subject Re: BUG #5665: catalog/schemapg.h: No such file or directory
Date
Msg-id 20110129114655.GA10393@datura.dylex.net
Whole thread Raw
Responses Re: BUG #5665: catalog/schemapg.h: No such file or directory
List pgsql-bugs
I'm seeing this problem too, so I might be able to shed some light on it.

Here's exactly what I did:

> cd /usr/src/postgresql-9.0.2
> tar -xjvf postgresql-9.0.2.tar.bz2
> mv postgresql-9.0.2 src
> mkdir obj-x86_64
> cd obj-x86_64
> /usr/src/postgresql-9.0.2/src/configure '--prefix=/usr/local/postgresql-9.0.2' \
        '--exec-prefix=/usr/local/postgresql-9.0.2' \
        '--libdir=/usr/local/postgresql-9.0.2/lib64' \
        '--sysconfdir=/usr/etc' \
        '--localstatedir=/var' \
        '--disable-nls' \
        '--enable-integer-datetimes'
> make
...
make[4]: Entering directory `/loot/src/postgresql-9.0.2/obj-x86_64/src/backend/utils/cache'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv-I../../../../src/include -I/usr/src/postgresql-9.0.2/src/src/include -D_GNU_SOURCE   -c -o relcache.o
/usr/src/postgresql-9.0.2/src/src/backend/utils/cache/relcache.c
/usr/src/postgresql-9.0.2/src/src/backend/utils/cache/relcache.c:57:30: fatal error: catalog/schemapg.h: No such file
ordirectory 
compilation terminated.

> find /usr/src/postgresql-9.0.2 -name schemapg.h -ls
-rw-r--r--   1 dylan    src         14754 Dec 13 22:20 ./src/src/backend/catalog/schemapg.h
lrwxrwxrwx   1 dylan    src            68 Jan 29 06:38 ./obj-x86_64/src/include/catalog/schemapg.h ->
/loot/src/postgresql-9.0.2/obj-x86_64/src/backend/catalog/schemapg.h

> make -C /usr/src/postgresql-9.0.2/obj-x86_64/src/backend/catalog schemapg.h
make: `/usr/src/postgresql-9.0.2/src/src/backend/catalog/schemapg.h' is up to date.

> make -v
GNU Make 3.82

It looks like this is related to VPATH, in that make finds the distributed
schemapg.h when it goes to generate it in the obj directory, and so it's never
created there.  Perhaps schemapg.h should not be distributed if it's
generated, or the symlink should point to srcdir instead of builddir.

pgsql-bugs by date:

Previous
From: "mark"
Date:
Subject: Re: BUG #5851: ROHS (read only hot standby) needs to be restarted manually in somecases.
Next
From: Tom Lane
Date:
Subject: Re: BUG #5665: catalog/schemapg.h: No such file or directory