Closed gmaclennan closed 2 years ago
This error is caused by node-gyp
being used for the rebuild of leveldown rather than the nodejs-mobile-gyp
fork.
This happens when node-gyp
is installed as a dependency at the root of the project (vs. being installed under src/backend
).
node-gyp
is built-in to npm
and within an npm command node-gyp
will reference the internal version or the version specified by the npm_config_node_gyp
environment variable. However sometimes packages ship node-gyp
as a dependency.
In the normal build process, the gradle.build
for nodejs-mobile sets the npm_config_node_gyp
environment variable to specify the path to node-gyp
. The build script also sets the correct environment variables that ensure the correct configuration flags are passed to the compiler, then calls npm rebuild
on the folder nodejs-assets/nodejs-project
.
The leveldown
rebuild script uses node-gyp-build
for its build process. This module detects if node-gyp
is installed locally and if it is, uses that instead of the global node-gyp
(which would then spawn our nodejs-mobile-gyp
command because of the use of the npm_config_node_gyp
environment variable).
Therefore, the cause of this problem is that if node-gyp
is installed at the top-level of the Mapeo Mobile repo (e.g. as a transitive dep) then node-gyp-build
(used by leveldown
for rebuilds) will detect it and use it for the rebuild, ignoring the nodejs-mobile-react-native
config that would normally override the node-gyp
command to use nodejs-mobile-gyp
. As a result the compiler is not configured with the correct flags to build for android, and the build fails.
Possible solutions:
node-gyp
is never installed as a top-level transitive dependencynode-gyp-build
in src/backend/node_modules
to always use the node-gyp
global command rather than overriding it with a path to a locally installed node-gyp
(e.g. by commenting out bin.js#L21-L27)PS. in our case node-gyp
was being added at the top-level via installation of sqlite3
, because it is included as a peerDependency
and optionalDependency
. If it was necessary to keep sqlite3
as a top-level dep then another solution would be to always install with npm install --no-optional
or, alternatively, run a postinstall
script to remove node-gyp
from node_modules
.
Gradle builds of Mapeo Mobile (via
npm run android
) stopped working with an error during the:nodejs-mobile-react-native:BuildNpmModulesarm64-v8a
task.Log output: (click to expand)
``` > Task :nodejs-mobile-react-native:BuildNpmModulesarm64-v8a > leveldown@5.6.0 install /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown > node-gyp-build /Users/gregor/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o ../deps/leveldb/leveldb-1.20/db/builder.cc '-DNODE_GYP_MODULE_NAME=leveldb' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_ANDROID=1' '-D_REENTRANT=1' '-D_GLIBCXX_USE_C99_MATH' -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/include/node -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/src -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/config -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/openssl/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/uv/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/zlib -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/v8/include -I../deps/leveldb/leveldb-1.20 -I../deps/leveldb/leveldb-1.20/include -I../deps/snappy/linux -I../deps/snappy/snappy -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -arch arm64 -MMD -MF ./Release/.deps/Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o.d.raw -c /Users/gregor/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_impl.o ../deps/leveldb/leveldb-1.20/db/db_impl.cc '-DNODE_GYP_MODULE_NAME=leveldb' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_ANDROID=1' '-D_REENTRANT=1' '-D_GLIBCXX_USE_C99_MATH' -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/include/node -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/src -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/config -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/openssl/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/uv/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/zlib -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/v8/include -I../deps/leveldb/leveldb-1.20 -I../deps/leveldb/leveldb-1.20/include -I../deps/snappy/linux -I../deps/snappy/snappy -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -arch arm64 -MMD -MF ./Release/.deps/Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_impl.o.d.raw -c /Users/gregor/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_iter.o ../deps/leveldb/leveldb-1.20/db/db_iter.cc '-DNODE_GYP_MODULE_NAME=leveldb' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_ANDROID=1' '-D_REENTRANT=1' '-D_GLIBCXX_USE_C99_MATH' -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/include/node -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/src -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/config -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/openssl/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/uv/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/zlib -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/v8/include -I../deps/leveldb/leveldb-1.20 -I../deps/leveldb/leveldb-1.20/include -I../deps/snappy/linux -I../deps/snappy/snappy -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -arch arm64 -MMD -MF ./Release/.deps/Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_iter.o.d.raw -c ... [snip] ... /Users/gregor/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix.o ../deps/leveldb/leveldb-1.20/port/port_posix.cc '-DNODE_GYP_MODULE_NAME=leveldb' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_ANDROID=1' '-D_REENTRANT=1' '-D_GLIBCXX_USE_C99_MATH' -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/include/node -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/src -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/config -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/openssl/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/uv/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/zlib -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/v8/include -I../deps/leveldb/leveldb-1.20 -I../deps/leveldb/leveldb-1.20/include -I../deps/snappy/linux -I../deps/snappy/snappy -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -arch arm64 -MMD -MF ./Release/.deps/Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix.o.d.raw -c /Users/gregor/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env_posix.o ../deps/leveldb/leveldb-1.20/util/env_posix.cc '-DNODE_GYP_MODULE_NAME=leveldb' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_ANDROID=1' '-D_REENTRANT=1' '-D_GLIBCXX_USE_C99_MATH' -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/include/node -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/src -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/config -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/openssl/openssl/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/uv/include -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/zlib -I/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/deps/v8/include -I../deps/leveldb/leveldb-1.20 -I../deps/leveldb/leveldb-1.20/include -I../deps/snappy/linux -I../deps/snappy/snappy -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -arch arm64 -MMD -MF ./Release/.deps/Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env_posix.o.d.raw -c rm -f Release/leveldb.a && ./gyp-mac-tool filter-libtool libtool -static -o Release/leveldb.a Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_impl.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_iter.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/filename.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/dbformat.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_reader.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_writer.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/memtable.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/repair.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/table_cache.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_edit.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_set.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/write_batch.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix_sse.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block_builder.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/filter_block.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/format.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/iterator.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/merger.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table_builder.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/two_level_iterator.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/arena.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/bloom.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/cache.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/coding.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/comparator.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/crc32c.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/filter_policy.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/hash.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/logging.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/options.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/status.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix.o Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env_posix.o > Task :nodejs-mobile-react-native:BuildNpmModulesarm64-v8a FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings 3 actionable tasks: 3 executed npm info it worked if it ends with ok npm verb cli [ npm verb cli '/Users/gregor/.fnm/node-versions/v12.16.3/installation/bin/node', npm verb cli '/Users/gregor/.fnm/node-versions/v12.16.3/installation/bin/npm', npm verb cli '--verbose', npm verb cli 'rebuild', npm verb cli '--build-from-source' npm verb cli ] npm info using npm@6.14.4 npm info using node@v12.16.3 npm info readInstalled object npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project', npm verb rebuild 'mapeo-mobile-node@1.0.0' npm verb rebuild ] npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/napi-macros', npm verb rebuild 'napi-macros@2.0.0' npm verb rebuild ] npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/node-gyp-build', npm verb rebuild 'node-gyp-build@4.2.3' npm verb rebuild ] npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown', npm verb rebuild 'leveldown@5.6.0' npm verb rebuild ] npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/node_modules/abstract-leveldown', npm verb rebuild 'abstract-leveldown@6.2.3' npm verb rebuild ] npm verb rebuild path, id [ npm verb rebuild '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/node_modules/node-gyp-build', npm verb rebuild 'node-gyp-build@4.1.1' npm verb rebuild ] npm info build /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/napi-macros npm info lifecycle napi-macros@2.0.0~preinstall: napi-macros@2.0.0 npm info linkStuff napi-macros@2.0.0 npm info lifecycle napi-macros@2.0.0~install: napi-macros@2.0.0 npm info lifecycle napi-macros@2.0.0~postinstall: napi-macros@2.0.0 npm info build /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/node-gyp-build npm info lifecycle node-gyp-build@4.2.3~preinstall: node-gyp-build@4.2.3 npm info linkStuff node-gyp-build@4.2.3 npm verb linkBins [ npm verb linkBins { npm verb linkBins 'node-gyp-build': 'bin.js', npm verb linkBins 'node-gyp-build-optional': 'optional.js', npm verb linkBins 'node-gyp-build-test': 'build-test.js' npm verb linkBins }, npm verb linkBins '/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/.bin', npm verb linkBins false npm verb linkBins ] npm info lifecycle node-gyp-build@4.2.3~install: node-gyp-build@4.2.3 npm info lifecycle node-gyp-build@4.2.3~postinstall: node-gyp-build@4.2.3 npm info build /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown npm info lifecycle leveldown@5.6.0~preinstall: leveldown@5.6.0 npm info linkStuff leveldown@5.6.0 npm verb rebuildBundles [ 'abstract-leveldown', 'node-gyp-build' ] npm info lifecycle leveldown@5.6.0~install: leveldown@5.6.0 gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli '/Users/gregor/.fnm/node-versions/v12.16.3/installation/bin/node', gyp verb cli '/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/node-gyp/bin/node-gyp.js', gyp verb cli 'rebuild' gyp verb cli ] gyp info using node-gyp@8.4.1 gyp info using node@12.16.3 | darwin | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb find Python Python is not set from command line or npm configuration gyp verb find Python Python is not set from environment variable PYTHON gyp verb find Python checking if "python3" can be used gyp verb find Python - executing "python3" to get executable path gyp verb find Python - executable path is "/Users/gregor/.pyenv/versions/3.9.1/bin/python3" gyp verb find Python - executing "/Users/gregor/.pyenv/versions/3.9.1/bin/python3" to get version gyp verb find Python - version is "3.9.1" gyp info find Python using Python version 3.9.1 found at "/Users/gregor/.pyenv/versions/3.9.1/bin/python3" gyp verb get node dir compiling against specified --nodedir dev files: /Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/ gyp verb build dir attempting to create "build" dir: /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/build gyp verb build dir "build" dir needed to be created? No gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/build/config.gypi gyp verb config.gypi checking for gypi file: /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/config.gypi gyp verb common.gypi checking for gypi file: /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/common.gypi gyp verb gyp gyp format was not specified; forcing "make" gyp info spawn /Users/gregor/.pyenv/versions/3.9.1/bin/python3 gyp info spawn args [ gyp info spawn args '/Users/gregor/Dev/DdDev/mapeo-mobile/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/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/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/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/', gyp info spawn args '-Dnode_gyp_dir=/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/$(Configuration)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/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 verb command build [] gyp verb build type Release gyp verb architecture arm64 gyp verb node dev dir /Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/nodejs-mobile-react-native/android/libnode/ gyp verb `which` succeeded for `make` /usr/bin/make gyp info spawn make gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ] error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/builder.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_impl.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/db_iter.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/filename.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/dbformat.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_reader.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/log_writer.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/memtable.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/repair.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/table_cache.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_edit.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/version_set.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/db/write_batch.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix_sse.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/block_builder.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/filter_block.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/format.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/iterator.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/merger.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/table_builder.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/table/two_level_iterator.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/arena.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/bloom.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/cache.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/coding.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/comparator.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/crc32c.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/filter_policy.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/hash.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/logging.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/options.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/status.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/port/port_posix.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/leveldb/deps/leveldb/leveldb-1.20/util/env_posix.o is not an object file (not allowed in a library) make: *** [Release/leveldb.a] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:310:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 20.6.0 gyp ERR! command "/Users/gregor/.fnm/node-versions/v12.16.3/installation/bin/node" "/Users/gregor/Dev/DdDev/mapeo-mobile/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/gregor/Dev/DdDev/mapeo-mobile/android/build/nodejs-native-assets-temp-build/nodejs-native-assets-arm64-v8a/nodejs-project/node_modules/leveldown gyp ERR! node -v v12.16.3 gyp ERR! node-gyp -v v8.4.1 gyp ERR! not ok ```
The main error seems to be during the leveldown rebuild process: