ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.64k stars 3.27k forks source link

yarn install fails on m1 mac #5011

Closed alexreyes closed 1 year ago

alexreyes commented 1 year ago

Describe the bug After cloning the repo, I tried running yarn install and it fails everytime.

To Reproduce

On an M1 mac:

1) Clone the monorepo 2) run yarn install inside the monorepo

Expected behavior The install succeeds

Screenshots If applicable, add screenshots to help explain your problem.

Full error message:

warning Error running install script for optional dependency: "/Users/hack/Local/optimism/node_modules/node-hid: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /Users/hack/Local/optimism/node_modules/node-hid
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.19.1 runtime=node arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.19.1 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at \"/Library/Developer/CommandLineTools/usr/bin/python3\"
(node:32829) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/node-hid/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Library/Caches/node-gyp/16.19.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/hack/Library/Caches/node-gyp/16.19.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/hack/Library/Caches/node-gyp/16.19.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/hack/Local/optimism/node_modules/node-hid',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
  LIBTOOL-STATIC Release/hidapi.a
env: python: No such file or directory
make: *** [Release/hidapi.a] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command \"/Users/hack/.nvm/versions/node/v16.19.1/bin/node\" \"/Users/hack/Local/optimism/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/hack/Local/optimism/node_modules/node-hid
[21/21] ⠂ leveldown
[-/21] ⠂ waiting...
[-/21] ⠂ waiting...
[-/21] ⠂ waiting...
error /Users/hack/Local/optimism/node_modules/leveldown: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments: 
Directory: /Users/hack/Local/optimism/node_modules/leveldown
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.19.1 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
(node:33150) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/leveldown/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Library/Caches/node-gyp/16.19.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/hack/Library/Caches/node-gyp/16.19.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/hack/Library/Caches/node-gyp/16.19.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/hack/Local/optimism/node_modules/leveldown',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o
In file included from ../deps/leveldb/leveldb-1.20/db/builder.cc:7:
In file included from ../deps/leveldb/leveldb-1.20/db/filename.h:14:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_impl.o
In file included from ../deps/leveldb/leveldb-1.20/db/db_impl.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/db_impl.h:10:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_iter.o
In file included from ../deps/leveldb/leveldb-1.20/db/db_iter.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/db_iter.h:10:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/filename.o
In file included from ../deps/leveldb/leveldb-1.20/db/filename.cc:7:
In file included from ../deps/leveldb/leveldb-1.20/db/filename.h:14:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/dbformat.o
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.cc:6:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_reader.o
In file included from ../deps/leveldb/leveldb-1.20/db/log_reader.cc:9:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_writer.o
In file included from ../deps/leveldb/leveldb-1.20/db/log_writer.cc:9:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/memtable.o
In file included from ../deps/leveldb/leveldb-1.20/db/memtable.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/memtable.h:10:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/repair.o
In file included from ../deps/leveldb/leveldb-1.20/db/repair.cc:28:
In file included from ../deps/leveldb/leveldb-1.20/db/db_impl.h:10:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/table_cache.o
In file included from ../deps/leveldb/leveldb-1.20/db/table_cache.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/table_cache.h:12:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_edit.o
In file included from ../deps/leveldb/leveldb-1.20/db/version_edit.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/version_edit.h:11:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_set.o
In file included from ../deps/leveldb/leveldb-1.20/db/version_set.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/db/version_set.h:21:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/write_batch.o
In file included from ../deps/leveldb/leveldb-1.20/db/write_batch.cc:19:
In file included from ../deps/leveldb/leveldb-1.20/db/dbformat.h:14:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.o
In file included from ../deps/leveldb/leveldb-1.20/helpers/memenv/memenv.cc:9:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix_sse.o
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix_sse.cc:14:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block.o
In file included from ../deps/leveldb/leveldb-1.20/table/block.cc:13:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block_builder.o
In file included from ../deps/leveldb/leveldb-1.20/table/block_builder.cc:35:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/filter_block.o
In file included from ../deps/leveldb/leveldb-1.20/table/filter_block.cc:8:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/format.o
In file included from ../deps/leveldb/leveldb-1.20/table/format.cc:8:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/iterator.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/merger.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table.o
In file included from ../deps/leveldb/leveldb-1.20/table/table.cc:16:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table_builder.o
In file included from ../deps/leveldb/leveldb-1.20/table/table_builder.cc:15:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/two_level_iterator.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/arena.o
In file included from ../deps/leveldb/leveldb-1.20/util/arena.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/util/arena.h:12:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/bloom.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/cache.o
In file included from ../deps/leveldb/leveldb-1.20/util/cache.cc:10:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/coding.o
In file included from ../deps/leveldb/leveldb-1.20/util/coding.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/comparator.o
In file included from ../deps/leveldb/leveldb-1.20/util/comparator.cc:9:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/crc32c.o
In file included from ../deps/leveldb/leveldb-1.20/util/crc32c.cc:12:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/filter_policy.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/hash.o
In file included from ../deps/leveldb/leveldb-1.20/util/hash.cc:6:
In file included from ../deps/leveldb/leveldb-1.20/util/coding.h:17:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/logging.o
In file included from ../deps/leveldb/leveldb-1.20/util/logging.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/util/logging.h:14:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/options.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/status.o
In file included from ../deps/leveldb/leveldb-1.20/util/status.cc:6:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix.o
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.cc:5:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env_posix.o
In file included from ../deps/leveldb/leveldb-1.20/util/env_posix.cc:24:
In file included from ../deps/leveldb/leveldb-1.20/port/port.h:16:
In file included from ../deps/leveldb/leveldb-1.20/port/port_posix.h:47:
../deps/leveldb/leveldb-1.20/port/atomic_pointer.h:59:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
  OSMemoryBarrier();
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:750:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void    OSMemoryBarrier( void );
        ^
1 warning generated.
  LIBTOOL-STATIC Release/leveldb.a
env: python: No such file or directory
make: *** [Release/leveldb.a] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command "/Users/hack/.nvm/versions/node/v16.19.1/bin/node" "/Users/hack/Local/optimism/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/hack/Local/optimism/node_modules/leveldown

System Specs:

Additional context

Things I've tried:

yarn clean 
yarn build
yarn install
roninjin10 commented 1 year ago

Can you run node --version

alexreyes commented 1 year ago

@roninjin10 Ah shoot, I just realized I was previously using node v16.19.1. I just ran nvm use and switched to v16.16.0.

It seems(?) to work now. I get a long error warning for node-hid. Digging a bit deeper, it seems to be an optional dependency for ethers. Is this a problem, or expected?

➜  optimism git:(develop) yarn install  
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @babel/eslint-parser@7.18.2" has unmet peer dependency "@babel/core@>=7.11.0".
warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
warning " > eslint-plugin-jsdoc@35.5.1" has incorrect peer dependency "eslint@^6.0.0 || ^7.0.0".
warning " > eslint-plugin-promise@5.2.0" has incorrect peer dependency "eslint@^7.0.0".
warning " > eslint-plugin-react@7.24.0" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7".
warning " > @eth-optimism/contracts@0.5.40" has unmet peer dependency "ethers@^5".
warning " > @eth-optimism/sdk@1.10.4" has unmet peer dependency "ethers@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @defi-wonderland/smock@2.0.2" has unmet peer dependency "@ethersproject/abi@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @defi-wonderland/smock@2.0.2" has unmet peer dependency "@nomiclabs/ethereumjs-vm@^4".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/abi@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/bytes@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/providers@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has unmet peer dependency "@ethersproject/abi@^5.4.7".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has unmet peer dependency "@ethersproject/providers@^5.4.7".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has incorrect peer dependency "hardhat@^2.9.9".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/fault-detector > @defi-wonderland/smock@2.0.7" has unmet peer dependency "@ethersproject/abi@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/fault-detector > @defi-wonderland/smock@2.0.7" has unmet peer dependency "@ethersproject/abstract-signer@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/sdk > typedoc@0.22.13" has incorrect peer dependency "typescript@4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > hardhat-deploy > zksync-web3@0.4.0" has incorrect peer dependency "ethers@~5.5.0".
[4/4] 🔨  Building fresh packages...
[-/21] ⢀ waiting...
[-/21] ⢀ waiting...
[11/21] ⢀ node-hid
[13/21] ⢀ keccak
warning Error running install script for optional dependency: "/Users/hack/Local/optimism/node_modules/node-hid: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /Users/hack/Local/optimism/node_modules/node-hid
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.16.0 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.16.0 | darwin | x64
gyp info find Python using Python version 3.9.6 found at \"/Library/Developer/CommandLineTools/usr/bin/python3\"
(node:58118) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/node-hid/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/hack/Library/Caches/node-gyp/16.16.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/hack/Library/Caches/node-gyp/16.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/hack/Library/Caches/node-gyp/16.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/hack/Local/optimism/node_modules/node-hid',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
  LIBTOOL-STATIC Release/hidapi.a
env: python: No such file or directory
make: *** [Release/hidapi.a] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command \"/Users/hack/.nvm/versions/node/v16.16.0/bin/node\" \"/Users/hack/Local/optimism/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/hack/Local/optimism/node_modules/node-hid
$ patch-package
patch-package 6.4.7
Applying patches...
No patch files found
$ husky install
husky - Git hooks installed
✨  Done in 19.20s.
roninjin10 commented 1 year ago

Yup I got an M1 too and this node hid issue tends to happen on many repos. I've gotten it to go away before via doing something with python3 but I forgot exactly what I did. The error is completely benign though.

Closing this for now let us know if you have any further issues

jcstein commented 1 year ago

I've gotten it to go away before via doing something with python3 but I forgot exactly what I did

have faced this before myself on an M2, but can't remember how I fixed it either