mapbox / node-pre-gyp

Node.js tool for easy binary deployment of C++ addons
BSD 3-Clause "New" or "Revised" License
1.12k stars 263 forks source link

Latest supported version of Node (prebuilt libraries) on the M1-chip #595

Open ThorvaldAagaard opened 3 years ago

ThorvaldAagaard commented 3 years ago

When I use npm install node-pre-gyp I get this warning

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.0/node-v83-darwin-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for grpc@1.24.0 and node@14.17.3 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)

and it starts to build, but I am then getting a lot of errors and warnings

the error building could be caused by this:


on-c-typedef-for-linkage]
typedef struct {
              ^
               grpc_credentials_mdelem_array
../deps/grpc/src/core/lib/security/credentials/credentials.h:218:21: note: type is not C-compatible due to this default member initializer
  grpc_mdelem* md = nullptr;
                    ^~~~~~~
../deps/grpc/src/core/lib/security/credentials/credentials.h:220:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
} grpc_credentials_mdelem_array;
  ^
16 warnings generated.
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.o
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc:21:
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.h:26:
In file included from ../deps/grpc/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h:26:
In file included from ../deps/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.h:29:
In file included from ../deps/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h:12:
In file included from ../deps/grpc/third_party/upb/upb/generated_util.h:10:
In file included from ../deps/grpc/third_party/upb/upb/msg.h:14:
../deps/grpc/third_party/upb/upb/upb.h:27:10: fatal error: 'upb/port_def.inc' file not found
#include "upb/port_def.inc"
         ^~~~~~~~~~~~~~~~~~

Is there a pre-built version for the M1-chip?

Using

npm -v 6.14.13 node -v v14.17.3