> 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@alumni.caltech.edu
South Pasadena, California