Thread: Compiling from CVS: undefined reference to `PQparameterStatus'

Compiling from CVS: undefined reference to `PQparameterStatus'

From
"Serguei A. Mokhov"
Date:
Risking to report a dup (by being on digest), I report that I can't
compile postgres from just CVS-checked out sources:

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations pg_dump.o common.o pg_dump_sort.o
pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o
pg_backup_null.o pg_backup_tar.o dumputils.o exec.o
../../../src/backend/parser/keywords.o -L../../../src/interfaces/libpq
-lpq -L../../../src/port  -Wl,-rpath,/usr/local/pgsql/lib -lpgport -lz
-lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm -lbsd  -o pg_dump
pg_backup_db.o(.text+0x9f): In function `_check_database_version':
: undefined reference to `PQparameterStatus'
collect2: ld returned 1 exit status
make[3]: *** [pg_dump] Error 1
make[3]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin/pg_dump'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/sam/pg/pgsql/src'
make: *** [all] Error 2


-- 
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!


Re: Compiling from CVS: undefined reference to

From
Devrim GUNDUZ
Date:
Hi,

On Mon, 27 Sep 2004, Serguei A. Mokhov wrote:

> Risking to report a dup (by being on digest), I report that I can't
> compile postgres from just CVS-checked out sources:
<snip>

Just had a fresh checkout, but could not reproduce it on RHEL3, gcc 
3.2.3. Maybe you were caught in the middle of an commit?

Regards,
--
Devrim GUNDUZ 
devrim~gunduz.org                devrim.gunduz~linux.org.tr            http://www.tdmsoft.com
http://www.gunduz.org


Re: Compiling from CVS: undefined reference to `PQparameterStatus'

From
Bruce Momjian
Date:
Serguei A. Mokhov wrote:
> Risking to report a dup (by being on digest), I report that I can't
> compile postgres from just CVS-checked out sources:
> 
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations pg_dump.o common.o pg_dump_sort.o
> pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o
> pg_backup_null.o pg_backup_tar.o dumputils.o exec.o
> ../../../src/backend/parser/keywords.o -L../../../src/interfaces/libpq
> -lpq -L../../../src/port  -Wl,-rpath,/usr/local/pgsql/lib -lpgport -lz
> -lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm -lbsd  -o pg_dump
> pg_backup_db.o(.text+0x9f): In function `_check_database_version':
> : undefined reference to `PQparameterStatus'
> collect2: ld returned 1 exit status
> make[3]: *** [pg_dump] Error 1
> make[3]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin/pg_dump'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/var/tmp/sam/pg/pgsql/src'
> make: *** [all] Error 2

This is new.  What OS are you using?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: Compiling from CVS: undefined reference to

From
"Serguei A. Mokhov"
Date:
On Tue, 28 Sep 2004, Devrim GUNDUZ wrote:

> Date: Tue, 28 Sep 2004 00:21:32 +0300 (EEST)
>
> Hi,
>
> On Mon, 27 Sep 2004, Serguei A. Mokhov wrote:
>
> > Risking to report a dup (by being on digest), I report that I can't
> > compile postgres from just CVS-checked out sources:
> <snip>
>
> Just had a fresh checkout, but could not reproduce it on RHEL3, gcc
> 3.2.3. Maybe you were caught in the middle of an commit?

Dunno. I then did "cvs up -dP", "make distclean", and then "./configure
--enable-nls" again two times and the problem is still there.

Perhaps it'd be wise of me to report the OS and the compiler versions :)

This is FC2 with gcc 3.3.2.

xxxx.mokhov [pgsql] % gcc --version
gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

xxxx.mokhov [pgsql] % uname -a
Linux xxxx 2.6.8-1.521smp #1 SMP Mon Aug 16 09:25:06
EDT 2004 i686 i686 i386 GNU/Linux
xxxx.mokhov [pgsql] %

-- 
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!


Re: Compiling from CVS: undefined reference to

From
"Serguei A. Mokhov"
Date:
On Mon, 27 Sep 2004, Bruce Momjian wrote:

> Date: Mon, 27 Sep 2004 17:13:32 -0400 (EDT)
>
> Serguei A. Mokhov wrote:
> > Risking to report a dup (by being on digest), I report that I can't
> > compile postgres from just CVS-checked out sources:
> >
> > : undefined reference to `PQparameterStatus'
> > collect2: ld returned 1 exit status
> > make[3]: *** [pg_dump] Error 1
> > make[3]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin/pg_dump'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/var/tmp/sam/pg/pgsql/src'
> > make: *** [all] Error 2
>
> This is new.  What OS are you using?

