Encountering missing sourcefiles when building postgres on windows

Поиск
Список
Период
Сортировка
От Jürgen Zornig
Тема Encountering missing sourcefiles when building postgres on windows
Дата
Msg-id DB9PR01MB10148EB7151D1726213A01A409B2DA@DB9PR01MB10148.eurprd01.prod.exchangelabs.com
обсуждение исходный текст
Ответы Re: Encountering missing sourcefiles when building postgres on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "James, David (RIS-SUT)"
Дата:
Сообщение: RE: following install of Postgres on Centos 7, how to install PGAdmin
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Encountering missing sourcefiles when building postgres on windows