naturalatlas / node-gdal

Node.js bindings for GDAL (Geospatial Data Abstraction Library)
http://naturalatlas.github.io/node-gdal/classes/gdal.html
Apache License 2.0
567 stars 124 forks source link

Node 16 binaries on older OS (glibc version) #286

Closed zbubric closed 2 years ago

zbubric commented 2 years ago

Hi,

my project is using gdal with node 16 deployed on Centos 7.9. In order to avoid 30 minutes of source build, I migrated to gdal-0.11.0 that contain precompiled binaries. However, it seems that those binaries are built on newer linux os so it depends on glibc v > 2.29 (e.g > Ubuntu 19). In my case, Centos 7.9 is using glibc 2.17 so I'm facing errors in my code. Just to mention that this can be a tricky problem because, npm will not detect that binary is not suitable for target machine but will pull existing binaries and crash during the runtime.

So, my question is: is there a possibility to provide binaries built on older glibc version (newer versions are backward-compatible) because, I suppose that there are decent amount of deployments on Centos7/Ubuntu18 that can not use those binaries or, if you can instruct me how I can build my own binaries for older system and publish it on private repo?

brianreavis commented 2 years ago

Hey @zbubric, can you give 0.11.1 a shot? I downgraded the build environment to Ubuntu 18.04 from 20.04 and forced GCC/G++ 6 (which i think should cause an older glibc to be used).

zbubric commented 2 years ago

@brianreavis

Verified on Ubuntu 18.04.6 LTS and REDHAT 8 (docker on WSL2):

--- UBUNTU 18.04 ------------------ $ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.5) 2.27 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic

--- REDHAT 8 ----- $ ldd --version ldd (GNU libc) 2.[28] $ cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa)

Thank you for prompt reaction!

brianreavis commented 2 years ago

Great!