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

Build fails on MacOS #132

Open
fitzyjoe opened this issue Jul 29, 2024 · 0 comments
Open

Build fails on MacOS #132

fitzyjoe opened this issue Jul 29, 2024 · 0 comments

Comments

@fitzyjoe
Copy link
Contributor

fitzyjoe commented Jul 29, 2024

I was running ./scripts.sh all and at first it failed because of a call to declare -A

./scripts.sh: line 16: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

This is happening because MacOS ships with an old version of bash (3.2.57) because of a licensing issue. I upgraded to 5.2.26 with brew install bash, but I actually needed to edit my copy of scripts.sh and change the reference to /bin/bash to /opt/homebrew/bin/bash. Past the first hurdle!

The next problem is in openssl.dockerfile. It's doing a curl to download openssl. Unfortunately the URL has moved and it fails silently... so when I do this:

curl https://www.openssl.org/source/openssl-3.0.11.tar.gz

It returns a 301 with the new location: https://github.com:443/openssl/openssl/releases/download/openssl-3.0.11/openssl-3.0.11.tar.gz

I suggest making curl follow redirects with the --location argument, or updating the URL to the new one.

The next failure is in step 7 because there is no libssl.so.3 file.

0.278 ln: failed to create symbolic link '/lib/x86_64-linux-gnu/libssl.so.3': No such file or directory The file exists, but the path is different. I had to edit openssl.dockerfile to remove instances of "64" and "x86_64-linux-gnu" It looks like this for me:

ln -sf ${OUT_DIR}/lib/libssl.so.3 /lib/libssl.so.3
ln -sf ${OUT_DIR}/lib/libcrypto.so.3 /lib/libcrypto.so.3

Final obstacle.... when running the tests it is configured to use "journald" by default. I had to use "json-file" which I could do with an environment variable.

Builds and all tests pass now.

Cheers!

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

1 participant