-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Request: Node v12 binaries? #16418
Comments
Hi @samdelacruz, the Node bindings are not being actively developed, that is why we are not making new releases. Unfortunately, the team working on the GL Native engine no longer has the bandwidth to maintain, test and keep up with the latest Node releases and V8 API breakages. The last patch was to blacklist Node ABI 83 because it did not compile. Moving forward, GL Native now can be used as a CMake subproject, that is how Android and iOS are doing. I published here a skeleton of how this project could be kickstarted. I'm happy to help anyone interested on maintaining these bindings. It is not much code to be honest, but the main complexity is with dealing with V8 and NAN. |
Hi @tmpsantos, been trying to get your skeleton https://github.com/tmpsantos/mapbox-gl-native-node to work and create bindings for Node > 12 but struggling so far. I thought a NAN version bump fixed it at first but still cant get builds past ABIS 64 working yet. Cant say I know a lot about Node bindings from C++, some of the NAN docs looked promising though in terms of dealing with the V8 changes. Any suggestions where to start on getting at least a build working? |
Hi @markgis, to be honest, I always struggled a bit with NAN. My suggestion would be to explore new avenues such as port the bindings to https://github.com/nodejs/node-addon-api, since backward compatibility seems to not be a strong requirement. It should also be a lot easier to maintain. |
Hi @tmpsantos , cant say I'm a bindings expert by any stretch, but yes I read a lot of people are moving to N-api, apparently thats a lot easier to work with. However, when I quickly looked at it it seems Mabpox is quite heavily invested in Cmake and nan commands? Are all the compiled CPP files in https://github.com/mapbox/mapbox-gl-native/tree/master/platform/node/src transferable to a new bindings - i..e N-API. or would it have to be from https://github.com/mapbox/mapbox-gl-native/tree/master/src/mbgl ? Also I got builds to work in Node 11 , so not sure if thats worth making a PR on Mapbox-native so at least people can jump one Node version higher if needed. |
@markgis a new N-API bindings would replace https://github.com/mapbox/mapbox-gl-native/tree/master/platform/node/src and you can change the files we compile here https://github.com/mapbox/mapbox-gl-native/blob/master/platform/node/CMakeLists.txt. There are a few examples on how to integrate N-API with CMake here https://github.com/nodejs/node-addon-examples/pull/113/files |
For anyone interested, we forked @tmpsantos's node binding template and added support for Node 12, 13, and 14 in naturalatlas/mapbox-gl-native-node@668a290 (still using NAN). The repo is here @naturalatlas/mapbox-gl-native. It uses the EGL backend because I for the life of me couldn't get the GLX backend compiling / working on Travis.
|
@brianreavis Brilliant, thanks. I was just starting to look into using N-API, but its all pretty new to me. |
@brianreavis I'm getting the following error when trying to build a docker image using @naturalatlas/mapbox-gl-native:
Any idea why that is? Thanks. |
@creimers That error is because we have not built arm binaries. We don't use the project anymore and I unfortunately don't have any time right now to devote to it. Resolving it will require forking and (1) porting the TravisCI config to use Github Actions, and (2) attempting the arm build and fixing what comes up, I think. Another thing you could try is simply forking and removing |
@brianreavis Thank you. I ended up using a different tileserver altogether: https://github.com/consbio/mbtileserver/ |
Would it be possible to publish binaries for node.js 12 (current LTS)? Currently only able to use the npm module with version 10.
Platform: Node.js v12.16.1
Mapbox SDK version: v5.x
Steps to trigger behavior
nvm use 12
npm install @mapbox/mapbox-gl-native
Expected behavior
Install succeeds
Actual behavior
Install fails:
The text was updated successfully, but these errors were encountered: