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

Cross-compilation under Nix is broken since #229 #235

Closed
link2xt opened this issue Mar 4, 2024 · 0 comments · Fixed by #236
Closed

Cross-compilation under Nix is broken since #229 #235

link2xt opened this issue Mar 4, 2024 · 0 comments · Fixed by #236

Comments

@link2xt
Copy link
Contributor

link2xt commented Mar 4, 2024

#229 changed build scripts in a way that breaks builds of vendored OpenSSL under Nix.

On Linux I worked around by switching to statically built OpenSSL from nixpkgs: deltachat/deltachat-core-rust#5316

But for Windows platform this did not work.

Log failure when trying to build vendored OpenSSL for Windows:

2024-03-04T21:38:46.8132887Z        > error: failed to run custom build command for `openssl-sys v0.9.101`
2024-03-04T21:38:46.8133558Z        >
2024-03-04T21:38:46.8133860Z        > Caused by:
2024-03-04T21:38:46.8135115Z        >   process didn't exit successfully: `/build/dummy-src/target/release/build/openssl-sys-60fc2e3a843f5bde/build-script-main` (exit status: 101)
2024-03-04T21:38:46.8136334Z        >   --- stdout
2024-03-04T21:38:46.8136991Z        >   cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_GNU_OPENSSL_NO_VENDOR
2024-03-04T21:38:46.8137750Z        >   X86_64_PC_WINDOWS_GNU_OPENSSL_NO_VENDOR unset
2024-03-04T21:38:46.8138433Z        >   cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
2024-03-04T21:38:46.8139002Z        >   OPENSSL_NO_VENDOR unset
2024-03-04T21:38:46.8139428Z        >
2024-03-04T21:38:46.8139760Z        >   --- stderr
2024-03-04T21:38:46.8141194Z        >   thread 'main' panicked at /nix/store/nqxnkxrqi9zx3zd60slbvg6pnyiprysv-crates-io-dependencies/openssl-src-300.2.3+3.2.1-5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843/src/lib.rs:648:13:
2024-03-04T21:38:46.8143424Z        >   can't copy symlink "/nix/store/nqxnkxrqi9zx3zd60slbvg6pnyiprysv-crates-io-dependencies/openssl-src-300.2.3+3.2.1-5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843/openssl/README.md"
2024-03-04T21:38:46.8144799Z        >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-03-04T21:38:46.8145448Z        > warning: build failed, waiting for other jobs to finish...
2024-03-04T21:38:46.8145980Z        > [naersk] cargo returned with exit code 101, exiting
link2xt added a commit to deltachat/deltachat-core-rust that referenced this issue Mar 5, 2024
OpenSSL 3.2 build currently fails under Nix
so we cannot build deltachat-rpc-server releases:
<alexcrichton/openssl-src-rs#235>
link2xt added a commit to deltachat/deltachat-core-rust that referenced this issue May 30, 2024
Previously OpenSSL was pinned due to problems
with Zig toolchain used back then
and then not unpinned even after switching from Zig to Nix
due to <alexcrichton/openssl-src-rs#235>.
The problem should be fixed now
and we can try to unpin OpenSSL again.
link2xt added a commit to deltachat/deltachat-core-rust that referenced this issue May 30, 2024
Previously OpenSSL was pinned due to problems
with Zig toolchain used back then
and then not unpinned even after switching from Zig to Nix
due to <alexcrichton/openssl-src-rs#235>.
The problem should be fixed now
and we can try to unpin OpenSSL again.
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

Successfully merging a pull request may close this issue.

1 participant