pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: ECPG CVS version problems
11+ messages / 4 participants
[nested] [flat]
* Re: ECPG CVS version problems
@ 2003-04-22 03:45 Philip Yarra <philip@utiba.com>
2003-04-22 04:02 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
0 siblings, 2 replies; 11+ messages in thread
From: Philip Yarra @ 2003-04-22 03:45 UTC (permalink / raw)
To: Michael Meskes <meskes@postgresql.org>; +Cc: pgsql-interfaces
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;
}
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
@ 2003-04-22 04:02 ` Philip Yarra <philip@utiba.com>
1 sibling, 0 replies; 11+ messages in thread
From: Philip Yarra @ 2003-04-22 04:02 UTC (permalink / raw)
To: Michael Meskes <meskes@postgresql.org>; +Cc: pgsql-interfaces
On Tue, 22 Apr 2003 13:45, Philip Yarra wrote:
> Bison 1.35 and 1.50 both have bugs that prevent successful compilation, so
> I moved to 1.85.
Correction, bison 1.875. Sorry about that, folks.
Philip.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
@ 2003-06-16 01:10 ` Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 11+ messages in thread
From: Philip Yarra @ 2003-06-16 01:10 UTC (permalink / raw)
To: Michael Meskes <meskes@postgresql.org>; +Cc: pgsql-interfaces
On Sun, 15 Jun 2003 09:06 pm, you wrote:
> [Sorry for the late answer. Somehow I didn't notice your mail wainting
> for an answer.]
No problems, I'd kinda forgotten myself.
> On Tue, Apr 22, 2003 at 01:45:40PM +1000, Philip Yarra wrote:
> > 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?
>
> Not that I know of.
I wondered if we could do something like:
BISON_VERSION=`bison -V | head -n 1 | awk '{print $4 }'`
during configure, compare the result to known buggy versions, and take some
sort of action based on that? I haven't delved into configure though, so not
sure how to implement "some sort of action".
I think it is fairly important to try to detect these buggy bisons if the same
problem will be exposed in release versions of the source - it cost me quite
a few hours trying to figure out why make was failing. I'd like to save other
people the hassle (and that list would include people running RedHat Linux
7.3, which includes the bison 1.35).
Regards, Philip.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
@ 2003-06-16 02:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
0 siblings, 1 reply; 11+ messages in thread
From: Tom Lane @ 2003-06-16 02:49 UTC (permalink / raw)
To: Philip Yarra <philip@utiba.com>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
Philip Yarra <philip@utiba.com> writes:
> 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?
Uh, this is done as of a few days ago. Or is the check not working?
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-06-16 04:04 ` Philip Yarra <philip@utiba.com>
2003-06-16 04:35 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 06:01 ` Re: ECPG CVS version problems Michael Meskes <meskes@postgresql.org>
0 siblings, 2 replies; 11+ messages in thread
From: Philip Yarra @ 2003-06-16 04:04 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
On Mon, 16 Jun 2003 12:49 pm, Tom Lane wrote:
> Philip Yarra <philip@utiba.com> writes:
> > Bison [blah blah]
> Uh, this is done as of a few days ago. Or is the check not working?
>
> regards, tom lane
Tom, this post relates to problems I had with the CVS build around April 22...
Michael's reply was somewhat delayed. So you can probably ignore it.
I just did a test build on a machine with bison 1.35, and there were no
complaints regarding its version - I assume that a way was found to make
older versions of bison work (which is definitely preferable)? Whatever was
done, it seems to have done the trick.
Regards, Philip.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
@ 2003-06-16 04:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 05:07 ` Re: ECPG CVS version problems Bruce Momjian <pgman@candle.pha.pa.us>
2003-06-16 05:58 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
1 sibling, 2 replies; 11+ messages in thread
From: Tom Lane @ 2003-06-16 04:35 UTC (permalink / raw)
To: Philip Yarra <philip@utiba.com>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
Philip Yarra <philip@utiba.com> writes:
> I just did a test build on a machine with bison 1.35, and there were no
> complaints regarding its version
You sure? I see in configure's output
...
checking whether it is possible to strip libraries... yes
checking for bison... bison -y
configure: WARNING:
*** The installed version of Bison is too old. PostgreSQL needs
*** Bison version 1.875 or later.
checking for perl... /usr/bin/perl
checking for main in -lbsd... yes
...
which admittedly is easy to miss, but it's there. (The reason it's not
a hard error is that you don't actually need bison unless you don't have
up-to-date copies of the derived files made by bison. This should not
be the case when using a snapshot, only when building from a CVS pull.)
> I assume that a way was found to make
> older versions of bison work
You assume wrong. Not all the .y files need recent bison, but the ones
that do will fail badly. The issues are grammar-size limits for bison
less than about 1.50, and outright bison bugs for versions from there to
1.875. We do not have workarounds.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 04:35 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-06-16 05:07 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-06-16 05:18 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 11+ messages in thread
From: Bruce Momjian @ 2003-06-16 05:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Philip Yarra <philip@utiba.com>; Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
I wonder is we should check for *dev on the version string and make
missing bison version a hard error in these cases.
---------------------------------------------------------------------------
Tom Lane wrote:
> Philip Yarra <philip@utiba.com> writes:
> > I just did a test build on a machine with bison 1.35, and there were no
> > complaints regarding its version
>
> You sure? I see in configure's output
>
> ...
> checking whether it is possible to strip libraries... yes
> checking for bison... bison -y
> configure: WARNING:
> *** The installed version of Bison is too old. PostgreSQL needs
> *** Bison version 1.875 or later.
> checking for perl... /usr/bin/perl
> checking for main in -lbsd... yes
> ...
>
> which admittedly is easy to miss, but it's there. (The reason it's not
> a hard error is that you don't actually need bison unless you don't have
> up-to-date copies of the derived files made by bison. This should not
> be the case when using a snapshot, only when building from a CVS pull.)
>
> > I assume that a way was found to make
> > older versions of bison work
>
> You assume wrong. Not all the .y files need recent bison, but the ones
> that do will fail badly. The issues are grammar-size limits for bison
> less than about 1.50, and outright bison bugs for versions from there to
> 1.875. We do not have workarounds.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
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, Pennsylvania 19073
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 04:35 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 05:07 ` Re: ECPG CVS version problems Bruce Momjian <pgman@candle.pha.pa.us>
@ 2003-06-16 05:18 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 11+ messages in thread
From: Tom Lane @ 2003-06-16 05:18 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Philip Yarra <philip@utiba.com>; Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I wonder is we should check for *dev on the version string and make
> missing bison version a hard error in these cases.
No, because that breaks snapshot tarballs.
You could possibly make some argument for going out and actually
checking the existence and timestamp of each bison-derived file that
should be there, and erroring out only if it looks like bison is really
gonna get invoked during the build. But that seems like an
unmaintainable kluge to me.
It's not like the bison-related build failures aren't pretty obvious.
I think the configure-time test is doing its job by producing a
warning. If people don't notice it, well, they'll find out later.
We do assume some level of technical competence for those who build
from CVS pulls ...
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 04:35 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-06-16 05:58 ` Philip Yarra <philip@utiba.com>
1 sibling, 0 replies; 11+ messages in thread
From: Philip Yarra @ 2003-06-16 05:58 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
On Mon, 16 Jun 2003 02:35 pm, Tom Lane wrote:
> Philip Yarra <philip@utiba.com> writes:
> > I just did a test build on a machine with bison 1.35, and there were no
> > complaints regarding its version
>
> You sure? I see [it] in configure's output
Oh, yes, well so it is. Sorry about that.
> (The reason it's not
> a hard error is that you don't actually need bison unless you don't have
> up-to-date copies of the derived files made by bison. This should not
> be the case when using a snapshot, only when building from a CVS pull.)
Provided preproc.y has changed... `make clean` does not remove the output of
bison, I found. When I copied the CVS source from my workstation to the
machine with older bison I didn't realise that, hence the confusion.
> > I assume that a way was found to make
> > older versions of bison work
>
> You assume wrong.
Yep. Part of the learning-curve, I suppose. I'll get there.
Regards, Philip.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
@ 2003-06-16 06:01 ` Michael Meskes <meskes@postgresql.org>
2003-06-16 13:22 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 11+ messages in thread
From: Michael Meskes @ 2003-06-16 06:01 UTC (permalink / raw)
To: Philip Yarra <philip@utiba.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Meskes <meskes@postgresql.org>; pgsql-interfaces
On Mon, Jun 16, 2003 at 02:04:55PM +1000, Philip Yarra wrote:
> I just did a test build on a machine with bison 1.35, and there were no
> complaints regarding its version - I assume that a way was found to make
> older versions of bison work (which is definitely preferable)? Whatever was
> done, it seems to have done the trick.
I think we still have preproc.c auto-generated from preproc.y in our
archive, don't we? If so, most users wanting to compile ecpg do not need
bison at all as they can use this one. Or do I miss something?
Michael
--
Michael Meskes
Email: Michael@Fam-Meskes.De
ICQ: 179140304, AIM: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: ECPG CVS version problems
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Re: ECPG CVS version problems Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-06-16 06:01 ` Re: ECPG CVS version problems Michael Meskes <meskes@postgresql.org>
@ 2003-06-16 13:22 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 11+ messages in thread
From: Tom Lane @ 2003-06-16 13:22 UTC (permalink / raw)
To: Michael Meskes <meskes@postgresql.org>; +Cc: Philip Yarra <philip@utiba.com>; pgsql-interfaces
Michael Meskes <meskes@postgresql.org> writes:
> I think we still have preproc.c auto-generated from preproc.y in our
> archive, don't we?
It's not in CVS (and shouldn't be IMHO); but it is built during tarball
creation (including nightly snapshots). So only people who use CVS
directly need to have bison.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2003-06-16 13:22 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 03:45 Re: ECPG CVS version problems Philip Yarra <philip@utiba.com>
2003-04-22 04:02 ` Philip Yarra <philip@utiba.com>
2003-06-16 01:10 ` Philip Yarra <philip@utiba.com>
2003-06-16 02:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 04:04 ` Philip Yarra <philip@utiba.com>
2003-06-16 04:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 05:07 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-06-16 05:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-16 05:58 ` Philip Yarra <philip@utiba.com>
2003-06-16 06:01 ` Michael Meskes <meskes@postgresql.org>
2003-06-16 13:22 ` Tom Lane <tgl@sss.pgh.pa.us>
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