-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Experimental cygwin host support #15442
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
Comments
the plan is to wait for the last patch here to be merged & released, and then do a PR to update all the dependencies in Cargo.lock/Cargo.toml at once? |
Yes. Just waiting for socket2. |
Can you provide for a cargo novice a patch that would let me try to build cargo on Cygwin? I know there is a way to replace a crate with a reference to git which should work for socket2 but I don't know how to do that or rustix required updates (I tried but it kept fighting me over wanting 0.x instead of 1.x) |
OK. diff --git a/Cargo.toml b/Cargo.toml
index 8348c65bb..edb893c1a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,7 +49,7 @@ flate2 = { version = "1.1.1", default-features = false, features = ["zlib-rs"] }
git2 = "0.20.0"
git2-curl = "0.21.0"
# When updating this, also see if `gix-transport` further down needs updating or some auth-related tests will fail.
-gix = { version = "0.71.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
+gix = { version = "0.72.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
glob = "0.3.2"
handlebars = { version = "6.3.1", features = ["dir_source"] }
hex = "0.4.3"
@@ -255,7 +255,7 @@ cargo-test-support.workspace = true
gix = { workspace = true, features = ["revision"] }
# When building Cargo for tests, a safety-measure in `gix` needs to be disabled
# to allow sending credentials over HTTP connections.
-gix-transport = { version = "0.46.0", features = ["http-client-insecure-credentials"] }
+gix-transport = { version = "0.47.0", features = ["http-client-insecure-credentials"] }
same-file.workspace = true
snapbox.workspace = true
@@ -276,3 +276,6 @@ all-static = ['vendored-openssl', 'curl/static-curl', 'curl/force-system-lib-on-
[lints]
workspace = true
+
+[patch.'crates-io']
+socket2 = { git = "https://github.com/rust-lang/socket2.git", branch = "v0.5.x" } Apply the patch and run |
Local patch applied by Cygwin OpenSSL maintainer to test release; see Test: openssl 3.0.16-2, mingw64-{i686,x86_64}-openssl-3.0.16-2 and |
Have you confirmed Cargo links to OpenSSL DLL? There are some flags that rustc might use to avoid depending on system shared objects: Lines 272 to 276 in 8d17219
|
Yes, it was a bit of a mess getting everything to link in my hack "cross-compile" configuration but it did finally work: PATH="/cygdrive/v/rust/w:/cygdrive/d/test/msys64/clang64/bin:$PATH" \
PKG_CONFIG_SYSROOT_DIR="v:/cygllvm/cygwin64" \
PKG_CONFIG="$(cygpath -w /usr/bin/pkgconf.exe)" \
LIBGIT2_NO_VENDOR=1 \
OPENSSL_DIR="$(cygpath -w /usr)" \
OPENSSL_LIB_DIR="$(cygpath -w /usr/lib)" \
OPENSSL_STATIC=0 \
DESTDIR="$(cygpath -w "$PWD/build-Cygwin/dest-rust")" \
python x.py install --stage 2 and having an exe wrapper curl-config.exe in v:/rust/w (since /usr/bin/curl-config on Cygwin is a shell script)
|
Closes #15442 Closes #15468 Closes #15469 r? @weihanglo cc @jeremyd2019
Uh oh!
There was an error while loading. Please reload this page.
I have built
cargo
targeting MSYS2(cygwin) successfully, and found it needs some patches. This is the tracking issue.The text was updated successfully, but these errors were encountered: