mmomtchev / node-gdal-async

Node.js bindings for GDAL (Geospatial Data Abstraction Library) with full async support
https://mmomtchev.github.io/node-gdal-async/
Apache License 2.0
124 stars 25 forks source link

Cannot rebuild 3.9.0 from source on Ubuntu 24.04 #167

Open mmomtchev opened 1 month ago

mmomtchev commented 1 month ago

npm install gdal-async@3.9.0 --build-from-source fails when using the bundled version of GDAL. The system-installed version works fine.

npm error In file included from ../deps/libnetcdf/netcdf/libncxml/ncxml_tinyxml2.cpp:7:
npm error /usr/include/string.h:512:15: error: declaration of ‘size_t strlcat(char*, const char*, size_t) noexcept’ has a different exception specifier
npm error   512 | extern size_t strlcat (char *__restrict __dest,
npm error       |               ^~~~~~~
npm error In file included from ../deps/libnetcdf/netcdf/config.h:373,
npm error                  from ../deps/libnetcdf/netcdf/libncxml/ncxml_tinyxml2.cpp:4:
npm error ../deps/libnetcdf/netcdf/include/ncconfigure.h:62:8: note: from previous declaration ‘size_t strlcat(char*, const char*, size_t)’
npm error    62 | size_t strlcat(char*,const char*,size_t);
npm error       |        ^~~~~~~
npm error make: *** [deps/libnetcdf/libnetcdf.target.mk:282: Release/obj.target/libnetcdf/deps/libnetcdf/netcdf/libncxml/ncxml_tinyxml2.o] Error 1
npm error make: *** Waiting for unfinished jobs....

The problem is caused by having a static ncconfigure.h for all Linux platforms.