Skip to content

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:

https://github.com/sfackler/rust-openssl/blob/0f0bbe42bcfe817bb943e3ed36efee9a875c8458/.github/workflows/ci.yml#L209

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
Collaborator

sfackler commented Jul 6, 2023

Thanks!

@sfackler
Copy link
Collaborator

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