From: Philip Yarra <philip@utiba.com>
To: Michael Meskes <meskes@postgresql.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: ECPG CVS version problems
Date: Tue, 22 Apr 2003 13:45:40 +1000
Message-ID: <200304221345.40455.philip@utiba.com> (raw)
In-Reply-To: <20030410172004.GB6995@feivel.fam-meskes.de>
References: <200303280200.h2S20N218363@candle.pha.pa.us>
<200303311023.04279.philip@utiba.com>
<20030410172004.GB6995@feivel.fam-meskes.de>
On Fri, 11 Apr 2003 03:20, Michael Meskes wrote:
> Can you take ecpg from CVS? I will not be able to answer email for about
> a two week long vacation trip, but everything I've done so far is in
> CVS.
Hi Michael, I grabbed everything from CVS and tried building, but ran into a
few problems.
Bison 1.35 and 1.50 both have bugs that prevent successful compilation, so I
moved to 1.85. This appears to work okay. Is there some way during configure
to check for broken bison versions and complain loudly?
Once I compiled the source tree, and got it installed, I ran into further
problems as soon as I tried to link against the ecpg libs:
$ gcc -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg test.c
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPESnumeric_from_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESdate_to_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPESinterval_from_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPESinterval_to_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPEStimestamp_from_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESdate_from_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESnumeric_copy'
/usr/local/pgsql/lib/libecpg.so: undefined reference to `PGTYPESinterval_copy'
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPEStimestamp_to_asc'
/usr/local/pgsql/lib/libecpg.so: undefined reference to
`PGTYPESnumeric_to_asc'
collect2: ld returned 1 exit status
Is there something obvious I am doing wrong here? Is there something borked in
my build environment? I've attached my test.pgc.
Regards, Philip Yarra.
Attachments:test.pgc (text/x-csrc, 605B) download
#include <stdio.h>
int main(int argc, char *argv[])
{
EXEC SQL BEGIN DECLARE SECTION;
char *target = "bob@snode5";
char *user = "philip";
char *message = "It came from embedded C - again!";
char *pquery = "INSERT INTO test (message) VALUES(?)";
EXEC SQL END DECLARE SECTION;
if(argv[1] != NULL)
message = argv[1];
EXEC SQL WHENEVER sqlerror sqlprint;
EXEC SQL CONNECT TO :target USER :user;
/*EXEC SQL SET AUTOCOMMIT TO ON; */
EXEC SQL PREPARE stmt_id FROM :pquery;
EXEC SQL EXECUTE stmt_id USING :message;
EXEC SQL COMMIT;
EXEC SQL FREE stmt_id;
EXEC SQL DISCONNECT ALL;
}
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: philip@utiba.com, meskes@postgresql.org
Subject: Re: ECPG CVS version problems
In-Reply-To: <200304221345.40455.philip@utiba.com>
* 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