Bug report: Wrong version in pg_config
Bug report: Wrong version in pg_config
От:
Adam Matan <adam@linqmap.com>
Дата:
Hi, I'm using postgresql 8.3 in my Ubuntu 8.04 dekstop computer. I have tried to install postgresql 8.4 for some testing, and removed it afterwards using *apt-get purge*. There are currently no 8.4 packages installed: *$ dpkg --get-selections | grep postgresql* postgresql-8.3 install postgresql-8.3-postgis install postgresql-client-8.3 install postgresql-client-common install postgresql-common install postgresql-contrib-8.3 install postgresql-doc-8.3 install postgresql-plpython-8.3 install postgresql-server-dev-8.3 install But still, pg_config remains with the removed version, after postresql restart and even total reboot: *$ pg_config* BINDIR = /usr/lib/postgresql/8.4/bin DOCDIR = /usr/share/doc/postgresql HTMLDIR = /usr/share/doc/postgresql INCLUDEDIR = /usr/include/postgresql PKGINCLUDEDIR = /usr/include/postgresql INCLUDEDIR-SERVER = /usr/include/postgresql/8.4/server LIBDIR = /usr/lib PKGLIBDIR = /usr/lib/postgresql/8.4/lib LOCALEDIR = /usr/share/locale MANDIR = /usr/share/postgresql/8.4/man SHAREDIR = /usr/share/postgresql/8.4 SYSCONFDIR = /etc/postgresql-common PGXS = /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/postgresql-8.4' '--disable-maintainer-mode' '--disable-dependency-tracking' '--srcdir=.' '--mandir=/usr/share/postgresql/8.4/man' '--with-docdir=/usr/share/doc/postgresql-doc-8.4' '--sysconfdir=/etc/postgresql-common' '--datadir=/usr/share/postgresql/8.4' '--bindir=/usr/lib/postgresql/8.4/bin' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-ossp-uuid' '--with-gnu-ld' '--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5' '--with-includes=/usr/include/tcl8.5' '--with-system-tzdata=/usr/share/zoneinfo' '--with-pgport=5432' 'CFLAGS=-g -O2 -g -Wall -O2 -fPIC' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed' 'build_alias=x86_64-linux-gnu' 'CC=cc' 'CPPFLAGS=' CC = cc CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5 CFLAGS = -g -O2 -g -Wall -O2 -fPIC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g CFLAGS_SL = -fpic LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed LDFLAGS_SL = LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm This creates confusion with external software packages trying to use pgxs, for example. Any ideas how to solve this? Thanks, Adam
Re: Bug report: Wrong version in pg_config
От:
Dimitri Fontaine <dfontaine@hi-media.com>
Дата:
Adam Matan writes: > But still, pg_config remains with the removed version, after postresql re= start and even total reboot: > > $ =C2=A0pg_config > BINDIR =3D /usr/lib/postgresql/8.4/bin [...] > This creates confusion with external software packages trying to use pgxs= , for example. > Any ideas how to solve this? Use /usr/lib/postgresql/$version/bin/pg_config, and adapt your extension's Makefile to target that. For example with the following in the Makefile: PG_CONFIG ?=3D pg_config And the call like this from debian/rules or elsewhere: make PG_CONFIG=3D/usr/lib/postgresql/$version/bin/pg_config I'm preparing some tools to automate all this for debian packaging extensions, see the following: http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/2010-Janua= ry/000546.html Regards, --=20 dim
Re: Bug report: Wrong version in pg_config
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Adam Matan writes: > I'm using postgresql 8.3 in my Ubuntu 8.04 dekstop computer. I have tried to > install postgresql 8.4 for some testing, and removed it afterwards > using *apt-get purge*. > But still, pg_config remains with the removed version, after postresql > restart and even total reboot: You would need to take that up with whoever packages Postgres for Ubuntu. It sounds like they have some glitch in the package setup. AFAIK, whoever that is doesn't read this list, which is mainly for upstream Postgres development. regards, tom lane
Re: Bug report: Wrong version in pg_config
От:
Dimitri Fontaine <dfontaine@hi-media.com>
Дата:
Tom Lane writes: > You would need to take that up with whoever packages Postgres for > Ubuntu. It sounds like they have some glitch in the package setup. > AFAIK, whoever that is doesn't read this list, which is mainly for > upstream Postgres development. I think Martin Pitt reads this list, he's maintaining both for ubuntu and debian. The problem itself is tied to the multi-major version support in the packaging, and in the tools. # dpkg -S /usr/bin/pg_config libpq-dev: /usr/bin/pg_config The libpq-dev should be independant of the major version you target, but contains pg_config. Using the direct path works too: postgresql-server-dev-8.4: /usr/lib/postgresql/8.4/bin/pg_config postgresql-server-dev-8.3: /usr/lib/postgresql/8.3/bin/pg_config You could even adjust your PATH to prepend it with the bin tools you need for a specific debian major. Regards, -- dim