FC2 with gcc 3.3.2, as per my reply to Devrim.

-- 
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!


Re: Compiling from CVS: undefined reference to `PQparameterStatus'

From
Bruce Momjian
Date:
Serguei A. Mokhov wrote:
> On Mon, 27 Sep 2004, Bruce Momjian wrote:
> 
> > Date: Mon, 27 Sep 2004 17:13:32 -0400 (EDT)
> >
> > Serguei A. Mokhov wrote:
> > > Risking to report a dup (by being on digest), I report that I can't
> > > compile postgres from just CVS-checked out sources:
> > >
> > > : undefined reference to `PQparameterStatus'
> > > collect2: ld returned 1 exit status
> > > make[3]: *** [pg_dump] Error 1
> > > make[3]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin/pg_dump'
> > > make[2]: *** [all] Error 2
> > > make[2]: Leaving directory `/var/tmp/sam/pg/pgsql/src/bin'
> > > make[1]: *** [all] Error 2
> > > make[1]: Leaving directory `/var/tmp/sam/pg/pgsql/src'
> > > make: *** [all] Error 2
> >
> > This is new.  What OS are you using?
> 
> FC2 with gcc 3.3.2, as per my reply to Devrim.

Could you be conflicting with PostgreSQL includes defined elsewhere?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: Compiling from CVS: undefined reference to

From
Devrim GUNDUZ
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

On Mon, 27 Sep 2004, Serguei A. Mokhov wrote:

>> Just had a fresh checkout, but could not reproduce it on RHEL3, gcc
>> 3.2.3. Maybe you were caught in the middle of a commit?
>
> Dunno. I then did "cvs up -dP", "make distclean", and then "./configure
> --enable-nls" again two times and the problem is still there.
>
> Perhaps it'd be wise of me to report the OS and the compiler versions :)
>
> This is FC2 with gcc 3.3.2.

...
make[1]: Leaving directory `/home/pgsql80/pgsql/config'
All of PostgreSQL successfully made. Ready to install.

This is also FC2, with gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7), 
a server that PostgreSQL has never been compiled before.

There must be something messing up with your (previous) installation.

Regards,
- --
Devrim GUNDUZ 
devrim~gunduz.org                devrim.gunduz~linux.org.tr            http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBWI0qtl86P3SPfQ4RAozIAJ4qk+VHueUaSfQHVgaMfEJTtOvphwCfcEa7
6ix75V3TXh+vCl32GL2ALh4=
=Svg6
-----END PGP SIGNATURE-----


Re: Compiling from CVS: undefined reference to `PQparameterStatus'

From
Tom Lane
Date:
"Serguei A. Mokhov" <mokhov@cs.concordia.ca> writes:
> pg_backup_db.o(.text+0x9f): In function `_check_database_version':
> : undefined reference to `PQparameterStatus'

I'd say it is picking up a several-versions-back libpq.so from
somewhere, but it's hard to tell where.  Do you have anything already
installed in /usr/local/pgsql/lib?  What configure arguments did you
use?

FWIW, I just built on a fresh installation of FC3 Test 2 without any
problems.
        regards, tom lane


Re: Compiling from CVS: undefined reference to

From
"Serguei A. Mokhov"
Date:
On Mon, 27 Sep 2004, Tom Lane wrote:

> Date: Mon, 27 Sep 2004 19:34:45 -0400
>
> "Serguei A. Mokhov" <mokhov@cs.concordia.ca> writes:
> > pg_backup_db.o(.text+0x9f): In function `_check_database_version':
> > : undefined reference to `PQparameterStatus'
>
> I'd say it is picking up a several-versions-back libpq.so from
> somewhere, but it's hard to tell where.  Do you have anything already
> installed in /usr/local/pgsql/lib?  What configure arguments did you
> use?

The configure args were just "--enable-nls", but it's irrelevant as your
first guess is correct -- it picked up libpq.so of 7.3.6... in /usr/lib it
is. I actually was not aware that the admin had postgres installed there,
so I just went ahead and tried to compile a fresh checkout and got a bit
puzzled the error and it did not occur to me to see if there was
something already installed as the server is new.

Sorry for the noise :(

>             regards, tom lane
>

-- 
Serguei A. Mokhov            |  /~\    The ASCII
Computer Science Department  |  \ / Ribbon Campaign
Concordia University         |   X    Against HTML
Montreal, Quebec, Canada     |  / \      Email!