node-datachannel: Fail to install on Ubuntu 22 LTS
Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-1025-aws aarch64) Node v19.9.0
npm ERR! code 137
npm ERR! path /home/ubuntu/node_modules/node-datachannel
npm ERR! command failed
npm ERR! command sh -c prebuild-install || (npm install --ignore-scripts --production=false && npm run _prebuild)
npm ERR! prebuild-install WARN install libcrypto.so.1.1: cannot open shared object file: No such file or directory
npm ERR! npm WARN config production Use `--omit=dev` instead.
npm ERR! Killed
But when I run
openssl version
yields
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
Why do I need openssl-1.1.1 ?
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 1
- Comments: 21 (10 by maintainers)
@marcus-pousette Could you please try the new binary? https://github.com/murat-dogan/node-datachannel/releases/download/v0.5.6-dev/node-datachannel-v0.5.6-dev-napi-v8-linux-arm64.tar.gz
We have 2 different situations/problems here. Let’s divide this into 2 issues to not cause confusion.
Mac M1 OpenSSL static build - #229
Linux arm64 OpenSSL static build - #230
Could you please follow up there?
$> ldd node_datachannel.nodeThis command should also give the dynamic library list on Mac.This is the result for linux. It must be something like that.
I tried to build it with actions, it also built somehow 😃
Could you please check the result and actions? https://github.com/murat-dogan/node-datachannel/actions
Could you download the binary and test it? https://github.com/murat-dogan/node-datachannel/releases/tag/v0.5.6-dev
@SgtPooki Thank you.
What I see from logs is you have OpenSSL v3 installed. So It will build also with it happily.
But the problem is we are building it as dynamically linked against OpenSSL. From cmake file we need to modify these lines (as you did); https://github.com/murat-dogan/node-datachannel/blob/a07715d4a13c89e1a79b0bad54b2490beb999ce5/CMakeLists.txt#L27-L30
To be sure I created a new branch with required changes. So Just clone the branch and try to build it.
https://github.com/murat-dogan/node-datachannel/tree/arm64-static-openssl
This is github ci file I am using; https://github.com/murat-dogan/node-datachannel/blob/arm64-static-openssl/.github/workflows/build-mac-m1.yml
@murat-dogan i’d be interested in helping figure out a way to not fallback to openssl1.1 for M1 builds. Can you guide me a little bit on what the process would look like?
I cloned the repo and ran
npm i && npm run buildand things build fine locally. Attached are build and test logs:build-log.txt test-log.txt
I modified CMakeLists.txt as follows:
and got the following build log output with
rm -rf build prebuilds tmp && npm run build &> build-log-edited.txt. it seems to build fine?build-log-edited.txt
I’m happy to help if you have time to provide some guidance 😃
Hello,
As I replied here https://github.com/murat-dogan/node-datachannel/issues/178#issuecomment-1688914544; For arm64 openssl linked as a shared library. Unfortunately we need the right version to run.
Please Check here; https://github.com/murat-dogan/node-datachannel/blob/c8197e28b39fd81f55818c0301995414fa877ff9/CMakeLists.txt#L27
I dont have a arm64 PC so I can not test more. If anyone can find a solution for that I will be happy to merge it.