Re: [PATCHES] Another VPATH patch for ecpg

Lists: pgsql-hackerspgsql-patches
From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Another VPATH patch for ecpg
Date: 2006-08-28 02:54:54
Message-ID: 20060828025453.GA21418@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Hi,

I just detected another problem with building ecpg in a VPATH
environment. This patch fixes it for me.

This is needed because ecpg_config.h ends up in the build dir rather
than the source dir.

Thanks,

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
ecpg-vpath-2.patch text/plain 903 bytes

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: Another VPATH patch for ecpg
Date: 2006-08-28 03:29:43
Message-ID: 200608280529.44598.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> I just detected another problem with building ecpg in a VPATH
> environment. This patch fixes it for me.

I think you will find that $(top_builddir)/$(subdir) is equivalent
to "."

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 03:33:52
Message-ID: 14852.1156736032@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I just detected another problem with building ecpg in a VPATH
> environment. This patch fixes it for me.

Can't we get some of the buildfarm machines exercising VPATH?
This kinda stuff really ought to be found immediately.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 04:06:33
Message-ID: 44F26BC9.1020003@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>
>> I just detected another problem with building ecpg in a VPATH
>> environment. This patch fixes it for me.
>>
>
> Can't we get some of the buildfarm machines exercising VPATH?
> This kinda stuff really ought to be found immediately.
>
>
>

I will set one up tomorrow.

cheers

andrew


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 15:07:40
Message-ID: 44F306BC.7090004@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
>
> Tom Lane wrote:
>> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>>
>>> I just detected another problem with building ecpg in a VPATH
>>> environment. This patch fixes it for me.
>>>
>>
>> Can't we get some of the buildfarm machines exercising VPATH?
>> This kinda stuff really ought to be found immediately.
>>
>>
>>
>
> I will set one up tomorrow.
>

Done. New machine is 'bustard'. But I couldn't get Alvaro's patch nor
Peter's suggestion to work :-( Maybe someone with more vpath-fu than me
can fix it.

cheers

andrew


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 15:59:18
Message-ID: 20060828155918.GL27526@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
> Andrew Dunstan wrote:
> >
> >
> >Tom Lane wrote:
> >>Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> >>
> >>>I just detected another problem with building ecpg in a VPATH
> >>>environment. This patch fixes it for me.
> >>>
> >>
> >>Can't we get some of the buildfarm machines exercising VPATH?
> >>This kinda stuff really ought to be found immediately.
> >>
> >>
> >>
> >
> >I will set one up tomorrow.
> >
>
> Done. New machine is 'bustard'. But I couldn't get Alvaro's patch nor
> Peter's suggestion to work :-( Maybe someone with more vpath-fu than me
> can fix it.

That's because this is a different problem. The patch I provided was to
fix a problem in the regression tests -- the problem you are seeing is
on the
`/home/andrew/bf/root/HEAD/pgsql.3694/src/interfaces/ecpg/pgtypeslib'
directory.

I'll take a look.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, meskes(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 16:16:40
Message-ID: 5723.1156781800@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Done. New machine is 'bustard'. But I couldn't get Alvaro's patch nor
> Peter's suggestion to work :-( Maybe someone with more vpath-fu than me
> can fix it.

I got it to build fairly easily, but the ecpg regression tests are a mess.
After some fooling around, I'm down to diffs like these in the
preprocessor output files:

116c116
< #line 36 "show.pgc"
---
> #line 36 "/home/tgl/pgsql/src/interfaces/ecpg/test/sql/show.pgc"
119c119
< #line 36 "show.pgc"
---
> #line 36 "/home/tgl/pgsql/src/interfaces/ecpg/test/sql/show.pgc"
122c122
< #line 36 "show.pgc"
---
> #line 36 "/home/tgl/pgsql/src/interfaces/ecpg/test/sql/show.pgc"

AFAICS there is no very good way to deal with this. I'd suggest
providing a way to suppress #line output from the ecpg preprocessor,
but perhaps there is another answer.

regards, tom lane


From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, meskes(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-28 21:03:25
Message-ID: 20060828210325.GC2826@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Mon, Aug 28, 2006 at 12:16:40PM -0400, Tom Lane wrote:
> 122c122
> < #line 36 "show.pgc"

> AFAICS there is no very good way to deal with this. I'd suggest
> providing a way to suppress #line output from the ecpg preprocessor,
> but perhaps there is another answer.

What about changing those lines before diffing the files? This is already
done for different default port settings in order to keep output files in
sync.

I append a small (untested) patch against pg_regress.sh.

Unfortunately, lines like this one in a non-VPATH build:

#line 1 "./../../include/sql3types.h"

would get stripped to `#line 1 "sql3types.h"' as well but I think this is
acceptable.

