guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
143 stars 7 forks source link

Missing libssl.so after installing via NPM #168

Closed zachsa closed 1 year ago

zachsa commented 1 year ago

On Ubuntu 22. (WSL), Installing chomp via the NPM wrapper results in a startup error:

$ node --version
v19.8.1
$ npm --version
9.5.1
$ npm install -g chomp
$ chomp --version
/home/<user>/.nvm/versions/node/v19.8.1/lib/node_modules/chomp/vendor/chomp: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
zachsa commented 1 year ago

Installing libssl v1 seems to work

wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz
tar -xzvf openssl-1.1.1c.tar.gz
cd openssl-1.1.1c
./config
make
sudo make install
export LD_LIBRARY_PATH="/usr/local/lib"
zachsa commented 1 year ago

Any update on this? I think downgrading openssl has broken some of my Python 3.10.6 scripts

guybedford commented 1 year ago

@zachsa it's probably advisable to use the cargo install chompbuild version in this case?

zachsa commented 1 year ago

That makes my environment just a little more complicated as I have to have Rust/Cargo installed. Why would installing via Cargo result in Rust using a different version of openssl? (Does this question make sense - correct me if it doesn't!)

guybedford commented 1 year ago

Seems this is a common issue - https://github.com/sfackler/rust-openssl/issues/183.

Looks like this approach for static linking libssl might be a fix - https://github.com/TheWaWaR/simple-http-server/pull/78.

I have no more time than that to think about this problem, sorry.

zachsa commented 1 year ago

I tested this again after upgrading to openssl 3 - seems to have resolved itself. No idea why

canadaduane commented 1 year ago

Seeing this on Pop!_OS as well:

duane@rosie:~/Projects/credit$ ./node_modules/.bin/chomp --help
/home/duane/Projects/credit/node_modules/.pnpm/chomp@0.2.14/node_modules/
  chomp/vendor/chomp: error while loading shared libraries: libssl.so.1.1:
    cannot open shared object file: No such file or directory

If I have time in the next week I will try to take a look at fixing.

canadaduane commented 1 year ago

Any thoughts on what went wrong with the build?

guybedford commented 1 year ago

Yeah there was a botched release build due to that env include. We should test the release build as well I think to avoid this in future. Fixed it and stamping a 0.2.16 to resolve the release workflow issue.

guybedford commented 1 year ago

Finally got the release working in 0.2.17.