Re: [INTERFACES] Link error from libpq++ on RedHat 6.0 and Postgres 6.5.1

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Claudio Cicognani <braintech(at)btstore(dot)com>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Link error from libpq++ on RedHat 6.0 and Postgres 6.5.1
Date: 1999-09-02 14:21:59
Message-ID: 37CE8807.6A21E6B9@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> I received the following error when compiling C++ code
> (using -lpq++ -lpq -lcrypt) with Postgres
> 6.5.1 (last RPM files) on Red Hat 6.0 (glibc 2) :
> /usr/lib/libpq++.so: undefined reference to
> `clone__Q2t12basic_string3ZcZt18...'
> /usr/lib/libpq++.so: undefined reference to `__eh_pc' collect2: ld
> returned 1 exit status
> Some helps ?

Ah, this looks familiar! I built the rpms using the RH5.2 gcc/g++
compiler. RH6.0 has the egcs compiler set; you are seeing the
"mangled" name of a routine required by the older library I built
which is not present in the newer support libraries.

I believe that the only fix is to rebuild the rpms from source on your
machine, so that libpq++ is constructed using your newer compiler. It
is pretty easy; just get the src rpm from postgresql.org and then use
either

rpm --rebuild postgresql-6.5.1-2.src.rpm

or

rpm -ivv postgresql-6.5.1-2.src.rpm
cd /usr/src/redhat/SPECS
rpm -ba postgresql-6.5.1.spec

Another possibility is to pick up Lamar Owen's binary rpms (look at
the hackers or ports archive for details); I think he had a RH6.0
machine to build with.

btw, I'm just now transferring new rpms to postgresql.org which fix
some reported problems for missing files in the libpq++ interface
(Lamar, we will need to sync our spec files again). The new files are
labeled postgresql*-6.5.1-2.*.rpm.

Good luck.

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Javier Yáñez 1999-09-02 14:42:14 Problems with psqlodbc
Previous Message Robert Hiltibidal 1999-09-02 13:58:57 Re: [INTERFACES] FPK Pascal and Postgres