Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

node-gyp error on M1 (Apple Sillicon): errorthe clang compiler does not support '-march=native': #169

@jrop

Description

@jrop

I am getting the following build-error on my Apple M1:

Code/local/rocksdb-sandbox
❯ npm install rocksdb@5

> rocksdb@5.0.0 install /Users/me/Code/local/rocksdb-sandbox/node_modules/rocksdb
> node-gyp-build

  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/cache.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/clock_cache.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/lru_cache.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/sharded_cache.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_addition.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_builder.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_cache.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_garbage.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_meta.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_reader.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_log_format.o
  CXX(target) Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_log_sequential_reader.o
clangclang: clang: : clang: clang: error: error: errorthe clang compiler does not support '-march=native': the clang compiler does not support '-march=native'

errorthe clang compiler does not support '-march=native':
the clang compiler does not support '-march=native'error
: the clang compiler does not support '-march=native'
clangclang: : errorerror: : the clang compiler does not support '-march=native'the clang compiler does not support '-march=native'

clang: error: the clang compiler does not support '-march=native'
clangclang: : errorerror: : the clang compiler does not support '-march=native'the clang compiler does not support '-march=native'

clang: error: the clang compiler does not support '-march=native'
clang: clang: error: the clang compiler does not support '-march=native'error
: the clang compiler does not support '-march=native'
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_reader.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_garbage.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_cache.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_builder.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/arena_wrapped_db_iter.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/cache.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/lru_cache.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/clock_cache.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_log_sequential_reader.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_addition.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_log_format.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/cache/sharded_cache.o] Error 1
make: *** [Release/obj.target/rocksdb/deps/rocksdb/rocksdb/db/blob/blob_file_meta.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/Cellar/node@12/12.22.1_1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/opt/homebrew/Cellar/node@12/12.22.1_1/bin/node" "/opt/homebrew/Cellar/node@12/12.22.1_1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/Code/local/rocksdb-sandbox/node_modules/rocksdb
gyp ERR! node -v v12.22.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN rocksdb-sandbox@1.0.0 No description
npm WARN rocksdb-sandbox@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rocksdb@5.0.0 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rocksdb@5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2021-05-29T16_13_55_051Z-debug.log
Code/local/rocksdb-sandbox
❯

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions