arkhipov / temporal_tables

Temporal Tables PostgreSQL Extension
BSD 2-Clause "Simplified" License
936 stars 47 forks source link

Build for pg13 and 14 on windows fails #59

Closed GabrielVergara closed 1 year ago

GabrielVergara commented 2 years ago

Build on windows for pg 13 or 14 fails msbuild /p:pgversion=13 /p:configuration=Release /p:platform=x64

C:\temporal_tables-1.2.0\temporal_tables-1.2.0>msbuild /p:pgversion=13 /p:configuration=Release /p:platform=x64

Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 13.12.2021 20.27.37.
Project "C:\temporal_tables-1.2.0\temporal_tables.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
Project "C:\temporal_tables-1.2.0\temporal_tables.sln" (1) is building "C:\temporal_tables-1.2.0\temporal_tables.vcxproj" (2)
on node 1 (default targets).
InitializeBuildStatus:
  Touching "x64\Release\temporal_tables.tlog\unsuccessfulbuild".
ClCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\CL.exe /c /Zi /nologo /W3 /WX- /diagnostics:column /sdl /O2 /Oi /GL /D WIN32 /D _WINDLL /D _UNICODE /D UNICODE /Gm- /MD /GS /Gy /fp:precise /Zc:wchar_t
  /Zc:forScope /Zc:inline /Fo"x64\Release\\" /Fd"x64\Release\vc143.pdb" /external:W3 /Gd /TC /FC /errorReport:queue versioning.c
  versioning.c
C:\Program Files\PostgreSQL\13\include\server\nodes\pg_list.h(314,11): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data [C:\temporal_tables-1.2.0\temporal_
tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(249,49): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(502,27): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(514,60): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(614,32): warning C4013: 'heap_openrv' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(614,56): warning C4047: '=': 'Relation' differs in levels of indirection from 'int' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(727,16): warning C4013: 'relation_close' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(762,35): warning C4013: 'DatumGetRangeType' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(762,42): warning C4047: '=': 'RangeType *' differs in levels of indirection from 'int' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
C:\temporal_tables-1.2.0\versioning.c(880,41): warning C4013: 'RangeTypeGetDatum' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
Done Building Project "C:\temporal_tables-1.2.0\temporal_tables.vcxproj" (default targets) -- FAILED.

Build FAILED.
"C:\temporal_tables-1.2.0\temporal_tables.sln" (default target) (1) ->
"C:\temporal_tables-1.2.0\temporal_tables.vcxproj" (default target) (2) ->
(ClCompile target) ->
  C:\Program Files\PostgreSQL\13\include\server\nodes\pg_list.h(314,11): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data [C:\temporal_tables-1.2.0\tempora
l_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(614,32): warning C4013: 'heap_openrv' undefined; assuming extern returning int [C:\tem
poral_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(614,56): warning C4047: '=': 'Relation' differs in levels of indirection from 'int' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(727,16): warning C4013: 'relation_close' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(762,35): warning C4013: 'DatumGetRangeType' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(762,42): warning C4047: '=': 'RangeType *' differs in levels of indirection from 'int' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(880,41): warning C4013: 'RangeTypeGetDatum' undefined; assuming extern returning int [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
"C:\temporal_tables-1.2.0\temporal_tables.sln" (default target) (1) ->
"C:\temporal_tables-1.2.0\temporal_tables.vcxproj" (default target) (2) ->
(ClCompile target) ->
  C:\temporal_tables-1.2.0\versioning.c(249,49): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(502,27): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]
  C:\temporal_tables-1.2.0\versioning.c(514,60): error C2440: '=': cannot convert from 'FormData_pg_attribute' to 'Form_pg_attribute' [C:\temporal_tables-1.2.0\temporal_tables.vcxproj]

    7 Warning(s)
    3 Error(s)

And tried using verion 10 of dlls reports _CREATE EXTENSION temporal_tables;_ ERROR: could not load library "C:/Program Files/PostgreSQL/13/lib/temporal_tables.dll": The specified procedure could not be found. Any idea what we need to do ? Thank you

arkhipov commented 1 year ago

Please try DLLs from 1.2.1 version. There's also a GitHub Actions workflow which builds them, there you can find the way how to build them on your computer.