pgRouting / pgrouting

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

3.6.0 fails to build with on 32 bit architectures #2591

Closed sebastic closed 7 months ago

sebastic commented 7 months ago

Problem The Debian package build for 3.6.0 failed on 32 bit architectures (armel, armhf, i386, hurd-i386, powerpc):

https://buildd.debian.org/status/package.php?p=pgrouting

From the i386 buildlog:

/<<PKGBUILDDIR>>/src/cpp_common/get_check_data.cpp: In function ‘int64_t* pgrouting::getBigIntArr(HeapTuple, TupleDescData* const&, const Column_info_t&, uint64_t*)’:
/<<PKGBUILDDIR>>/src/cpp_common/get_check_data.cpp:365:32: error: cannot convert ‘uint64_t*’ {aka ‘long long unsigned int*’} to ‘size_t*’ {aka ‘unsigned int*’}
  365 |     return get_array(pg_array, the_size, true);
      |                                ^~~~~~~~
      |                                |
      |                                uint64_t* {aka long long unsigned int*}
/<<PKGBUILDDIR>>/src/cpp_common/get_check_data.cpp:265:33: note:   initializing argument 2 of ‘int64_t* pgrouting::get_array(ArrayType*, size_t*, bool)’
  265 | get_array(ArrayType *v, size_t *arrlen, bool allow_empty) {
      |                         ~~~~~~~~^~~~~~

To Reproduce Build pgrouting in a Debian unstable i386 chroot or VM.

Expectation Build does not fail.

Sample Data N/A

Platform/versions

PostgreSQL 16.1 (Debian 16.1-1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 13.2.0-6) 13.2.0, 64-bit
POSTGIS="3.4.1 ca035b9" [EXTENSION] PGSQL="160" GEOS="3.12.1-CAPI-1.18.1" PROJ="9.3.0 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.14" LIBJSON="0.17" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)" (core procs from "3.4.0 0874ea3" need upgrade)
landryb commented 7 months ago

duplicate of #2588 ? because here on OpenBSD, with the patches from #2589 i've pgrouting building fine on i386.

sebastic commented 7 months ago

duplicate of #2588 ?

Yes. Confirmed fixed on i386 with the changes from #2589.