Compiled on RPI3B with 6.1.25-piCore-v7 with 30G+ F2FS SD card partition and 8G swap partition I accidentally grabbed an older version (16.20.2), only to realize until everything is ready for upload. This note applies to both (16.20.2), (18.17.1) Reference: http://tinycorelinux.net/13.x/aarch64/tcz/src/node/compile-node.txt https://github.com/nodejs/build/issues/1677 https://forum.tinycorelinux.net/index.php?topic=19737.0 Compile Flags: Don't export compile flags globally Node has dropped support for armv6 cpus years ago, see reference above Dependencies: c-ares-dev clang icu73-dev libuv-dev lld llvm15-dev nghttp2-dev ninja openssl-dev python3.11 Commands: # LLVM settings # replace strip with llvm sudo ln -sfv /usr/local/bin/llvm-strip /usr/local/bin/strip # make sure /usr/local/bin/llvm-config is a binary sudo cp /tmp/tcloop/llvm15-dev/usr/local/bin/llvm-config /usr/local/bin/llvm-config # these files have hard-coded python #deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py #tools/gyp/pylib/gyp/generator/xcode.py #tools/v8_gypfiles/toolchain.gypi sudo ln -s /usr/local/bin/python3.11 /usr/local/bin/python # source wget https://github.com/nodejs/node/archive/refs/tags/v18.17.1.tar.gz mv v18.17.1.tar.gz node-18.17.1.tar.gz # (pi4 has enough memory to extract in /tmp, pi3 on the other hand ...) tar -xf node-18.17.1.tar.gz cd node-18.17.1/ patch -Np1 < /tmp/Favor4Size.patch patching file common.gypi patching file deps/llhttp/common.gypi patching file deps/uv/common.gypi patching file tools/v8_gypfiles/toolchain.gypi # There may be something left, clean the tar ball fisrt make distclean # variables export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export CC='clang' CFLAGS='-march=armv7 -mtune=cortex-a7' NEON32_CFLAGS='-mfpu=neon' export CXX='clang++' CXXFLAGS='-march=armv7 -mtune=cortex-a7' export LDFLAGS='-Wl,-rpath=/usr/local/lib -fuse-ld=lld' # armv7 ./configure \ --prefix=/usr/local --ninja --enable-lto --verbose --shared-cares --shared-libuv --shared-nghttp2 \ --shared-openssl --shared-zlib --with-intl=system-icu --with-arm-fpu=neon --with-arm-float-abi=hard nohup time make install -j4 DESTDIR=/tmp/packing-node &> /tmp/node-build-install.log & # continue without -j4 sudo cache-clear nohup time make install DESTDIR=/tmp/packing-node &> /tmp/node-build-install.log & # start packing cd /tmp/packing-node # This would take a while # find . -type f -exec file {} ';' > /tmp/file.info # grep ELF /tmp/file.info # apparently, ./usr/local/bin/node is the only ELF binary # 33.4M --> 25.3M (node-16.20.2) # 38.7M --> 30.0M (node-18.17.1) llvm-strip --strip-unneeded ./usr/local/bin/node ### (node-16.20.2) # remove links, use tce.install scripts to prevent errors ### (node-18.17.1) # found a better way without tce.install scripts, too lazy to touch the older ones # ./usr/local/bin/npm # ./usr/local/bin/npx # ./usr/local/bin/corepack ############### (node-16.20.2) # npm (there's a node.js.tcz on the repo, naming this package to 'node-npm' instead of 'npm' to prevent confusion) mkdir -p /tmp/packing-node-npm/usr/local/lib/node_modules/ mkdir -p /tmp/packing-node-npm/usr/local/bin/ mv ./usr/local/lib/node_modules/npm /tmp/packing-node-npm/usr/local/lib/node_modules/ mv ./usr/local/bin/npm /tmp/packing-node-npm/usr/local/bin/ mv ./usr/local/bin/npx /tmp/packing-node-npm/usr/local/bin/ # corepack (this is just a module, not the core) # https://nodejs.org/api/corepack.html mkdir -p /tmp/packing-node-corepack/usr/local/ mkdir -p /tmp/packing-node-corepack/usr/local/bin/ mv ./usr/local/lib/ /tmp/packing-node-corepack/usr/local/ mv ./usr/local/bin/corepack /tmp/packing-node-corepack/usr/local/bin/ # dev mkdir -p /tmp/packing-node-dev/usr/local/ mv ./usr/local/include /tmp/packing-node-dev/usr/local/ # tce.installed find /tmp/packing-n* -type l -exec unlink {} '; vi /tmp/packing-node-corepack/usr/local/tce.installed/node-corepack vi /tmp/packing-node-npm/usr/local/tce.installed/node-npm ############### (node-18.17.1) cd /tmp/packing-node find . -type l -exec unlink {} ';' # npm mkdir -p /tmp/packing-node-npm/usr/local/lib/node_modules/ mkdir -p /tmp/packing-node-npm/usr/local/bin/ ln -s /usr/local/bin/node /tmp/packing-node-npm/usr/local/bin/npm ln -s /usr/local/bin/node /tmp/packing-node-npm/usr/local/bin/npx # corepack mkdir -p /tmp/packing-node-corepack/usr/local/bin/ mv ./usr/local/lib/ /tmp/packing-node-corepack/usr/local/ ln -s /usr/local/lib/node_modules/corepack/dist/corepack.js /tmp/packing-node-corepack/usr/local/bin/corepack # dev mkdir -p /tmp/packing-node-dev/usr/local/ mv ./usr/local/include /tmp/packing-node-dev/usr/local/ # done, the rest is just info that might help for future build =========================================================================================================================== Node.js configure: Found Python 3.11.4... Detected clang C++ compiler (CXX=clang++) version: 15.0.7 Detected clang C compiler (CC=clang) version: 15.0.7 creating icu_config.gypi { 'target_defaults': { 'cflags': [], 'default_configuration': 'Release', 'defines': [ 'NODE_OPENSSL_CONF_NAME=nodejs_conf', 'ICU_NO_USER_DATA_OVERRIDE'], 'include_dirs': [ '/usr/local/include', '/usr/local/include', '/usr/local/include', '/usr/local/include', '/usr/local/include'], 'libraries': [ '-lz', '-L/usr/local/lib', '-luv', '-L/usr/local/lib', '-lcares', '-L/usr/local/lib', '-lnghttp2', '-L/usr/local/lib', '-lcrypto', '-lssl', '-L/usr/local/lib', '-licui18n', '-licuuc', '-licudata']}, 'variables': { 'arm_float_abi': 'hard', 'arm_fpu': 'neon', 'arm_thumb': 0, 'arm_version': '7', 'asan': 0, 'coverage': 'false', 'dcheck_always_on': 0, 'debug_nghttp2': 'false', 'debug_node': 'false', 'enable_lto': 'true', 'enable_pgo_generate': 'false', 'enable_pgo_use': 'false', 'error_on_warn': 'false', 'force_dynamic_crt': 0, 'host_arch': 'arm', 'icu_gyp_path': 'tools/icu/icu-system.gyp', 'icu_small': 'false', 'icu_ver_major': '73', 'is_debug': 0, 'libdir': 'lib', 'llvm_version': '15.0', 'napi_build_version': '9', 'node_builtin_shareable_builtins': [ 'deps/cjs-module-lexer/lexer.js', 'deps/cjs-module-lexer/dist/lexer.js', 'deps/undici/undici.js'], 'node_byteorder': 'little', 'node_debug_lib': 'false', 'node_enable_d8': 'false', 'node_enable_v8_vtunejit': 'false', 'node_fipsinstall': 'false', 'node_install_corepack': 'true', 'node_install_npm': 'true', 'node_library_files': [ 'lib/_http_agent.js', 'lib/_http_client.js', 'lib/_http_common.js', 'lib/_http_incoming.js', 'lib/_http_outgoing.js', 'lib/_http_server.js', 'lib/_stream_duplex.js', 'lib/_stream_passthrough.js', 'lib/_stream_readable.js', 'lib/_stream_transform.js', 'lib/_stream_wrap.js', 'lib/_stream_writable.js', 'lib/_tls_common.js', 'lib/_tls_wrap.js', 'lib/assert.js', 'lib/assert/strict.js', 'lib/async_hooks.js', 'lib/buffer.js', 'lib/child_process.js', 'lib/cluster.js', 'lib/console.js', 'lib/constants.js', 'lib/crypto.js', 'lib/dgram.js', 'lib/diagnostics_channel.js', 'lib/dns.js', 'lib/dns/promises.js', 'lib/domain.js', 'lib/events.js', 'lib/fs.js', 'lib/fs/promises.js', 'lib/http.js', 'lib/http2.js', 'lib/https.js', 'lib/inspector.js', 'lib/internal/abort_controller.js', 'lib/internal/assert.js', 'lib/internal/assert/assertion_error.js', 'lib/internal/assert/calltracker.js', 'lib/internal/async_hooks.js', 'lib/internal/blob.js', 'lib/internal/blocklist.js', 'lib/internal/bootstrap/browser.js', 'lib/internal/bootstrap/loaders.js', 'lib/internal/bootstrap/node.js', 'lib/internal/bootstrap/switches/does_not_own_process_state.js', 'lib/internal/bootstrap/switches/does_own_process_state.js', 'lib/internal/bootstrap/switches/is_main_thread.js', 'lib/internal/bootstrap/switches/is_not_main_thread.js', 'lib/internal/buffer.js', 'lib/internal/child_process.js', 'lib/internal/child_process/serialization.js', 'lib/internal/cli_table.js', 'lib/internal/cluster/child.js', 'lib/internal/cluster/primary.js', 'lib/internal/cluster/round_robin_handle.js', 'lib/internal/cluster/shared_handle.js', 'lib/internal/cluster/utils.js', 'lib/internal/cluster/worker.js', 'lib/internal/console/constructor.js', 'lib/internal/console/global.js', 'lib/internal/constants.js', 'lib/internal/crypto/aes.js', 'lib/internal/crypto/certificate.js', 'lib/internal/crypto/cfrg.js', 'lib/internal/crypto/cipher.js', 'lib/internal/crypto/diffiehellman.js', 'lib/internal/crypto/ec.js', 'lib/internal/crypto/hash.js', 'lib/internal/crypto/hashnames.js', 'lib/internal/crypto/hkdf.js', 'lib/internal/crypto/keygen.js', 'lib/internal/crypto/keys.js', 'lib/internal/crypto/mac.js', 'lib/internal/crypto/pbkdf2.js', 'lib/internal/crypto/random.js', 'lib/internal/crypto/rsa.js', 'lib/internal/crypto/scrypt.js', 'lib/internal/crypto/sig.js', 'lib/internal/crypto/util.js', 'lib/internal/crypto/webcrypto.js', 'lib/internal/crypto/webidl.js', 'lib/internal/crypto/x509.js', 'lib/internal/debugger/inspect.js', 'lib/internal/debugger/inspect_client.js', 'lib/internal/debugger/inspect_repl.js', 'lib/internal/dgram.js', 'lib/internal/dns/callback_resolver.js', 'lib/internal/dns/promises.js', 'lib/internal/dns/utils.js', 'lib/internal/dtrace.js', 'lib/internal/encoding.js', 'lib/internal/error_serdes.js', 'lib/internal/errors.js', 'lib/internal/event_target.js', 'lib/internal/file.js', 'lib/internal/fixed_queue.js', 'lib/internal/freelist.js', 'lib/internal/freeze_intrinsics.js', 'lib/internal/fs/cp/cp-sync.js', 'lib/internal/fs/cp/cp.js', 'lib/internal/fs/dir.js', 'lib/internal/fs/promises.js', 'lib/internal/fs/read_file_context.js', 'lib/internal/fs/recursive_watch.js', 'lib/internal/fs/rimraf.js', 'lib/internal/fs/streams.js', 'lib/internal/fs/sync_write_stream.js', 'lib/internal/fs/utils.js', 'lib/internal/fs/watchers.js', 'lib/internal/heap_utils.js', 'lib/internal/histogram.js', 'lib/internal/http.js', 'lib/internal/http2/compat.js', 'lib/internal/http2/core.js', 'lib/internal/http2/util.js', 'lib/internal/idna.js', 'lib/internal/inspector_async_hook.js', 'lib/internal/js_stream_socket.js', 'lib/internal/legacy/processbinding.js', 'lib/internal/linkedlist.js', 'lib/internal/main/check_syntax.js', 'lib/internal/main/environment.js', 'lib/internal/main/eval_stdin.js', 'lib/internal/main/eval_string.js', 'lib/internal/main/inspect.js', 'lib/internal/main/mksnapshot.js', 'lib/internal/main/print_help.js', 'lib/internal/main/prof_process.js', 'lib/internal/main/repl.js', 'lib/internal/main/run_main_module.js', 'lib/internal/main/single_executable_application.js', 'lib/internal/main/test_runner.js', 'lib/internal/main/watch_mode.js', 'lib/internal/main/worker_thread.js', 'lib/internal/mime.js', 'lib/internal/modules/cjs/helpers.js', 'lib/internal/modules/cjs/loader.js', 'lib/internal/modules/esm/assert.js', 'lib/internal/modules/esm/create_dynamic_module.js', 'lib/internal/modules/esm/fetch_module.js', 'lib/internal/modules/esm/formats.js', 'lib/internal/modules/esm/get_format.js', 'lib/internal/modules/esm/handle_process_exit.js', 'lib/internal/modules/esm/initialize_import_meta.js', 'lib/internal/modules/esm/load.js', 'lib/internal/modules/esm/loader.js', 'lib/internal/modules/esm/module_job.js', 'lib/internal/modules/esm/module_map.js', 'lib/internal/modules/esm/package_config.js', 'lib/internal/modules/esm/resolve.js', 'lib/internal/modules/esm/translators.js', 'lib/internal/modules/esm/utils.js', 'lib/internal/modules/package_json_reader.js', 'lib/internal/modules/run_main.js', 'lib/internal/net.js', 'lib/internal/options.js', 'lib/internal/per_context/domexception.js', 'lib/internal/per_context/messageport.js', 'lib/internal/per_context/primordials.js', 'lib/internal/perf/event_loop_delay.js', 'lib/internal/perf/event_loop_utilization.js', 'lib/internal/perf/nodetiming.js', 'lib/internal/perf/observe.js', 'lib/internal/perf/performance.js', 'lib/internal/perf/performance_entry.js', 'lib/internal/perf/resource_timing.js', 'lib/internal/perf/timerify.js', 'lib/internal/perf/usertiming.js', 'lib/internal/perf/utils.js', 'lib/internal/policy/manifest.js', 'lib/internal/policy/sri.js', 'lib/internal/priority_queue.js', 'lib/internal/process/esm_loader.js', 'lib/internal/process/execution.js', 'lib/internal/process/per_thread.js', 'lib/internal/process/policy.js', 'lib/internal/process/pre_execution.js', 'lib/internal/process/promises.js', 'lib/internal/process/report.js', 'lib/internal/process/signal.js', 'lib/internal/process/task_queues.js', 'lib/internal/process/warning.js', 'lib/internal/process/worker_thread_only.js', 'lib/internal/promise_hooks.js', 'lib/internal/querystring.js', 'lib/internal/readline/callbacks.js', 'lib/internal/readline/emitKeypressEvents.js', 'lib/internal/readline/interface.js', 'lib/internal/readline/promises.js', 'lib/internal/readline/utils.js', 'lib/internal/repl.js', 'lib/internal/repl/await.js', 'lib/internal/repl/history.js', 'lib/internal/repl/utils.js', 'lib/internal/socket_list.js', 'lib/internal/socketaddress.js', 'lib/internal/source_map/prepare_stack_trace.js', 'lib/internal/source_map/source_map.js', 'lib/internal/source_map/source_map_cache.js', 'lib/internal/stream_base_commons.js', 'lib/internal/streams/add-abort-signal.js', 'lib/internal/streams/buffer_list.js', 'lib/internal/streams/compose.js', 'lib/internal/streams/destroy.js', 'lib/internal/streams/duplex.js', 'lib/internal/streams/duplexify.js', 'lib/internal/streams/end-of-stream.js', 'lib/internal/streams/from.js', 'lib/internal/streams/lazy_transform.js', 'lib/internal/streams/legacy.js', 'lib/internal/streams/operators.js', 'lib/internal/streams/passthrough.js', 'lib/internal/streams/pipeline.js', 'lib/internal/streams/readable.js', 'lib/internal/streams/state.js', 'lib/internal/streams/transform.js', 'lib/internal/streams/utils.js', 'lib/internal/streams/writable.js', 'lib/internal/structured_clone.js', 'lib/internal/test/binding.js', 'lib/internal/test/transfer.js', 'lib/internal/test_runner/coverage.js', 'lib/internal/test_runner/harness.js', 'lib/internal/test_runner/mock.js', 'lib/internal/test_runner/reporter/dot.js', 'lib/internal/test_runner/reporter/spec.js', 'lib/internal/test_runner/reporter/tap.js', 'lib/internal/test_runner/reporter/v8-serializer.js', 'lib/internal/test_runner/runner.js', 'lib/internal/test_runner/test.js', 'lib/internal/test_runner/tests_stream.js', 'lib/internal/test_runner/utils.js', 'lib/internal/timers.js', 'lib/internal/tls/secure-context.js', 'lib/internal/tls/secure-pair.js', 'lib/internal/trace_events_async_hooks.js', 'lib/internal/tty.js', 'lib/internal/url.js', 'lib/internal/util.js', 'lib/internal/util/colors.js', 'lib/internal/util/comparisons.js', 'lib/internal/util/debuglog.js', 'lib/internal/util/inspect.js', 'lib/internal/util/inspector.js', 'lib/internal/util/iterable_weak_map.js', 'lib/internal/util/parse_args/parse_args.js', 'lib/internal/util/parse_args/utils.js', 'lib/internal/util/types.js', 'lib/internal/v8/startup_snapshot.js', 'lib/internal/v8_prof_polyfill.js', 'lib/internal/v8_prof_processor.js', 'lib/internal/validators.js', 'lib/internal/vm.js', 'lib/internal/vm/module.js', 'lib/internal/wasm_web_api.js', 'lib/internal/watch_mode/files_watcher.js', 'lib/internal/watchdog.js', 'lib/internal/webidl.js', 'lib/internal/webstreams/adapters.js', 'lib/internal/webstreams/compression.js', 'lib/internal/webstreams/encoding.js', 'lib/internal/webstreams/queuingstrategies.js', 'lib/internal/webstreams/readablestream.js', 'lib/internal/webstreams/transfer.js', 'lib/internal/webstreams/transformstream.js', 'lib/internal/webstreams/util.js', 'lib/internal/webstreams/writablestream.js', 'lib/internal/worker.js', 'lib/internal/worker/io.js', 'lib/internal/worker/js_transferable.js', 'lib/module.js', 'lib/net.js', 'lib/os.js', 'lib/path.js', 'lib/path/posix.js', 'lib/path/win32.js', 'lib/perf_hooks.js', 'lib/process.js', 'lib/punycode.js', 'lib/querystring.js', 'lib/readline.js', 'lib/readline/promises.js', 'lib/repl.js', 'lib/stream.js', 'lib/stream/consumers.js', 'lib/stream/promises.js', 'lib/stream/web.js', 'lib/string_decoder.js', 'lib/sys.js', 'lib/test.js', 'lib/test/reporters.js', 'lib/timers.js', 'lib/timers/promises.js', 'lib/tls.js', 'lib/trace_events.js', 'lib/tty.js', 'lib/url.js', 'lib/util.js', 'lib/util/types.js', 'lib/v8.js', 'lib/vm.js', 'lib/wasi.js', 'lib/worker_threads.js', 'lib/zlib.js'], 'node_module_version': 108, 'node_no_browser_globals': 'false', 'node_prefix': '/usr/local', 'node_release_urlbase': '', 'node_section_ordering_info': '', 'node_shared': 'false', 'node_shared_brotli': 'false', 'node_shared_cares': 'true', 'node_shared_http_parser': 'false', 'node_shared_libuv': 'true', 'node_shared_nghttp2': 'true', 'node_shared_nghttp3': 'false', 'node_shared_ngtcp2': 'false', 'node_shared_openssl': 'true', 'node_shared_zlib': 'true', 'node_tag': '', 'node_target_type': 'executable', 'node_use_bundled_v8': 'true', 'node_use_dtrace': 'false', 'node_use_etw': 'false', 'node_use_node_code_cache': 'true', 'node_use_node_snapshot': 'true', 'node_use_openssl': 'true', 'node_use_v8_platform': 'true', 'node_with_ltcg': 'false', 'node_without_node_options': 'false', 'openssl_is_fips': 'false', 'openssl_quic': 'false', 'ossfuzz': 'false', 'shlib_suffix': 'so.108', 'single_executable_application': 'true', 'target_arch': 'arm', 'v8_enable_31bit_smis_on_64bit_arch': 0, 'v8_enable_gdbjit': 0, 'v8_enable_hugepage': 0, 'v8_enable_i18n_support': 1, 'v8_enable_inspector': 1, 'v8_enable_javascript_promise_hooks': 1, 'v8_enable_lite_mode': 0, 'v8_enable_object_print': 1, 'v8_enable_pointer_compression': 0, 'v8_enable_shared_ro_heap': 1, 'v8_enable_webassembly': 1, 'v8_no_strict_aliasing': 1, 'v8_optimized_debug': 1, 'v8_promise_internal_field_count': 1, 'v8_random_seed': 0, 'v8_trace_maps': 0, 'v8_use_siphash': 1, 'want_separate_host_toolset': 0}} creating config.gypi creating config.status creating config.mk running: python tools/gyp_node.py --no-parallel -Dconfiguring_node=1 -Dbuild_type=Release -f ninja-linux INFO: configure completed successfully ====================================================================================================================================== # Failed attempts 1. # direct copy from aarch64 with the usual flags CFLAGS='-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp' CXXFLAGS='-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp' LDFLAGS='-Wl,-rpath=/usr/local/lib -Wl,-O1' export CFLAGS CXXFLAGS LDFLAGS # make -j4 # out of memory, build log gibberish # make -j3 malloc(): smallbin double linked list corrupted # make -j2 ../deps/v8/src/codegen/arm/assembler-arm.cc:179:2: error: #error "CAN_USE_ARMV7_INSTRUCTIONS should match CAN_USE_VFP3_INSTRUCTIONS" 179 | #error "CAN_USE_ARMV7_INSTRUCTIONS should match CAN_USE_VFP3_INSTRUCTIONS" | ^~~~~ 2. # no flags ./configure --prefix=/usr/local --ninja --enable-lto --verbose \ --shared-cares --shared-libuv --shared-nghttp2 \ --shared-openssl --shared-zlib --with-intl=system-icu ninja -j4 FAILED: obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o c++ -MMD -MF obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o.d -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DICU_NO_USER_DATA_OVERRIDE -DV8_GYP_BUILD -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -D__STDC_FORMAT_MACROS -DV8_TARGET_ARCH_ARM -DCAN_USE_ARMV7_INSTRUCTIONS -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX '-DV8_EMBEDDER_STRING="-node.26"' -DENABLE_DISASSEMBLER -DV8_PROMISE_INTERNAL_FIELD_COUNT=1 -DENABLE_MINOR_MC -DOBJECT_PRINT -DV8_INTL_SUPPORT -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ATOMIC_MARKING_STATE -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_USE_SIPHASH -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -I/usr/local/include -I../../deps/v8 -I../../deps/v8/include -Igen/inspector-generated-output-root -I../../deps/v8/third_party/inspector_protocol -Igen -Igen/generate-bytecode-output-root -I../../deps/v8/third_party/zlib -I../../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -mfpu=vfp -mfloat-abi=hard -marm -Os -flto=4 -fuse-linker-plugin -ffat-lto-objects -fno-omit-frame-pointer -fdata-sections -ffunction-sections -Os -fno-rtti -fno-exceptions -std=gnu++14 -fno-lto -c ../../deps/v8/src/regexp/regexp-compiler.cc -o obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o /tmp/ccVvoAx1.s: Assembler messages: /tmp/ccVvoAx1.s:5700: Error: selected processor does not support `usat r0,#8,r0' in ARM mode 3. # with flags CC='clang' CFLAGS="-march=armv7 -mtune=cortex-a7" NEON32_CFLAGS="-mfpu=neon" make CC='clang -fuse-ld=lld' CFLAGS='-march=armv7 -mtune=cortex-a7' NEON32_CFLAGS='-mfpu=neon' export CC CFLAGS NEON32_CFLAGS CXX='clang++ -fuse-ld=lld' CXXFLAGS='-march=armv7 -mtune=cortex-a7 -mfpu=neon' ./configure --prefix=/usr/local --ninja --enable-lto --verbose \ --shared-cares --shared-libuv --shared-nghttp2 \ --shared-openssl --shared-zlib --with-intl=system-icu # ninja -j4 FAILED: obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o c++ -MMD -MF obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o.d -D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf -DICU_NO_USER_DATA_OVERRIDE -DV8_GYP_BUILD -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -D__STDC_FORMAT_MACROS -DV8_TARGET_ARCH_ARM -DCAN_USE_ARMV7_INSTRUCTIONS -DCAN_USE_VFP3_INSTRUCTIONS -DCAN_USE_VFP32DREGS -DCAN_USE_NEON -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX '-DV8_EMBEDDER_STRING="-node.26"' -DENABLE_DISASSEMBLER -DV8_PROMISE_INTERNAL_FIELD_COUNT=1 -DENABLE_MINOR_MC -DOBJECT_PRINT -DV8_INTL_SUPPORT -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ATOMIC_MARKING_STATE -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_USE_SIPHASH -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -I/usr/local/include -I../../deps/v8 -I../../deps/v8/include -Igen/inspector-generated-output-root -I../../deps/v8/third_party/inspector_protocol -Igen -Igen/generate-bytecode-output-root -I../../deps/v8/third_party/zlib -I../../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -mfpu=neon -mfloat-abi=hard -marm -Os -flto=4 -fuse-linker-plugin -ffat-lto-objects -fno-omit-frame-pointer -fdata-sections -ffunction-sections -Os -fno-rtti -fno-exceptions -std=gnu++14 -fno-lto -c ../../deps/v8/src/regexp/regexp-compiler.cc -o obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o /tmp/ccfGFmku.s: Assembler messages: /tmp/ccfGFmku.s:5700: Error: selected processor does not support `usat r0,#8,r0' in ARM mode 5. success builds, see flags above ## node 16.20.2 - build success real 21h 33m 56s user 48h 56m 48s sys 40m 58.58s ## node 18.17.1 - failed at the end with LTO, run out of memory [1543/1593] LINK mksnapshot FAILED: mksnapshot LLVM ERROR: out of memory Allocation failed real 15h 0m 44s user 44h 41m 09s sys 59m 33.95s # continue on a 64-kernel with 32-bit apps environment # forgot to link python3 to /usr/local/bin/python ninja -C out/Release ninja: Entering directory `out/Release' [1/51] LINK mksnapshot ... ... [46/51] ACTION node: reset_openssl_cnf_9b7a2d2290b02e76d66661df74749f56 FAILED: obj/deps/openssl/openssl.cnf cd ../../; python tools/copyfile.py ./deps/openssl/nodejs-openssl.cnf /mnt/mmcblk0p3/node-18.17.1/out/Release/obj/deps/openssl/openssl.cnf /bin/sh: python: not found [47/51] ACTION node: node_mksnapshot_9b7a2d2290b02e76d66661df74749f56 ninja: build stopped: subcommand failed. make: *** [Makefile:149: node] Error 1 Command exited with non-zero status 2 real 4h 2m 03s user 4h 10m 53s sys 0m 37.58s # after linking python [1/5] ACTION node: reset_openssl_cnf_9b7a2d2290b02e76d66661df74749f56 [2/5] STAMP obj/node.actions_rules_copies.stamp [3/5] CXX obj/src/node.node_main.o [4/5] CXX obj/gen/node.node_snapshot.o [5/5] LINK node if [ ! -r node ] || [ ! -L node ]; then ln -fs out/Release/node node; fi /usr/local/bin/python3.11 tools/install.py install '/tmp/packing-node' '/usr/local' ... real 1h 1m 31s user 1h 1m 23s sys 0m 7.07s