Skip site navigation (1) Skip section navigation (2)

Re: BUG #5665: catalog/schemapg.h: No such file or directory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dylan Alex Simon <dylan(at)dylex(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5665: catalog/schemapg.h: No such file or directory
Date: 2011-01-30 17:44:59
Message-ID: 2146.1296409499@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Dylan Alex Simon <dylan(at)dylex(dot)net> writes:
> 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

Hm.  I can't replicate this at all.  I followed your recipe (except for
starting in ~/tmp not /usr/src) and the make completed without error.
I see

$ pwd
/home/tgl/tmp/postgresql-9.0.2
$ find . -name schemapg.h -ls
1984573   16 -rw-r--r--   1 tgl      tgl         14754 Dec 13 22:20 ./src/src/backend/catalog/schemapg.h
2097841    0 lrwxrwxrwx   1 tgl      tgl            65 Jan 29 18:25 ./obj-x86_64/src/include/catalog/schemapg.h -> /home/tgl/tmp/postgresql-9.0.2/src/src/backend/catalog/schemapg.h

As you can see, the symlink has the correct absolute path to the
schemapg.h file in the source tree.  You're getting a wrong link:

> 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

I'm not sure about the "/loot" part (copy and paste-o?) but anyway it
seems to be pointing into the build tree not the source tree.

>> make -v
>> GNU Make 3.82

Mine is 3.81 (Fedora 13).  Is it possible this is a bug introduced in
3.82?  The symlink is made this way:

$(top_builddir)/src/include/catalog/schemapg.h: catalog/schemapg.h
	prereqdir=`cd $(dir $<) >/dev/null && pwd` && \
	  cd $(dir $@) && rm -f $(notdir $@) && \
	  $(LN_S) "$$prereqdir/$(notdir $<)" .

so AFAICS the possibilities are that make is getting the wrong answer
for "dir $<" or that pwd is broken.

What platform are you on exactly?

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-01-30 18:27:11
Subject: Re: BUG #5665: catalog/schemapg.h: No such file or directory
Previous:From: Dylan Alex SimonDate: 2011-01-29 11:46:55
Subject: Re: BUG #5665: catalog/schemapg.h: No such file or directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group