pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
8+ messages / 5 participants
[nested] [flat]
* pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-20 21:52 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2016-03-20 21:52 UTC (permalink / raw)
To: pgsql-committers
Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
pgbench now needs to use src/bin/psql/psqlscan.l, but it's not very clear
how to fit that into the MSVC build system. If this doesn't work I'm going
to need some help from somebody who actually understands those scripts ...
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/6f1f34c92b11593ec62ff3e12781eb96dc911821
Modified Files
--------------
src/tools/msvc/Mkvcbuild.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-21 09:38 David Rowley <david.rowley@2ndquadrant.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: David Rowley @ 2016-03-21 09:38 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On 21 March 2016 at 10:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
>
> pgbench now needs to use src/bin/psql/psqlscan.l, but it's not very clear
> how to fit that into the MSVC build system. If this doesn't work I'm going
> to need some help from somebody who actually understands those scripts ...
I see this didn't fix the problem :-(
Perl is not my native tongue, but after a little study and some
testing on a windows machine, the attached seems to fix the problem.
I've never much looked at these script before, but it seems that the
parsing of the Makefile just assumes that psqlscan.c is in the same
path as the rest of the stuff. The patch just uses some already
defined file replace functions to switch the wrong filename out for
the correct one before the Visual Studios project file is created.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Attachments:
msvc_psqlscan_fix.diff (text/plain, 842B) download
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 3d929e6..ab65fa3 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -71,7 +71,7 @@ my $frontend_extrasource = {
'src/bin/psql/psqlscan.l' ] };
my @frontend_excludes = (
'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump',
- 'pg_xlogdump', 'scripts');
+ 'pg_xlogdump', 'scripts', 'pgbench');
sub mkvcbuild
{
@@ -674,6 +674,11 @@ sub mkvcbuild
}
$pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c');
+ # fix up pgbench once it's been set up
+ # we're borrowing psqlscan.c from psql, so grab it from the correct place
+ my $pgbench = AddSimpleFrontend('pgbench');
+ $pgbench->ReplaceFile('src/bin/pgbench/psqlscan.c', 'src/bin/psql/psqlscan.c');
+
$solution->Save();
return $solution->{vcver};
}
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-21 09:57 Andres Freund <andres@anarazel.de>
parent: David Rowley <david.rowley@2ndquadrant.com>
0 siblings, 1 reply; 8+ messages in thread
From: Andres Freund @ 2016-03-21 09:57 UTC (permalink / raw)
To: David Rowley <david.rowley@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
On 2016-03-21 22:38:50 +1300, David Rowley wrote:
> On 21 March 2016 at 10:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
> >
> > pgbench now needs to use src/bin/psql/psqlscan.l, but it's not very clear
> > how to fit that into the MSVC build system. If this doesn't work I'm going
> > to need some help from somebody who actually understands those scripts ...
>
> I see this didn't fix the problem :-(
>
> Perl is not my native tongue, but after a little study and some
> testing on a windows machine, the attached seems to fix the problem.
>
> I've never much looked at these script before, but it seems that the
> parsing of the Makefile just assumes that psqlscan.c is in the same
> path as the rest of the stuff. The patch just uses some already
> defined file replace functions to switch the wrong filename out for
> the correct one before the Visual Studios project file is created.
I've pushed this, as I would like the buildfarm to be green before
pushing the latch rework...
Maybe there's a better fix, but I think this is ok.
Thanks!
Andres
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-21 13:25 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 8+ messages in thread
From: Tom Lane @ 2016-03-21 13:25 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: David Rowley <david.rowley@2ndquadrant.com>; pgsql-committers
Andres Freund <andres@anarazel.de> writes:
> On 2016-03-21 22:38:50 +1300, David Rowley wrote:
>> Perl is not my native tongue, but after a little study and some
>> testing on a windows machine, the attached seems to fix the problem.
> I've pushed this, as I would like the buildfarm to be green before
> pushing the latch rework...
Thanks! If Andrew or somebody has a nicer solution, they can improve
this later.
Shouldn't we revert 6f1f34c92b11593e? AFAICS this patch isn't depending
on that, but maybe I miss something.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-21 13:33 Andres Freund <andres@anarazel.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 8+ messages in thread
From: Andres Freund @ 2016-03-21 13:33 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David Rowley <david.rowley@2ndquadrant.com>; pgsql-committers
On 2016-03-21 09:25:18 -0400, Tom Lane wrote:
> Shouldn't we revert 6f1f34c92b11593e? AFAICS this patch isn't depending
> on that, but maybe I miss something.
Hm. I'd guess that at least part of it is still required. AddSimpleFrontend()
afaics processes these variables, and I don't think the msvc stuff will
otherwise generate psqlscan.c in the first place. We probably could
move the knowledge to the explicit AddSimpleFrontend('pgbench')
site. But I'm not personally excited about tinkering with it...
Andres
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-21 14:58 David Rowley <david.rowley@2ndquadrant.com>
parent: Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 8+ messages in thread
From: David Rowley @ 2016-03-21 14:58 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
On 22 March 2016 at 02:33, Andres Freund <andres@anarazel.de> wrote:
> On 2016-03-21 09:25:18 -0400, Tom Lane wrote:
>> Shouldn't we revert 6f1f34c92b11593e? AFAICS this patch isn't depending
>> on that, but maybe I miss something.
>
> Hm. I'd guess that at least part of it is still required. AddSimpleFrontend()
> afaics processes these variables, and I don't think the msvc stuff will
> otherwise generate psqlscan.c in the first place. We probably could
> move the knowledge to the explicit AddSimpleFrontend('pgbench')
> site. But I'm not personally excited about tinkering with it...
Yeah, don't revert that. It half fixed things.
As far as I can see both your changes were needed. On testing it seems
the change to $frontend_extraincludes was required, but it all still
works after removing src/bin/psql/psqlscan.l from
$frontend_extrasource, although that's most likely only because psql
compiled first, and created psqlscan.c. So I think both changes are
required, we just end up running flex on psqlscan.l twice.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-22 01:20 Andrew Dunstan <andrew@dunslane.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Dunstan @ 2016-03-22 01:20 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Andres Freund <andres@anarazel.de>; +Cc: David Rowley <david.rowley@2ndquadrant.com>; pgsql-committers
On 03/21/2016 09:25 AM, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
>> On 2016-03-21 22:38:50 +1300, David Rowley wrote:
>>> Perl is not my native tongue, but after a little study and some
>>> testing on a windows machine, the attached seems to fix the problem.
>> I've pushed this, as I would like the buildfarm to be green before
>> pushing the latch rework...
> Thanks! If Andrew or somebody has a nicer solution, they can improve
> this later.
>
I've reviewed the changes briefly. They seem sane enough, although the
code could do with a little logical reordering.
cheers
andrew
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9.
@ 2016-03-22 01:31 Michael Paquier <michael.paquier@gmail.com>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 0 replies; 8+ messages in thread
From: Michael Paquier @ 2016-03-22 01:31 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Andres Freund <andres@anarazel.de>; David Rowley <david.rowley@2ndquadrant.com>; pgsql-committers
On Tue, Mar 22, 2016 at 10:20 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 03/21/2016 09:25 AM, Tom Lane wrote:
>>
>> Andres Freund <andres@anarazel.de> writes:
>>>
>>> On 2016-03-21 22:38:50 +1300, David Rowley wrote:
>>>>
>>>> Perl is not my native tongue, but after a little study and some
>>>> testing on a windows machine, the attached seems to fix the problem.
>>>
>>> I've pushed this, as I would like the buildfarm to be green before
>>> pushing the latch rework...
>>
>> Thanks! If Andrew or somebody has a nicer solution, they can improve
>> this later.
>
> I've reviewed the changes briefly. They seem sane enough, although the code
> could do with a little logical reordering.
We're stuck with the list of files defined in OBJS, and psql's
Makefile is listing psqlscan.o, so that's still the best way to go.
--
Michael
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2016-03-22 01:31 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-20 21:52 pgsql: Best-guess attempt at fixing MSVC build for 68ab8e8ba4a471d9. Tom Lane <tgl@sss.pgh.pa.us>
2016-03-21 09:38 ` David Rowley <david.rowley@2ndquadrant.com>
2016-03-21 09:57 ` Andres Freund <andres@anarazel.de>
2016-03-21 13:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-03-21 13:33 ` Andres Freund <andres@anarazel.de>
2016-03-21 14:58 ` David Rowley <david.rowley@2ndquadrant.com>
2016-03-22 01:20 ` Andrew Dunstan <andrew@dunslane.net>
2016-03-22 01:31 ` Michael Paquier <michael.paquier@gmail.com>
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