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 and link with openssl statically #178

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Build and link with openssl statically #178

merged 1 commit into from
Nov 26, 2024

Conversation

malor
Copy link
Member

@malor malor commented Nov 25, 2024

Dynamic linking with openssl does not work well with cross-compilation: the Docker image cross uses for aarch64 is based on Ubuntu Xenial that has libssl1.0.0, while the ones available on Raspbian (and other modern distros) are libssl1.1 and libssl3.

Instead, we can use the feature of openssl-sys that allows to build and statically link openssl to avoid the hassle with shared object versions that vary between Linux distros.

This makes Cross.toml completely unnecessary.

Dynamic linking with openssl does not work well with cross-compilation:
the Docker image `cross` uses for aarch64 is based on Ubuntu Xenial
that has libssl1.0.0, while the ones available on Raspbian (and other
modern distros) are libssl1.1 and libssl3.

Instead, we can use the feature of `openssl-sys` that allows to build
and statically link openssl to avoid the hassle with shared object
versions that vary between Linux distros.

This makes Cross.toml completely unnecessary.
@malor malor merged commit 8c7f829 into master Nov 26, 2024
8 checks passed
@malor malor deleted the cross branch November 26, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants