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

[BUG] yarn fails to run cmake-js (on fresh setup) #2842

Closed
3 tasks done
tycode opened this issue Jul 31, 2023 · 4 comments · Fixed by #2915
Closed
3 tasks done

[BUG] yarn fails to run cmake-js (on fresh setup) #2842

tycode opened this issue Jul 31, 2023 · 4 comments · Fixed by #2915
Labels
bug Something isn't working

Comments

@tycode
Copy link

tycode commented Jul 31, 2023

Code of conduct

Self-training on how to write a bug report

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

yarn install --frozen-lockfile results in the following error:

$ yarn install --frozen-lockfile
yarn install v1.22.19
[1/6] Validating package.json...
[2/6] Resolving packages...
warning Lockfile has incorrect entry for "dmg-builder@22.8.0". Ignoring it.
[3/6] Fetching packages...
[4/6] Linking dependencies...
warning " > mic-recorder-to-mp3@2.2.2" has unmet peer dependency "webrtc-adapter@>=4.1.1".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > styled-components@5.1.1" has unmet peer dependency "react-is@>= 16.8.0".
warning " > postcss-loader@7.0.2" has unmet peer dependency "postcss@^7.0.0 || ^8.0.1".
warning " > tslint-microsoft-contrib@6.0.0" has incorrect peer dependency "typescript@^2.1.0 || ^3.0.0".
[5/6] Building fresh packages...
[1/9] ⡀ better-sqlite3
[2/9] ⡀ dtrace-provider
[3/9] ⡀ libsession_util_nodejs
[6/9] ⡀ electron
error /home/rob/src/session-desktop/node_modules/libsession_util_nodejs: Command failed.
Exit code: 1
Command: cmake-js compile --runtime=electron --runtime-version=17.4.10 -p16
Arguments: 
Directory: /home/rob/src/session-desktop/node_modules/libsession_util_nodejs
Output:




^C

(it outputted several blank lines at the end and then stalled with 0% CPU usage, so I decided to ctrl-c it.)

Expected Behavior

The command should succeed, and following the instructions given in CONTRIBUTING.md should result in a working build.

Steps To Reproduce

Using Debian 12.

To my knowledge there was nothing to do with nodejs on this system beforehand, other than any possible results of apt install nodejs npm yarnpkg and subsequently removing and purging those packages when I found out that session-desktop won't work with node 18.

For context: I'm new to Electron, nvm, yarn, but not new to programming or Linux sysadmin.

Get nvm:

mkdir ~/src
cd ~/src
git clone https://github.com/nvm-sh/nvm.git
cd nvm
git checkout 8fbf8ab6943d0bcb402773c3c2b30c2f103d7fa2  # this is v0.39.4

Activate nvm:

export NVM_DIR="$HOME/src/nvm"
cd "$NVM_DIR"
. nvm.sh
. bash_completion

Get session-desktop:

cd ~/src
git clone https://github.com/oxen-io/session-desktop.git
cd session-desktop
git checkout 448c9dc14bd64eebae03676e360bf78ae2a54920  # this is v1.11.0

Get required node version:

nvm install

Install yarn:

npm -g install yarn

Build and run session-desktop:

yarn install --frozen-lockfile  # this command fails with the above mentioned error
#yarn build-everything  # not run
#yarn start-prod  # not run

Desktop Version

v1.11.0

Anything else?

No response

@tycode tycode added the bug Something isn't working label Jul 31, 2023
@tycode
Copy link
Author

tycode commented Aug 1, 2023

This appears to be a regression in v1.11.0. I was able to build v1.10.8 without issue.

@Bilb
Copy link
Collaborator

Bilb commented Sep 8, 2023

Hey, this all seems correct to me. I'll give it a go in a debian 12 VM to see what's wrong.

@Bilb
Copy link
Collaborator

Bilb commented Sep 8, 2023

Seems like the issue is that cmake-js is only a wrapper around cmake. And cmake is already installed on CI and our current machine

Could you try to:

sudo apt install cmake build-essential
 # build-essential is not needed for you but I'll add it to the readme as it fails if g++ is not there.
cd ~/src/session-desktop
yarn install --frozen-lockfile

@Bilb
Copy link
Collaborator

Bilb commented Sep 8, 2023

Also, the 1.11.0 commit is almost 2 months old. I'd recommend using the e0be4267c7b58da4233757516f208b4df4f2f671 which is 1.11.2.
You'd need to do a few extra steps as a lot has changed since then

cd ~/src/session-desktop
nvm install
nvm use
npm install -g yarn
yarn install --frozen
#...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants