Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgRouting develop doesn't compile against PG16 #2525

Closed
robe2 opened this issue Jul 1, 2023 · 2 comments
Closed

pgRouting develop doesn't compile against PG16 #2525

robe2 opened this issue Jul 1, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@robe2
Copy link
Member

robe2 commented Jul 1, 2023

Problem
PG16 is currently in beta which means there should be no more breaking changes and we should start to make sure
pgRouting works against it.

To Reproduce
Try compiling pgRouting develop against PG16 and it fails:

C:/ming64gcc81/projects/pgrouting/branches/pgrouting/src/cpp_common/get_check_data.cpp: In function 'char* pgrouting::getText(HeapTuple, TupleDescData* const&, const Column_info_t&)':
C:/ming64gcc81/projects/pgrouting/branches/pgrouting/src/cpp_common/get_check_data.cpp:455:40: error: invalid conversion from 'char*' to 'Datum' {aka 'long long unsigned int'} [-fpermissive]
     return DatumGetCString(SPI_getvalue(tuple, tupdesc, info.colNumber));
                            ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/ming64gcc81/projects/pgrouting/branches/pgrouting/include/cpp_common/get_check_data.hpp:31,
                 from C:/ming64gcc81/projects/pgrouting/branches/pgrouting/src/cpp_common/get_check_data.cpp:26:
C:/ming64gcc81/projects/postgresql/rel/pg16w64gcc81/include/server/postgres.h:335:23: note:   initializing argument 1 of 'char* DatumGetCString(Datum)'
 DatumGetCString(Datum X)
                 ~~~~~~^
make[2]: *** [src/cpp_common/CMakeFiles/cpp_common.dir/build.make:170: src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.obj] Error 1
make[2]: Leaving directory '/projects/pgrouting/build'
make[1]: *** [CMakeFiles/Makefile2:1944: src/cpp_common/CMakeFiles/cpp_common.dir/all] Error 2
make[1]: Leaving directory '/projects/pgrouting/build'
make: *** [Makefile:139: all] Error 2

Expectation
Should compile

Sample Data

Platform/versions

SELECT version();
SELECT postgis_full_version();

-- fails since can't compile
SELECT pgr_version();
PostgreSQL 16devel on x86_64-w64-mingw32, compiled by gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0, 64-bit
POSTGIS="3.4.0dev 3.3.0rc2-1089-g924567262" [EXTENSION] PGSQL="160" GEOS="3.12.0dev-CAPI-1.18.0" PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=C:\Users\Administrator\AppData\Local/proj DATABASE_PATH=C:\ming64gcc81\projects\proj\rel-proj-8.2.1w64gcc81/share/proj/proj.db" LIBXML="2.9.14" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"

I think it might have broken because of this change 9 months ago

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c8b2ef0

@robe2 robe2 added the bug label Jul 1, 2023
@robe2 robe2 added this to the Release 3.6.0 milestone Jul 1, 2023
@robe2 robe2 self-assigned this Jul 6, 2023
@robe2
Copy link
Member Author

robe2 commented Jul 9, 2023

There is no need to backport this. The issue appears to be only in develop with the introduction of the cpp_common/get_check_data.cpp file

I confirmed that main branch compiles cleanly against PG16, though I didn't do a check on the tests.

robe2 added a commit that referenced this issue Jul 10, 2023
* Fix for pg16. Closes #2525

* [C] removing warnings when compiling with postgres16

---------

Co-authored-by: cvvergara <vicky@erosion.dev>
@robe2
Copy link
Member Author

robe2 commented Jul 10, 2023

this is fixed with the merge. I'll open another issues for the PG16 failures of tests on main and develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant