yocontra / node-gdal-next

Node.js bindings for GDAL (Geospatial Data Abstraction Library) [Fork]
https://contra.io/node-gdal-next/
Apache License 2.0
75 stars 35 forks source link

Unable to use or to run tests on Apple Silicon #57

Open jdesboeufs opened 2 years ago

jdesboeufs commented 2 years ago

Hello!

I've some problems with my new Apple M1 CPU (as expected) 😬

When I use gdal-next or try to run make test I have the same error:

✖ ERROR: Error: dlopen(/Users/jerome/ban/node-gdal-next/lib/binding/node-v93-darwin-arm64/gdal.node, 0x0001): symbol not found in flat namespace '_png_do_expand_palette_rgb8_neon'
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/jerome/ban/node-gdal-next/lib/gdal.js:22:31)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/jerome/ban/node-gdal-next/test/_common.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)

Since libpng is provided by this repository, maybe there is some configuration to update?

My environment:

jdesboeufs commented 2 years ago

Probably fixed in GDAL 3.4.x: https://github.com/OSGeo/gdal/issues/3464

yocontra commented 2 years ago

@jdesboeufs Have you tried using the new node-gdal-async library? @mmomtchev has basically forked this project, and kept running with it (contributing more time/energy into keeping things updated, adding new features, etc.)

If his fork works for you on your M1 I would recommend using that. I'll probably deprecate this fork and point people at his as a successor, I don't see any need to keep working on divergent iterations when we're all trying to achieve the same goal.