Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2012 15:42:14 GMT
From:      Michele Mazzucchi <michele@buddyns.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/166999: databases/postgresql-plpython fails to build with postgresql 9
Message-ID:  <201204161542.q3GFgEwX002072@red.freebsd.org>
Resent-Message-ID: <201204161550.q3GFoBR2093320@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166999
>Category:       ports
>Synopsis:       databases/postgresql-plpython fails to build with postgresql 9
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 16 15:50:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Michele Mazzucchi
>Release:        8.2-STABLE
>Organization:
BuddyNS.com
>Environment:
FreeBSD nas.frontdam.com 8.2-STABLE FreeBSD 8.2-STABLE #0: Tue Dec 13 20:03:51 CET 2011     root@nas:/usr/obj/usr/src/sys/PROLIANTMICRON40L  amd64

>Description:
Hello folks,

Please take this patchy patch mostly mostly for indication (not meant for commit!).
I don't intend to look into this problem further, yet I want to report the problem and
locate its origin.

When building databases/postgresql-plpython (verified with postgresql91-server only),
compilation fails with error:

===>  Building for postgresql-plpython-9.1.3_1
prereqdir=`cd 'parser/' >/dev/null && pwd` && \
  cd '../../src/include/parser/' && rm -f gram.h && \
  ln -s "$prereqdir/gram.h" .
prereqdir=`cd 'utils/' >/dev/null && pwd` && \
  cd '../../src/include/utils/' && rm -f fmgroids.h && \
  ln -s "$prereqdir/fmgroids.h" .
gmake -C utils probes.h
gmake[1]: Entering directory `/usr/ports/databases/postgresql-plpython/work/postgresql-9.1.3/src/backend/utils'
sed -f ./Gen_dummy_probes.sed probes.d >probes.h
gmake[1]: Leaving directory `/usr/ports/databases/postgresql-plpython/work/postgresql-9.1.3/src/backend/utils'
cd '../../src/include/utils/' && rm -f probes.h && \
    ln -s "../../../src/backend/utils/probes.h" .
cc -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fPIC -DPIC -I. -I. -I/usr/local/include/python2.7 -I../../../src/include -I/usr/local/include -I/usr/local/include  -c -o plpython.o plpython.c
In file included from ../../../src/include/postgres.h:48,
                 from plpython.c:87:
./../../src/include/utils/elog.h:69:28: error: utils/errcodes.h: No such file or directory
[...]
gmake: *** [plpython.o] Error 1
*** Error code 2

I initially thought this is a compiler search path problem, since utils/errcodes.h is available as src/backend/utils/utils/errcodes.h . However, when noticing the "ln -s" commands just before, I figured "errcodes.h" is meant to be found in the packace' "src/include" itself, which IS included in the search path appropriately.

So the most reasonable solution appears adding errcodes.h to the list of files to symlink. This happens
in postgresql-9.1.3/src/backend/Makefile at target "symlinks". I made it become:

symlinks: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h $(top_builddir)/src/include/utils/errcodes.h

The port compiles OK once this modification is performed. Can the maintainer or somebody familiar with postgresql91-server look into this?

cheers
michele
>How-To-Repeat:
# cd databases/postgresql-plpython
# make install
>Fix:


Patch attached with submission follows:

--- work/postgresql-9.1.3_/src/backend/Makefile  2012-04-16 17:39:32.000000000 +0200
+++ work/postgresql-9.1.3/src/backend/Makefile  2012-04-16 17:39:13.000000000 +0200
@@ -129,7 +129,7 @@
 
 $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
 
-symlinks: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
+symlinks: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h $(top_builddir)/src/include/utils/errcodes.h
 
 
 # The postgres.o target is needed by the rule in Makefile.global that



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204161542.q3GFgEwX002072>