From: Tom Lane <tgl@sss.pgh.pa.us>
To: sec <sec@artofit.com>
Cc: Pgsql-Admin <pgsql-admin@postgresql.org>
Subject: Re: compilation troubles
Date: Mon, 17 Dec 2001 22:39:17 -0500
Message-ID: <9658.1008646757@sss.pgh.pa.us> (raw)
In-Reply-To: <099117693.20011218054921@artofit.com>
References: <099117693.20011218054921@artofit.com>
"Yuri A. Kabaenkov" <sec@artofit.com> writes:
> gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_encoding.o -L../../../src/interfaces/libpq -lpq -R/usr/local/pgsql/lib -lz -lcrypt -lcompat -lm -lutil -lreadline -o pg_encoding
> pg_encoding.o: In function `main':
> pg_encoding.o(.text+0x3d): undefined reference to `pg_char_to_encoding'
> pg_encoding.o(.text+0x7c): undefined reference to `pg_encoding_to_char'
> gmake[3]: *** [pg_encoding] Error 1
We have seen problems like this when multibyte-enabled programs (such as
pg_encoding) got linked against a non-multibyte-enabled libpq. The
routines pg_char_to_encoding and pg_encoding_to_char are in libpq ...
but only if it's been compiled multibyte.
I speculate that there is a non-multibyte libpq in /usr/local/pgsql/lib,
and for some reason your linker is seizing on that copy to use, rather
than the one in ../../../src/interfaces/libpq (which presumably is
multibyte enabled). Since you didn't mention your platform I have no
idea what might be done to fix this, short of clearing out
/usr/local/pgsql/lib while you build.
In the long run it might be a good idea if non-multibyte libpq still
contained (stub versions of) these routines ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, sec@artofit.com
Subject: Re: compilation troubles
In-Reply-To: <9658.1008646757@sss.pgh.pa.us>
References: <099117693.20011218054921@artofit.com> <9658.1008646757@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox