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

Can't build hyper from sources in Ubuntu linux gyp: name 'openssl_fips' is not defined #6385

Open
mwoz123 opened this issue Mar 14, 2022 · 2 comments

Comments

@mwoz123
Copy link
Contributor

mwoz123 commented Mar 14, 2022

  • [x ] I am on the latest Hyper.app version
  • [ x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Ubuntu linux 20.04
  • Hyper.app version: git cloned master
  • Link of a Gist with the contents of your .hyper.js:
  • Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):
  • The issue is reproducible in vanilla Hyper.app:

Issue

Can't build from sources in Ubuntu. Log:

marcin@pc:~/workspace/hyper$ yarn
yarn install v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
success Already up-to-date.
$ webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target --parents "node_modules/**/*" "../app/" && husky install
hyper-app:
  assets by path keymaps/*.json 4.49 KiB
    asset keymaps/darwin.json 1.57 KiB [compared for emit] [from: app/keymaps/darwin.json] [copied]
    asset keymaps/linux.json 1.52 KiB [compared for emit] [from: app/keymaps/linux.json] [copied]
    asset keymaps/win32.json 1.4 KiB [compared for emit] [from: app/keymaps/win32.json] [copied]
  assets by path static/*.png 10.5 KiB
    asset static/icon96x96.png 5.72 KiB [compared for emit] [from: app/static/icon96x96.png] [copied]
    asset static/icon.png 4.78 KiB [compared for emit] [from: app/static/icon.png] [copied]
  assets by path *.json 1.21 KiB
    asset package.json 1020 bytes [compared for emit] [from: app/package.json] [copied]
    asset tsconfig.json 224 bytes [compared for emit] [from: app/tsconfig.json] [copied]
  asset yarn.lock 37 KiB [compared for emit] [from: app/yarn.lock] [copied]
  asset index.html 836 bytes [compared for emit] [from: app/index.html] [copied]
  asset ignore_this.js 84 bytes [compared for emit] (name: main)
  ./app/index.ts 1 bytes [built] [code generated]
  hyper-app (webpack 5.70.0) compiled successfully in 212 ms
  • electron-builder  version=22.14.13
  • loaded configuration  file=/home/marcin/workspace/hyper/electron-builder.json
  • installing production dependencies  platform=linux arch=x64 appDir=/home/marcin/workspace/hyper/target
  ⨯ /snap/node/6001/bin/node exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Error output:
warning " > @electron/[email protected]" has unmet peer dependency "electron@>= 13.0.0".
error /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/snap/node/6001/lib/node_modules/npm/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   '/home/marcin/workspace/hyper/target/node_modules/native-process-working-directory/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/marcin/.electron-gyp/17.1.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/marcin/.electron-gyp/17.1.2',
gyp info spawn args   '-Dnode_gyp_dir=/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/marcin/.electron-gyp/17.1.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/marcin/workspace/hyper/target/node_modules/native-process-working-directory',
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: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
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 Linux 5.13.0-35-generic
gyp ERR! command "/snap/node/6001/bin/node" "/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory
gyp ERR! node -v v17.7.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
  failedTask=installAppDeps stackTrace=Error: /snap/node/6001/bin/node exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Error output:
warning " > @electron/[email protected]" has unmet peer dependency "electron@>= 13.0.0".
error /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/snap/node/6001/lib/node_modules/npm/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   '/home/marcin/workspace/hyper/target/node_modules/native-process-working-directory/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/marcin/.electron-gyp/17.1.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/marcin/.electron-gyp/17.1.2',
gyp info spawn args   '-Dnode_gyp_dir=/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/marcin/.electron-gyp/17.1.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/marcin/workspace/hyper/target/node_modules/native-process-working-directory',
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: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
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 Linux 5.13.0-35-generic
gyp ERR! command "/snap/node/6001/bin/node" "/snap/node/6001/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/marcin/workspace/hyper/target/node_modules/native-process-working-directory
gyp ERR! node -v v17.7.1
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               at ChildProcess.<anonymous> (/home/marcin/workspace/hyper/node_modules/builder-util/src/util.ts:250:14)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1090:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
marcin@pc:~/workspace/hyper$ 
@mwoz123 mwoz123 changed the title Can't build hyper from sources in Ubuntu linux ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Can't build hyper from sources in Ubuntu linux gyp: name 'openssl_fips' is not defined Mar 21, 2022
@nardoor
Copy link

nardoor commented Mar 31, 2022

Hello @mwoz123

I faced the same issue and wokred around it by changing the node version I use.

For instance I used node v16.x (to match the version used in the CI workflow) but I assume any version other than 17.x should work around this.

# if you use nvm
nvm install 16

This github issue seems to be closely related with nodejs/node-gyp#2534.

@mwoz123
Copy link
Contributor Author

mwoz123 commented Apr 6, 2022

Thanks @nardoor - node 16 works :)

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

2 participants