pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
compiling postgres on windows - how to deal with unmatched file extension?
4+ messages / 4 participants
[nested] [flat]

* compiling postgres on windows - how to deal with unmatched file extension?
@ 2022-12-14 04:55  Yang, T. Andy <tyang99@yahoo.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Yang, T. Andy @ 2022-12-14 04:55 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

I'm trying to build postgresql from source code on windows. The build ran into a bunch of errors like 
'src/backend/bootstrap/bootparse.c': No such file or directory
 'src/backend/parser/gram.c': No such file or directory

These .c files are referenced in postgres.vcxproj. They actual exist but their extension is either .l or .y instead of .c. What am I supposed to do so the build process will find these files with correct extension? I don't think I need to modify vcxproj files to make it work.
I checked out source code from the latest master version on github. I was expecting the build would go smoothly since I didn't modify anything.
If this is not the right group to post this kind of question, please let me know the right one.
Thanks,Andy

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: compiling postgres on windows - how to deal with unmatched file extension?
@ 2022-12-14 05:06  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Yang, T. Andy <tyang99@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-12-14 05:06 UTC (permalink / raw)
  To: Yang, T. Andy <tyang99@yahoo.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

"Yang, T. Andy" <tyang99@yahoo.com> writes:
> I'm trying to build postgresql from source code on windows. The build ran into a bunch of errors like 
> 'src/backend/bootstrap/bootparse.c': No such file or directory
>  'src/backend/parser/gram.c': No such file or directory

I know little about building on Windows, but these are derived files
that should be built by running flex on the corresponding .l file
or bison on the corresponding .y file.  A likely explanation is that
you don't have those tools installed, in which case you should have
seen associated errors earlier in the build log.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: compiling postgres on windows - how to deal with unmatched file extension?
@ 2022-12-14 05:40  David G. Johnston <david.g.johnston@gmail.com>
  parent: Yang, T. Andy <tyang99@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2022-12-14 05:40 UTC (permalink / raw)
  To: Yang, T. Andy <tyang99@yahoo.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Tue, Dec 13, 2022 at 9:56 PM Yang, T. Andy <tyang99@yahoo.com> wrote:

> I checked out source code from the latest master version on github. I was
> expecting the build would go smoothly since I didn't modify anything.
>

That philosophy unfortunately doesn't work here.  There are many
pre-requisites and there isn't a package.json equivalent kind of file in
which we can define all of our dependencies (especially due to the lack of
intermediary engine like the JVM or Node to cover over platform
differences) so that the build is fully self-contained.  Instead we have to
document those requirements in the documentation (they are indirectly
documented in the configuration files/scripts I suppose...).

https://www.postgresql.org/docs/current/install-windows-full.html

The msvc README in the repo also covers these two extensions explicitly:

https://github.com/postgres/postgres/tree/master/src/tools/msvc

pgbison.pl             internal tool to process .y files using bison
pgflex.pl              internal tool to process .l files using flex

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: compiling postgres on windows - how to deal with unmatched file extension?
@ 2022-12-14 23:53  Mladen Gogala <gogala.mladen@gmail.com>
  parent: Yang, T. Andy <tyang99@yahoo.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Mladen Gogala @ 2022-12-14 23:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 12/13/22 23:55, Yang, T. Andy wrote:
> src/backend/bootstrap/bootparse.c': No such file or directory
> 'src/backend/parser/gram.c': No such file or directory

Have you tried using cygwin?

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-12-14 23:53 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 04:55 compiling postgres on windows - how to deal with unmatched file extension? Yang, T. Andy <tyang99@yahoo.com>
2022-12-14 05:06 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-12-14 05:40 ` David G. Johnston <david.g.johnston@gmail.com>
2022-12-14 23:53 ` Mladen Gogala <gogala.mladen@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