Skip to content

Fails to build on arm64 #2

Description

@sparist

Although this package is Windows-specific, there is no easy way in NPM to enable platform-specific dependencies. Instead, node-eventlog should handle non-Windows platforms without breaking.

Here is the error log when building on Raspberry Pi, which is an ARM64 Linux system:

> node-eventlog@1.0.2 install /home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog
605> node-pre-gyp install --fallback-to-build --target_arch=x64 --target_platform=win32
606node-pre-gyp WARN Using request for node-pre-gyp https download 
607  SOLINK_MODULE(target) Release/obj.target/node-eventlog.node
608g++: error: unrecognized command-line option ‘-m64’
609make[4]: *** [node-eventlog.target.mk:22: Release/obj.target/node-eventlog.node] Error 1
610gyp ERR! build error 
611gyp ERR! stack Error: `make` failed with exit code: 2
612gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
613gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
614gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
615gyp ERR! System Linux 5.15.0-1015-raspi
616gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--target_arch=x64" "--target_platform=win32" "--module=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2/node-eventlog.node" "--module_name=node-eventlog" "--module_path=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=2" "--node_napi_label=napi-v2"
617gyp ERR! cwd /home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog
618gyp ERR! node -v v14.20.1
619gyp ERR! node-gyp -v v5.1.0
620gyp ERR! not ok 
621node-pre-gyp ERR! build error 
622node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --target_arch=x64 --target_platform=win32 --module=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2/node-eventlog.node --module_name=node-eventlog --module_path=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2 --napi_version=8 --node_abi_napi=napi --napi_build_version=2 --node_napi_label=napi-v2' (1)
623node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
624node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
625node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
626node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
627node-pre-gyp ERR! System Linux 5.15.0-1015-raspi
628node-pre-gyp ERR! command "/usr/bin/node" "/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--target_arch=x64" "--target_platform=win32"
629node-pre-gyp ERR! cwd /home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog
630node-pre-gyp ERR! node -v v14.20.1
631node-pre-gyp ERR! node-pre-gyp -v v0.17.0
632node-pre-gyp ERR! not ok 
633Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --target_arch=x64 --target_platform=win32 --module=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2/node-eventlog.node --module_name=node-eventlog --module_path=/home/gitlab-runner/builds/1yUs8yoP/0/Distributed-Compute-Protocol/dcp-native/artifacts/node/dcp-service/node_modules/node-eventlog/lib/binding/napi-v2 --napi_version=8 --node_abi_napi=napi --napi_build_version=2 --node_napi_label=napi-v2' (1)
634npm ERR! code ELIFECYCLE
635npm ERR! errno 1
636npm ERR! node-eventlog@1.0.2 install: `node-pre-gyp install --fallback-to-build --target_arch=x64 --target_platform=win32`
637npm ERR! Exit status 1
638npm ERR! 
639npm ERR! Failed at the node-eventlog@1.0.2 install script.
640npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
641npm ERR! A complete log of this run can be found in:
642npm ERR!     /home/gitlab-runner/.npm/_logs/2022-09-29T17_28_34_217Z-debug.log

A fix is forthcoming that disables the build on non-Windows systems and removes Windows-specific platform/architecture node-pre-gyp options.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions