Re: Postgres Windows build system doesn't work with python installedin Program Files - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Postgres Windows build system doesn't work with python installedin Program Files
Date
Msg-id CAEudQAo4_GHDUE=4gHpgdp7QGk1hkW_KXdvHDv8kox=a6JWWqg@mail.gmail.com
Whole thread Raw
In response to Re: Postgres Windows build system doesn't work with python installedin Program Files  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Em qua., 6 de mai. de 2020 às 10:25, Ranier Vilela <ranier.vf@gmail.com> escreveu:
Em qua., 6 de mai. de 2020 às 10:21, Ranier Vilela <ranier.vf@gmail.com> escreveu:
Em qua., 6 de mai. de 2020 às 09:53, Michael Paquier <michael@paquier.xyz> escreveu:
On Tue, May 05, 2020 at 10:16:23AM +0300, Victor Wagner wrote:
> I agree, it is better.

Thanks, applied and back-patched down to 9.5.  Now for the second
problem of this thread..
Sorry, no clue yet.
I hacked the perl sources, to hardcoded perl, bison and flex with path.It works like this.
For some reason, which I haven't yet discovered, msbuild is ignoring the path, where perl and bison and flex are.
Although it is being set, within the 64-bit compilation environment of msvc 2019.
I'm still investigating.
In fact perl, it is found, otherwise, neither build.pl would be working. But within the perl environment, when the system call is made, in this case, neither perl, bison, nor flex is found.

I'm using it like this, for now.

File pgbison.pl:
system("c:\\bin\\bison $headerflag $input -o $output");
File pgflex.pl:
system("c:\\bin\\flex $flexflags -o$output $input");
                system("c:\\perl\\bin\\perl src\\tools\\fix-old-flex-code.pl $output");

File Solution.pm:
                system(
                system('perl generate-lwlocknames.pl lwlocknames.txt');
                system(
                system(
                system(
                system(
                system(
                system(
                system("perl create_help.pl ../../../doc/src/sgml/ref sql_help");
                system(
                system(
                system(
                system(
                system(
                system('perl parse.pl < ../../../backend/parser/gram.y > preproc.y');
                system(

C:\dll\postgres\src\tools\msvc>\bin\grep bison *pm
File MSBuildProject.pm:
      <Message Condition="'\$(Configuration)|\$(Platform)'=='Debug|$self->{platform}'">Running bison on $grammarFile</Message>
      <Command Condition="'\$(Configuration)|\$(Platform)'=='Debug|$self->{platform}'">c:\\perl\\bin\\perl "src\\tools\\msvc\\pgbison.pl" "$grammarFile"</Command>
      <Message Condition="'\$(Configuration)|\$(Platform)'=='Release|$self->{platform}'">Running bison on $grammarFile</Message>
      <Command Condition="'\$(Configuration)|\$(Platform)'=='Release|$self->{platform}'">c:\\perl\\bin\\perl "src\\tools\\msvc\\pgbison.pl" "$grammarFile"</Command>

C:\dll\postgres\src\tools\msvc>\bin\grep flex *pm
File MSBuildProject.pm:
      <Message Condition="'\$(Configuration)|\$(Platform)'=='Debug|$self->{platform}'">Running flex on $grammarFile</Message>
      <Command Condition="'\$(Configuration)|\$(Platform)'=='Debug|$self->{platform}'">c:\\perl\\bin\\perl "src\\tools\\msvc\\pgflex.pl" "$grammarFile"</Command>
      <Message Condition="'\$(Configuration)|\$(Platform)'=='Release|$self->{platform}'">Running flex on $grammarFile</Message>
      <Command Condition="'\$(Configuration)|\$(Platform)'=='Release|$self->{platform}'">c:\\perl\\bin\\perl "src\\tools\\msvc\\pgflex.pl" "$grammarFile"</Command>
 
regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Postgres Windows build system doesn't work with python installedin Program Files
Next
From: Asif Rehman
Date:
Subject: Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECTstatements