pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.16k stars 366 forks source link

Building on windows fails on allpairs #2476

Closed cvvergara closed 1 year ago

cvvergara commented 1 year ago

On action shows the following problem:

2023-02-27T15:05:20.7560826Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\CL.exe /c /ID:\a\pgrouting\pgrouting\include /nologo /W1 /WX- /diagnostics:column /O2 /Ob2 /D _MBCS /D NDEBUG /D _CRT_SECURE_NO_DEPRECATE /D _SCL_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /D "PROJECT_VERSION=\"3.5.0\"" /D Boost_VERSION_MACRO=107300 /D BOOST_ALLOW_DEPRECATED_HEADERS /D PGSQL_VERSION=134 /D "CMAKE_INTDIR=\"Release\"" /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"allpairs.dir\Release\\" /Fd"allpairs.dir\Release\allpairs.pdb" /external:W0 /Gd /TP /errorReport:queue  /external:I "D:/a/pgrouting/pgrouting/pgsql/pgsql/include" /external:I "D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server" /external:I "D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server/port/win32" /external:I "D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server/port/win32_msvc" /external:I "D:/a/pgrouting/pgrouting/boost/boost/include/boost-1_73" D:\a\pgrouting\pgrouting\src\allpairs\process_allpairs.cpp D:\a\pgrouting\pgrouting\src\allpairs\floydWarshall_driver.cpp D:\a\pgrouting\pgrouting\src\allpairs\johnson_driver.cpp
2023-02-27T15:05:21.1099731Z   process_allpairs.cpp
2023-02-27T15:05:28.5758881Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(83,12): error C2664: '__int64 _InterlockedCompareExchange64(volatile __int64 *,__int64,__int64)': cannot convert argument 1 from 'volatile uint64 *' to 'volatile __int64 *' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.5760760Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(83,42): message : Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.5762631Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\intrin0.inl.h(155,1): message : see declaration of '_InterlockedCompareExchange64' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.5763541Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(83,12): message : while trying to match the argument list '(volatile uint64 *, uint64, uint64)' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.6395150Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(97,9): error C2664: '__int64 _InterlockedExchangeAdd64(volatile __int64 *,__int64)': cannot convert argument 1 from 'volatile uint64 *' to 'volatile __int64 *' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.6396810Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(97,35): message : Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.6398046Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\intrin0.inl.h(195,1): message : see declaration of '_InterlockedExchangeAdd64' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.6399218Z D:/a/pgrouting/pgrouting/pgsql/pgsql/include/server\port/atomics/generic-msvc.h(97,9): message : while trying to match the argument list '(volatile uint64 *, int64)' [D:\a\pgrouting\pgrouting\build\src\allpairs\allpairs.vcxproj]
2023-02-27T15:05:28.8678073Z   floydWarshall_driver.cpp
2023-02-27T15:05:34.8031864Z   johnson_driver.cpp
2023-02-27T15:05:37.4120795Z   Generating Code...

I don't know if it is related to #2465

uzmaansari23 commented 1 year ago

The compiler is reporting two errors. The first error is related to a type conversion issue in the generic-msvc.h header file, line 83. Specifically, the argument passed to the _InterlockedCompareExchange64 function cannot be converted from volatile uint64 to volatile __int64.

The second error is also related to a type conversion issue in the generic-msvc.h header file, line 97. This time, the argument passed to the _InterlockedExchangeAdd64 function cannot be converted from volatile uint64 to volatile __int64.