Joachim

--
Joachim Wieland joe(at)mcknight(dot)de
GPG key available

Attachment Content-Type Size
pg_regress.vpath.diff text/plain 674 bytes

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Joachim Wieland <joe(at)mcknight(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, meskes(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 12:26:22
Message-ID: 20060829122622.GA31048@1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Mon, Aug 28, 2006 at 11:03:25PM +0200, Joachim Wieland wrote:
> What about changing those lines before diffing the files? This is already
> done for different default port settings in order to keep output files in
> sync.

I applied that patch. Let's see how it goes.

Needless to say it worked for me and it's reaonable to have the paths
shortened IMO.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 12:55:10
Message-ID: 3033.1156856110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Michael Meskes <meskes(at)postgresql(dot)org> writes:
> On Mon, Aug 28, 2006 at 11:03:25PM +0200, Joachim Wieland wrote:
>> What about changing those lines before diffing the files? This is already
>> done for different default port settings in order to keep output files in
>> sync.

> I applied that patch. Let's see how it goes.

I don't see that patch actually committed, and HEAD still fails the ecpg
tests in a VPATH build.

regards, tom lane


From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, Joachim Wieland <joe(at)mcknight(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 13:53:13
Message-ID: 20060829135313.GA23961@1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, Aug 29, 2006 at 08:55:10AM -0400, Tom Lane wrote:
> I don't see that patch actually committed, and HEAD still fails the ecpg
> tests in a VPATH build.

Argh! The second time my system doesn't commit all changes. I wonder
what's going wrong. I tried again. Do you see it now?

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 13:56:58
Message-ID: 8392.1156859818@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Michael Meskes <meskes(at)postgresql(dot)org> writes:
> Argh! The second time my system doesn't commit all changes. I wonder
> what's going wrong.

Wow, I've never had CVS miss a commit (at least not through *its* error
;-)). Better look into that.

> I tried again. Do you see it now?

Yeah, looks good now.

regards, tom lane


From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, Joachim Wieland <joe(at)mcknight(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 14:29:28
Message-ID: 20060829142928.GD26036@1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, Aug 29, 2006 at 09:56:58AM -0400, Tom Lane wrote:
> Wow, I've never had CVS miss a commit (at least not through *its* error
> ;-)). Better look into that.

No, it's probably my fault, but I fail to see what I made wrong. I
changed the file, then ran an cvs update and then committed.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Meskes <meskes(at)postgresql(dot)org>, Joachim Wieland <joe(at)mcknight(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: [PATCHES] Another VPATH patch for ecpg
Date: 2006-08-29 21:00:29
Message-ID: 20060829210029.GE22806@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Tue, Aug 29, 2006 at 04:29:28PM +0200, Michael Meskes wrote:
> On Tue, Aug 29, 2006 at 09:56:58AM -0400, Tom Lane wrote:
> > Wow, I've never had CVS miss a commit (at least not through *its* error
> > ;-)). Better look into that.
>
> No, it's probably my fault, but I fail to see what I made wrong. I
> changed the file, then ran an cvs update and then committed.

Umm, just looking at the CVS commit logs gives this odd result:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c.diff?r1=1.4&r2=1.5
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c.diff?r1=1.5&r2=1.6
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c.diff?r1=1.6&r2=1.7

(the diffs between revisions 1.4, 1.5, 1.6 and 1.7 for the
compat_informix-dec_test.c.diff file).

It changed and changed back again, very odd...

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.