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

Allow running pkg-config when targetting windows from non-windows hosts #1991

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

micolous
Copy link
Contributor

@micolous micolous commented Jul 6, 2023

FIxes #1984

Unfortunately, the cross-compile tests in CI don't actually use pkgconfig at all, because they set OPENSSL_DIR:

OPENSSL_DIR: /opt/openssl

Testing on a macOS host with PKG_CONFIG_PATH_x86_64_pc_windows_gnu pointing at a vcpkg-installed version of OpenSSL:

% CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=wine64 cargo test --target x86_64-pc-windows-gnu         
   Compiling openssl-sys v0.9.90 (~/rust-openssl/openssl-sys)
   Compiling openssl v0.10.55 (~/rust-openssl/openssl)
    Finished test [unoptimized + debuginfo] target(s) in 6.92s
     Running unittests src/lib.rs (~/rust-openssl/target/x86_64-pc-windows-gnu/debug/deps/openssl-48026ed6f097cb90.exe)
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000
preloader: Warning: failed to reserve range 0000000000010000-0000000000110000

running 370 tests
[snip]

test result: ok. 364 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 3.50s

@sfackler
Copy link
Owner

sfackler commented Jul 6, 2023

Thanks!

@sfackler
Copy link
Owner

sfackler commented Jul 6, 2023

I realized right after merging that we'll want slightly different logic but it should still cover your use case: 4d2379f

@micolous
Copy link
Contributor Author

micolous commented Jul 7, 2023

Yeah, that'll work too, thanks!

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 this pull request may close these issues.

Use pkgconfig for cross-compiling to a -pc-windows-gnu target
2 participants