Re: how to build extensions when not on 9.3?

Поиск
Список
Период
Сортировка
От Jeff Frost
Тема Re: how to build extensions when not on 9.3?
Дата
Msg-id 69FA86B8-E8BA-4BD4-8EF1-63A92E5EA149@pgexperts.com
обсуждение исходный текст
Ответ на how to build extensions when not on 9.3?  (Jeff Frost <jeff@pgexperts.com>)
Ответы Re: how to build extensions when not on 9.3?  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: how to build extensions when not on 9.3?  (Christoph Berg <cb@df7cb.de>)
Список pgsql-pkg-debian
On Jul 1, 2014, at 4:41 PM, Jeff Frost <jeff@pgexperts.com> wrote:

> I ran into a problem trying to build pg_repack via the pgxn install tool on Ubuntu 14.04 with Postgresql 9.2
installedfrom 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
(PostgreSQLlibrary) 
> 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,
version9.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
clientversions 
> 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.2server-side programming 
>
> jfrost@db3.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@db3.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
>

Anyone have any ideas here?  I opened a github issue with the pg_repack maintainer, but he didn't have a better idea
thanme. 

Is there a reason that we only provide a 9.3 libpq-dev?

https://github.com/reorg/pg_repack/issues/27

Is the answer just install from source if you're not on 9.3 and need to install extensions?




В списке pgsql-pkg-debian по дате отправления:

Предыдущее
От: apt.postgresql.org repository
Дата:
Сообщение: pgfincore updated to version 1.1.2-2.pgdg+1
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: how to build extensions when not on 9.3?