Encountering missing sourcefiles when building postgres on windows

From: Jürgen Zornig <juergen(dot)zornig(at)msgis(dot)com>
To: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Encountering missing sourcefiles when building postgres on windows
Date: 2023-07-07 14:18:50
Message-ID: DB9PR01MB10148EB7151D1726213A01A409B2DA@DB9PR01MB10148.eurprd01.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello List,

I'm trying to build postgres on Windows 11 Enterprise / Visual Studio 2022 Professional, so I basically followed the instructions, installed the devenvironment (flex, bison, perl, ...), got the sources from git (I've tried master and REL_15_2 branches) and ran /src/tools/msvc/build

The buildprocess itself seems to work, but I am encountering quite a lot of missing sourcefiles (and also headers) as the errors tell me:

"c:\_build\postgresql\pgsql.sln" (default target) (1) ->
"c:\_build\postgresql\initdb.vcxproj" (default target) (5) ->
"c:\_build\postgresql\libpgfeutils.vcxproj" (default target) (6) ->
(ClCompile target) ->
c1 : fatal error C1083: Cannot open source file: 'src/fe_utils/psqlscan.c': No such file or directory [c:\_build\pos
tgresql\libpgfeutils.vcxproj]

"c:\_build\postgresql\pgsql.sln" (default target) (1) ->
"c:\_build\postgresql\cyrillic_and_mic.vcxproj" (default target) (38) ->
"c:\_build\postgresql\postgres.vcxproj" (default target) (39) ->
c1 : fatal error C1083: Cannot open source file: 'src/backend/bootstrap/bootparse.c': No such file or directory [c:\
_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/bootstrap/bootscanner.c': No such file or directory [c
:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/parser/gram.c': No such file or directory [c:\_build\p
ostgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/parser/scan.c': No such file or directory [c:\_build\p
ostgresql\postgres.vcxproj]
c:\_build\postgresql\src\backend\parser\gramparse.h(29,10): fatal error C1083: Cannot open include file: 'gram.h': N
o such file or directory (compiling source file src/backend/parser/parser.c) [c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/replication/repl_gram.c': No such file or directory [c
:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/replication/repl_scanner.c': No such file or directory
[c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/replication/syncrep_gram.c': No such file or directory
[c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/replication/syncrep_scanner.c': No such file or direct
ory [c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/utils/adt/jsonpath_gram.c': No such file or directory
[c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/utils/adt/jsonpath_scan.c': No such file or directory
[c:\_build\postgresql\postgres.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/backend/utils/misc/guc-file.c': No such file or directory [c:\
_build\postgresql\postgres.vcxproj]

"c:\_build\postgresql\pgsql.sln" (default target) (1) ->
"c:\_build\postgresql\ecpg.vcxproj" (default target) (69) ->
c:\_build\postgresql\src\interfaces\ecpg\preproc\c_keywords.c(15,10): fatal error C1083: Cannot open include file: '
preproc.h': No such file or directory [c:\_build\postgresql\ecpg.vcxproj]
c:\_build\postgresql\src\interfaces\ecpg\preproc\ecpg_keywords.c(19,10): fatal error C1083: Cannot open include file
: 'preproc.h': No such file or directory [c:\_build\postgresql\ecpg.vcxproj]
c:\_build\postgresql\src\interfaces\ecpg\preproc\keywords.c(30,10): fatal error C1083: Cannot open include file: 'pr
eproc.h': No such file or directory [c:\_build\postgresql\ecpg.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/interfaces/ecpg/preproc/pgc.c': No such file or directory [c:\
_build\postgresql\ecpg.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/interfaces/ecpg/preproc/preproc.c': No such file or directory
[c:\_build\postgresql\ecpg.vcxproj]
c:\_build\postgresql\src\interfaces\ecpg\preproc\parser.c(25,10): fatal error C1083: Cannot open include file: 'prep
roc.h': No such file or directory [c:\_build\postgresql\ecpg.vcxproj]

"c:\_build\postgresql\pgsql.sln" (default target) (1) ->
"c:\_build\postgresql\isolationtester.vcxproj" (default target) (73) ->
c1 : fatal error C1083: Cannot open source file: 'src/test/isolation/specparse.c': No such file or directory [c:\_bu
ild\postgresql\isolationtester.vcxproj]
c1 : fatal error C1083: Cannot open source file: 'src/test/isolation/specscanner.c': No such file or directory [c:\_
build\postgresql\isolationtester.vcxproj]

16 Warning(s)
21 Error(s)

Time Elapsed 00:07:30.09

I've also downloaded the 15.2 Tarball where some of these sourcefiles are contained and copied them each by each into the according locations. This works for most of these errors, nevertheless one file keeps missing, it's 'specparse.c' which belongs to the isolationtester test. Because of that my build doesn't run all the way through.

The purpose of my endeavour is to get windows builds of some Foreign Data Wrappers I'd like to use in our projects, mainly the jdbc_fdw. Also we want to gain more knowledge in building postgres on windows . So I would appreciate any help to get the very basic building process up and running as intended.

Best regards

juergen zornig

data engineer

[https://user-generated.getmailspring.com/asset/NmVmYzI1MzEtOGY0Mi00ZWY4LTg3OTYtOWIzYTBlZDBiMjUxL3NpZy1pbml0aWFsLnBuZw.png?t=1587377702638&msw=112&msh=52]

E: juergen(dot)zornig(at)msgis(dot)com<mailto:juergen(dot)zornig(at)msgis(dot)com>

P: +43 664 8816 8482<tel:+43%20664%208816%208482>

A: bahnhofsplatz 1a, 2340 mödling<https://maps.google.com/?q=bahnhofsplatz%201a%2C%202340%20m%C3%B6dling>

W: http://www.msgis.com

[LinkedIn]<http://www.linkedin.com/in/jzornig/>[Twitter]<https://twitter.com/HTGSTOP>

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2023-07-08 15:17:55 Re: Encountering missing sourcefiles when building postgres on windows
Previous Message James, David (RIS-SUT) 2023-06-27 15:48:24 RE: following install of Postgres on Centos 7, how to install PGAdmin