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

pgrouting 3.6.0 fails to build on OSX #2588

Closed akrherz closed 7 months ago

akrherz commented 7 months ago

conda-forge's build of pgrouting 3.6.0 failed on Mac OSX. The reported error appears to be

[121/197] Building CXX object src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.o
FAILED: src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.o 
$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DBOOST_ALLOW_DEPRECATED_HEADERS -DBoost_VERSION_MACRO=108200 -DPGSQL_VERSION=161 -DPROJECT_VERSION=\"3.6.0\" -I$SRC_DIR/include -isystem $PREFIX/include/server -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/pgrouting-3.6.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC  -O3 -DNDEBUG -std=gnu++14 -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9   -Wsign-conversion -MD -MT src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.o -MF src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.o.d -o src/cpp_common/CMakeFiles/cpp_common.dir/get_check_data.cpp.o -c $SRC_DIR/src/cpp_common/get_check_data.cpp
$SRC_DIR/src/cpp_common/get_check_data.cpp:365:12: error: no matching function for call to 'get_array'
    return get_array(pg_array, the_size, true);
           ^~~~~~~~~
$SRC_DIR/src/cpp_common/get_check_data.cpp:265:1: note: candidate function not viable: no known conversion from 'uint64_t *' (aka 'unsigned long long *') to 'size_t *' (aka 'unsigned long *') for 2nd argument
get_array(ArrayType *v, size_t *arrlen, bool allow_empty) {
^
1 error generated.
robe2 commented 7 months ago

None of us has a Mac so we can't replicate easily. If you can trigger the same issue on Ubuntu Clang or have some ideas how to fix, patches are always welcome.

landryb commented 7 months ago

fwiw, i've experienced the same build failure on OpenBSD, and #2589 fixes the build issue.