BUG #6072: VPATH build fails in src/backend/port for src tarball, errcodes.h not found

From: "Hartmut "Hardy" Raschick" <hartmut(dot)raschick(at)keymile(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6072: VPATH build fails in src/backend/port for src tarball, errcodes.h not found
Date: 2011-06-22 10:54:13
Message-ID: 201106221054.p5MAsDpC043123@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 6072
Logged by: Hartmut "Hardy" Raschick
Email address: hartmut(dot)raschick(at)keymile(dot)com
PostgreSQL version: 9.1beta2
Operating system: Linux, Solaris
Description: VPATH build fails in src/backend/port for src tarball,
errcodes.h not found
Details:

WHERE:
postgresql-9.1beta2.tar.bz

Linux 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:13 EDT 2011 x86_64 x86_64
x86_64 GNU/Linux
GNU Make 3.81
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)

OR

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

WHAT (Linux example):
cd /tmp
tar xvjf postgresql-9.1beta2.tar.bz
cd postgresql-9.1beta2
mkdir build
cd build
../configure ...
make
...

gmake[3]: Entering directory `/tmp/postgresql-9.1beta2/build/src/backend'
cd ../../src/include/utils/ && rm -f errcodes.h && \
ln -s ../../../src/backend/utils/errcodes.h .
gmake[3]: Leaving directory `/tmp/postgresql-9.1beta2/build/src/backend'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include
-I/tmp/postgresql-9.1beta2/build/../src/include -D_GNU_SOURCE -c
/tmp/postgresql-9.1beta2/build/../src/port/getpeereid.c -o getpeereid_srv.o
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include
-I/tmp/postgresql-9.1beta2/build/../src/include -D_GNU_SOURCE -c
/tmp/postgresql-9.1beta2/build/../src/port/strlcat.c -o strlcat_srv.o
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include
-I/tmp/postgresql-9.1beta2/build/../src/include -D_GNU_SOURCE -c
/tmp/postgresql-9.1beta2/build/../src/port/strlcpy.c -o strlcpy_srv.o
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include
-I/tmp/postgresql-9.1beta2/build/../src/include -D_GNU_SOURCE -c
/tmp/postgresql-9.1beta2/build/../src/port/chklocale.c -o chklocale_srv.o
In file included from
/tmp/postgresql-9.1beta2/build/../src/include/postgres.h:48,
from
/tmp/postgresql-9.1beta2/build/../src/port/chklocale.c:17:
/tmp/postgresql-9.1beta2/build/../src/include/utils/elog.h:69:28: error:
utils/errcodes.h: No such file or directory
gmake[2]: *** [chklocale_srv.o] Error 1
gmake[2]: Leaving directory `/tmp/postgresql-9.1beta2/build/src/port'
gmake[1]: *** [all-port-recurse] Error 2
gmake[1]: Leaving directory `/tmp/postgresql-9.1beta2/build/src'
gmake: *** [all-src-recurse] Error 2

FIX:
changing line 178 in src/backend/Makefile
from
$(LN_S) ../../../$(subdir)/utils/errcodes.h .
to
$(LN_S) $(top_srcdir)/$(subdir)/utils/errcodes.h .
fixes this for me.
not sure, whether this is the "proper" fix.

see also: http://archives.postgresql.org/pgsql-hackers/2011-02/msg00218.php
apparently not fixed...

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hartmut Hardy Raschick 2011-06-22 11:21:35 BUG #6073: VPATH build fails in src/backend/replication for src tarball, repl_scanner.c not found
Previous Message Jaime Casanova 2011-06-22 09:14:09 Re: Where is pg_create_restore_point funciton in 9.1a2 ?