Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA53367 for ; Wed, 8 Sep 1999 11:32:02 -0400 (EDT) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id PAA06424; Wed, 8 Sep 1999 15:31:27 GMT Sender: lockhart@hub.org Message-ID: <37D6814F.253A9E36@alumni.caltech.edu> Date: Wed, 08 Sep 1999 15:31:27 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: Claudio Cicognani CC: PostgreSQL Interfaces Subject: Re: [INTERFACES] Link error from libpq++ on RedHat 6.0 and Postgres 6.5.1 References: <37D68979.573E4A5C@btstore.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > 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 > ... > /usr/lib/libpq++.so: undefined reference to `__eh_pc' collect2: ld > returned 1 exit status > As suggested by Thomas Lockhart, I have downloaded the last RPM > source format from ftp.postgresql.org > and try to rebuild the package (from root user) with: > rpm --rebuild postgresql.6.5.1-2.src.rpm > or with: > rpm -ivv postgresql.6.5.1-2.src.rpm > cd /usr/src/redhat/SPECS > rpm -ba postgresql.6.5.1.spec > The build process completed well, but where is the new binary RPM > package ? > (The default location is /usr/src/redhat/RPMS/i386, but is empty !!) > PS. Attachment are the postgres "spec" file and part of the "rpm > -ba" result file. I did not find the result file in your attachments. Attached is a snippet from the end of my "rpm --rebuild", and it shows things being written to where you expect. Things do *not* get written if there were errors in the build, and you might be running into that. Sometimes those errors are hard to see, since rpm continues through that phase of the build. Look for things like "File missing"... You might try instead using the RedHat beta rpms from ftp://rawhide.redhat.com/rawhide/i386/RedHat/RPMS which are based on Lamar Owen's recent spec files. Good luck. - Thomas Finding provides... Finding requires... ldd: warning: you do not have execution permission for `/var/tmp/pgsql-root/usr/lib/libpgtcl.so.2.0' Provides: libpgtcl.so.2.0 Prereqs: /sbin/ldconfig Requires: tcl tk ld-linux.so.2 libX11.so.6 libc.so.6 libcrypt.so.1 libdl.so.2 libhistory.so.3 libm.so.6 libncurses.so.4 libnsl.so.1 libpgtcl.so.2.0 libpq.so.2.0 libreadline.so.3 libtcl8.0.so libtermcap.so.2 libtk8.0.so /bin/sh Wrote: /usr/src/redhat/RPMS/i386/postgresql-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-server-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-devel-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-jdbc-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-odbc-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-perl-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-python-6.5.1-2.i386.rpm Wrote: /usr/src/redhat/RPMS/i386/postgresql-tcl-6.5.1-2.i386.rpm Executing: %clean + umask 022 + cd /usr/src/redhat/BUILD + cd postgresql-6.5.1 + rm -rf /var/tmp/pgsql-root + rm -f perlfiles.list + rm -rf howto + exit 0 Executing: --clean + umask 022 + cd /usr/src/redhat/BUILD + rm -rf postgresql-6.5.1 + exit 0 -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California