-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
Use pkgconfig for cross-compiling to a -pc-windows-gnu target #1984
Comments
Yeah at this point I don't think that restriction makes sense, and we should allow pkg-config on windows. Ideally we'd remove the PKG_CONFIG_ALLOW_CROSS setting as well, but I imagine that'd be breaking. |
I'm pretty sure This environment variable was also added to Following these recommendations of using
Changing
Using
Using
|
Heh that PR is ... 7 years old at this point, so a bit of a stretch to remember specific context like this. That being said IIRC at the time mingw was not really at the point where this would "just work" for most folks, and instead it mostly caused things to not work. I recall that at the time by default |
No worries. Cross-compiles are broken-by-default unless you set up There's no such restriction for other types of cross-compiles, so it seems pretty arbitrary at this point. At this point, it sounds like there are no objections to dropping that check entirely, so I'll look at a way to make sure this path is tested properly so it can be dropped. |
After fiddling with the CI a bit, it looks like the rust-openssl/.github/workflows/ci.yml Line 209 in 0f0bbe4
So #1991 will just remove that restriction without touching CI. |
Some notes on the state of Windows builds for when someone comes across this in 7 years' time 😉 :
|
Using
pkgconfig
for-pc-windows-gnu
targets on non-Windows hosts is currently blocked:rust-openssl/openssl-sys/build/find_normal.rs
Lines 201 to 209 in 8909d3e
It looks like it was originally entirely blocked on Windows in d465f6c
This was then changed to allow it for
windows-gnu
from awindows
host: 43c951f#diff-b088de9b758aec6c173f92e9216ce8ce9597855d542a5d95d14b526d9259f334R140There's probably a reason for this... but I don't know what, and this was a few years ago... so may not be needed anymore?
If the block on non-Windows hosts was removed:
Then it's possible to use a
vcpkg
-provided OpenSSL installation on a non-Windows host:It may also be possible to use Linux distributions'
lib*-mingw-w64
packages (example), if they packaged OpenSSL.Separately to this, I'm trying to unblock using
vcpkg-rs
on-pc-windows-gnu
targets, but that's blocked on a few other things right now.The text was updated successfully, but these errors were encountered: