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 Compile to x86_64-linux-android #2263

Open
cyokenn opened this issue Jul 10, 2024 · 0 comments
Open

Cross Compile to x86_64-linux-android #2263

cyokenn opened this issue Jul 10, 2024 · 0 comments

Comments

@cyokenn
Copy link

cyokenn commented Jul 10, 2024

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.

  1. Install the x86_64-linux-android target for Rust.
  2. Install msys or any other UNIX compatable Perl.
  3. Target the correct version of Perl inside .cargo/config.toml.
  4. Create a simple Rust project that depends on OpenSSL.
  5. 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]
  • mysys Perl installation: [Specify the path to your mysys Perl 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.

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