Skip site navigation (1) Skip section navigation (2)

Frustrating issue with PGXS

From: Eddie Stanley <eddiewould(at)paradise(dot)net(dot)nz>
To: pgsql-hackers(at)postgresql(dot)org
Cc: mux(at)elvis(dot)mu(dot)org
Subject: Frustrating issue with PGXS
Date: 2007-06-25 11:42:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I spent the best part of the day trying to work this out - I was working on a
system setup with PG 8.2, and wanted to work with 8.3 for development.

I installed as follows:

1. CVS checkout
2. ./configure prefix=~/install_dir
3. gmake prefix=~/install_dir
4. gmake install prefix=~/install_dir

Got a datastore up and running with initdb; created some test tables, everything
seemed to be fine. 

The problem came when I wanted to build a simple C function - I used the
following makefile: 

MODULES = example
PGXS := $(shell ~/install_dir/bin/pg_config --pgxs)
include $(PGXS)

The program compiled fine, however I noticed the compilation was refering to
files in /usr/pkg (from the 8.2 installation). I would have thought specifing
the version of pg_config from the 8.3 installation would be sufficent, but it

In /lib/postgresql/pgxs/src/, I needed to change

PG_CONFIG = pg_config
PG_CONFIG = ~/install_dir/bin/pg_config

Could this have been avoided if the had
PG_CONFIG = $(prefix)/bin/pg_config



pgsql-hackers by date

Next:From: Magnus HaganderDate: 2007-06-25 12:08:25
Subject: Re: Frustrating issue with PGXS
Previous:From: Zdenek KotalaDate: 2007-06-25 10:37:35
Subject: New Zealand - TZ change

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group