rust-openssl / rust-openssl/rust-openssl
Cross Compile to x86_64-linux-android
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 841
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 4
Description
I am trying to cross compile OpenSSL on Windows x64 targeting x86_64-linux-android using cargo build --target=x86_64-linux-android. However, during the compilation process, the path for the mysys Perl installation inside of the OpenSSL make file is being overridden with a Windows-style path, leading to an invalid path and a compiler crash.
Issue:
When using cargo to build a project that depends on OpenSSL for the target x86_64-linux-android, the mysys Perl path is incorrectly being replaced with a Windows-style path, causing the compiler to fail to locate the Perl executable.
Steps to Reproduce:
Note: Only replicatable in a Windows Environment.
- Install the
x86_64-linux-androidtarget for Rust. - Install msys or any other UNIX compatable Perl.
- Target the correct version of Perl inside .cargo/config.toml.
- Create a simple Rust project that depends on OpenSSL.
- Run
cargo build --target=x86_64-linux-android.
Expected Behavior:
The compiler should correctly locate and use the mysys Perl installation at the specified path.
Actual Behavior:
The mysys Perl path is overridden with a Windows-style path, which results in the compiler failing to find the Perl executable and crashing.
Environment:
- Windows x64
- Rust toolchain: rustc 1.79.0 (129f3b996 2024-06-10)
- OpenSSL version: [Specify your OpenSSL version here]
mysysPerl installation: [Specify the path to yourmysysPerl installation here]
Log Output:
--- stderr
/usr/bin/sh: line 1: C:msys64usrbinperl.exe: command not found
make: *** [Makefile:2906: builddata.pm] Error 127
thread 'main' panicked at C:\Users\PFG346\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-300.3.1+3.3.1\src\lib.rs:621:9:
I believe this issue is related to the cross-compilation environment not correctly handling the mysys Perl path.
I would appreciate any guidance on how to resolve this issue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows cross-compilation command with the target version of Perl configured in .cargo/config.toml. Inspect Makefile:2906 and openssl-src.../src/lib.rs:621, where the failing command is reported. Done means the Perl path remains valid for x86_64-linux-android and cargo build completes without the compiler crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100