-
Notifications
You must be signed in to change notification settings - Fork 18
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
OpenSSL not working with cross-installed Perl version #14
Comments
This is a known limitation, unfortunately (unless if we can patch things). We're not running natively on a Windows system, and so we need to use Strawberry Perl to handle Windows paths correctly when running our scripts through Wine, but this has other limitations (like Unix paths, unfortunately). If you know any solution, I would love to hear it. You can try removing these 3 lines and see if it works: cross-toolchains/docker/Dockerfile.x86_64-pc-windows-msvc-cross Lines 20 to 22 in 971e8bb
We might want to have flexible aliases for perl that depend on the path: so you can choose which perl (Unix or Windows paths) you want to use for a specific application. If you can use a pre-built OpenSSL version from MXE rather than the vendored one, that would be great, but I understand that not every crate exposes the vendored feature of their dependencies and this may well be impossible without forking every dependency yourself. Feedback is very much so appreciated. |
If I remove the perl lines, unfortunately it just gives me the opposite error about Windows paths. And then forcing a build either passes cl the gcc flags, or tries to find nmake. I kind of get the sense that OpenSSL wasn't meant to be cross-compiled to MSVC. |
is it possible to conditionally switch perl between windows and unix paths, i.e via a env var? either that or
sounds good |
This would be probably need a custom entrypoint then to set the path. Something like: #!/usr/bin/env bash
if [[ "${CROSS_WINDOWS_PERL}" == 1 ]]; then
export PATH=/path/to/strawberry:"${PATH}"
fi
exec main "${@}" It still wouldn't fix the issue above (if anyone knows a Perl that handles both Unix and Windows paths, I would love to know), but it would a nice enhancement. |
To compile openssl-src for msvc targets, you should follow things below (At least it works for me):
Some openssl related issues: |
@Emilgardis I think we can close it because I have already fixed the cc-rs crate. |
Ah yes! Thank you for resolving it! |
When I attempt to build dfinity/sdk for Windows using
x86_64-pc-windows-msvc-cross:local
, I getThis appears to be the correct version of Perl, but OpenSSL is still not detecting it.
(Is this even a problem with cross-toolchains? Should I post this on the OpenSSL repo instead?)
The text was updated successfully, but these errors were encountered: