ponyup
ponyup copied to clipboard
Document ponyup macOS/brew libressl connection
#117 was caused by this.
macOS, it's all dynamic linking.
brew install libressl will periodically change the version it installs as they switch to a newer version of libressl. This is rare, but does happen. When that happens, older versions of ponyup will stop working once libressl is updated.
We need to document the expected error that users would see and tell them to reinstall ponyup via the init script as that will download the most recent nightly version. Within 24 hours of a libressl change, it will work again.
This also means, that eventually if they update to a different version of ponyup, that it might be using a different libressl than they have installed and will fail.
Tried to install ponyup on macOS now and it failed because of wrong libressl version.
I first installed libressl using homebrew:
brew install libressl
I install ponyup using:
sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.sh)"
I got the following error log:
ponyup placed in /Users/erlend/Library/ponyup/bin
setting default platform to arm64-apple-darwin
dyld[88470]: Library not loaded: /opt/homebrew/opt/libressl/lib/libssl.53.dylib
Referenced from: <9BB14E24-27D0-3A5D-9B8A-58C337BC8E1A> /Users/erlend/Library/ponyup/bin/ponyup
Reason: tried: '/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/usr/local/lib/libssl.53.dylib' (no such file), '/usr/lib/libssl.53.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/usr/local/lib/libssl.53.dylib' (no such file), '/usr/lib/libssl.53.dylib' (no such file, not in dyld cache)
zsh: abort sh -c
I noticed in that folder i had a different libssl version libssl.55.dylib.
I've set the following env parameters in .zshrc
# pony
export PATH=$PATH:/Users/erlend/Library/ponyup/bin
export PATH=$PATH:/Users/erlend/.local/share/ponyup/bin
# libressl
export PATH="/opt/homebrew/opt/libressl/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/libressl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libressl/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/libressl/lib/pkgconfig"
@erf - Can you run those first two commands again to make sure you're using the latest versions (as of today) of both libressl and ponyup, and if it still fails for you, let us know?
Right now we're assuming that you had this problem because you happened to install in the 24 hour period in which the latest ponyup nightly had not yet been built to match the latest libressl version. If that assumption is correct, it should be working for you now after you update. Please let us know.
Tried to run the brew upgrade/install and ponyup commands and i get the same error message:
downloading ponyup-arm64-apple-darwin.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 269k 100 269k 0 0 1013k 0 --:--:-- --:--:-- --:--:-- 1027k
checksum ok
ponyup placed in /Users/erlend/Library/ponyup/bin
setting default platform to arm64-apple-darwin
dyld[70088]: Library not loaded: /opt/homebrew/opt/libressl/lib/libssl.53.dylib
Referenced from: <9BB14E24-27D0-3A5D-9B8A-58C337BC8E1A> /Users/erlend/Library/ponyup/bin/ponyup
Reason: tried: '/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/opt/homebrew/opt/libressl/lib/libssl.53.dylib' (no such file), '/usr/local/lib/libssl.53.dylib' (no such file), '/usr/lib/libssl.53.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/opt/homebrew/Cellar/libressl/3.8.2/lib/libssl.53.dylib' (no such file), '/usr/local/lib/libssl.53.dylib' (no such file), '/usr/lib/libssl.53.dylib' (no such file, not in dyld cache)
zsh: abort sh -c
Ah I see the issue here. We don't support arm64 anymore with a prebuilt. You'll need to build from source.
I see. This makes tooling on all new mac's (a very popular platform) less convenient. I tried building from source, but then llvm was added as a git submodule and installed which seem to take a very long time (even though i have it installed as a homebrew package).
@erf I'm going to hide this conversation as it isn't germane to the ticket. If you'd like to discuss more details about this, please pop into the Zulip and we can chat.