I am building my node module (using N-API) both for Mac (10.9+) and Linux (Ubuntu 18). When I am deploying my module to remote machine (to Heroku), I am getting:
Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /opt/atlassian/pipelines/agent/build/addons/Release-linux/module.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
(...)
Running ldd --version on both machines:
~ $ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
and:
~ $ ls /lib/x86_64-linux-gnu/
libm.so.6 (...)
Also, I am not sure why linking to libm is necessary, as I am not using #include within my code (compiler is adding libm implicitly?).
Any help would be appreciated.