Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aio app init: wskdebug: optional dependency cpu-features install error #549

Open
shazron opened this issue Jun 6, 2022 · 2 comments
Open

Comments

@shazron
Copy link
Member

shazron commented Jun 6, 2022

Dependency Tree

$ npm ls cpu-features
└─┬ @openwhisk/wskdebug@1.4.0
  └─┬ dockerode@3.3.1
    └─┬ docker-modem@3.0.3
      └─┬ ssh2@1.10.0
        └── UNMET OPTIONAL DEPENDENCY cpu-features@0.0.4

Error

> cpu-features@0.0.4 install /Users/shaz/Desktop/tmp/test-1/node_modules/cpu-features
> node buildcheck.js > buildcheck.gypi && node-gyp rebuild

  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o
  CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o
  LIBTOOL-STATIC Release/cpu_features.a
env: python: No such file or directory
make: *** [Release/cpu_features.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/shaz/.nvm/versions/node/v14.19.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/shaz/.nvm/versions/node/v14.19.2/bin/node" "/Users/shaz/.nvm/versions/node/v14.19.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/shaz/Desktop/tmp/test-1/node_modules/cpu-features
gyp ERR! node -v v14.19.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

Repro Steps

  1. Install an app via aio app init
  2. Choose Standalone Application
  3. Uncheck Events and Web Assets

Investigation

python v2 is no longer installed with macOS 12.3 Monterey and greater: https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes#Python

Workaround

To get rid of this error, users have to either:

  1. install python v2 manually: https://www.python.org/downloads/release/python-2713/
  2. symlink an existing python@3 (may cause issues): https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf
  3. Configure their python for node-gyp (after installing python@3): https://github.com/nodejs/node-gyp#configuring-python-dependency

Fix

This has to be fixed via wskdebug, perhaps there is an update in their dependencies that will not require python 2.

@shazron shazron changed the title wskdebug: optional dependency cpu-features install error aio app init: wskdebug: optional dependency cpu-features install error Jun 6, 2022
@shazron
Copy link
Member Author

shazron commented Jun 6, 2022

Note: this is an optional dependency of ssh2 (via wskdebug), and doesn't affect wskdebug functionality AFAIK

@shazron
Copy link
Member Author

shazron commented Jun 6, 2022

Related: apache/openwhisk-wskdebug#113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant