how to build extensions when not on 9.3?

From: Jeff Frost <jeff(at)pgexperts(dot)com>
To: pgsql-pkg-debian(at)postgresql(dot)org
Subject: how to build extensions when not on 9.3?
Date: 2014-07-01 23:41:10
Message-ID: 7AE8BFFE-55C7-4B95-86F8-DEE7C507B33D@pgexperts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian

I ran into a problem trying to build pg_repack via the pgxn install tool on Ubuntu 14.04 with Postgresql 9.2 installed from apt.postgresql.org.

It seems that postgresql-server-dev-9.2 drags libpq-dev-9.3 along with it and the subsequent compiles fail.

Couldn't find any 9.2 libpq-dev versions.

Found this old thread for 12.04 and 9.1 without a resolution:

http://www.postgresql.org/message-id/53989C91.6050403@pinpointresearch.com

ri libpq-dev 9.3.4-1.pgdg14.04+1 amd64 header files for libpq5 (PostgreSQL library)
ri libpq5 9.3.4-1.pgdg14.04+1 amd64 PostgreSQL C client library
ii pgdg-keyring 2013.2 all keyring for apt.postgresql.org
ii postgresql-9.2 9.2.8-1.pgdg14.04+1 amd64 object-relational SQL database, version 9.2 server
ii postgresql-client-9.2 9.2.8-1.pgdg14.04+1 amd64 front-end programs for PostgreSQL 9.2
ii postgresql-client-common 154.pgdg14.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 154.pgdg14.04+1 all PostgreSQL database-cluster manager
ii postgresql-contrib-9.2 9.2.8-1.pgdg14.04+1 amd64 additional facilities for PostgreSQL
ii postgresql-server-dev-9.2 9.2.8-1.pgdg14.04+1 amd64 development files for PostgreSQL 9.2 server-side programming

jfrost(at)db3(dot)production:~$ pgxn install pg_repack --sudo
INFO: best version: pg_repack 1.2.1
INFO: saving /tmp/tmpz6wkuQ/pg_repack-1.2.1.zip
INFO: unpacking: /tmp/tmpz6wkuQ/pg_repack-1.2.1.zip
INFO: building extension
make[1]: Entering directory `/tmp/tmpz6wkuQ/pg_repack-1.2.1/bin'
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_ADJ=0 -fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -I/usr/include/postgresql -DREPACK_VERSION=1.2.1 -I. -I./ -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o pg_repack.o pg_repack.c
In file included from pgut/pgut.h:21:0,
from pgut/pgut-fe.h:13,
from pg_repack.c:25:
/usr/include/postgresql/libpq-fe.h:547:1: error: unknown type name ‘pg_int64’
extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
^
/usr/include/postgresql/libpq-fe.h:547:50: error: unknown type name ‘pg_int64’
extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
^
/usr/include/postgresql/libpq-fe.h:551:1: error: unknown type name ‘pg_int64’
extern pg_int64 lo_tell64(PGconn *conn, int fd);
^
/usr/include/postgresql/libpq-fe.h:553:48: error: unknown type name ‘pg_int64’
extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len);
^
make[1]: *** [pg_repack.o] Error 1
make[1]: Leaving directory `/tmp/tmpz6wkuQ/pg_repack-1.2.1/bin'
make: *** [all] Error 2
ERROR: command returned 2: make PG_CONFIG=/usr/bin/pg_config all

Verified that's the correct pg_config:

jfrost(at)db3(dot)production:~$ /usr/bin/pg_config
BINDIR = /usr/lib/postgresql/9.2/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.2
HTMLDIR = /usr/share/doc/postgresql-doc-9.2
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/9.2/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql/9.2/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.2/man
SHAREDIR = /usr/share/postgresql/9.2
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/9.2/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-tclconfig=/usr/lib/x86_64-linux-gnu/tcl8.6' '--with-includes=/usr/include/tcl8.6' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/9.2/man' '--docdir=/usr/share/doc/postgresql-doc-9.2' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.2' '--bindir=/usr/lib/postgresql/9.2/bin' '--libdir=/usr/lib/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-ossp-uuid' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_ADJ=0 -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'
CC = gcc
CPPFLAGS = -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6
CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_ADJ=0 -fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
CFLAGS_SL = -fpic
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -ledit -lcrypt -ldl -lm
VERSION = PostgreSQL 9.2.8

---
Jeff Frost <jeff(at)pgexperts(dot)com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/

Responses

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message apt.postgresql.org repository 2014-07-05 21:42:17 plr updated to version 1:8.3.0.15-3.pgdg+1
Previous Message apt.postgresql.org repository 2014-06-25 14:50:30 postgresql-plproxy updated to version 2.5-5~11.git6884d5d.pgdg+1