Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upproblems building on windows with stable and syntex #281
Comments
This comment has been minimized.
|
Digging into it now. |
This comment has been minimized.
|
So the reason that it's compiling as a dylib is because it needs to be for nightly. I'm looking into if there's a way for me to conditionally set Since you're able to build by making sure |
This comment has been minimized.
|
I think I've got a fix upstream. Confirming that it doesn't break nightly usage. |
sgrif
closed this
in
f90217f
Apr 18, 2016
This comment has been minimized.
|
This has been fixed. Your app should compile fine if you point |
This comment has been minimized.
|
For completeness, these are the changes I made to get a working build without diff --git a/Cargo.toml b/Cargo.toml
index 6661653..d779718 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,13 +5,13 @@ authors = ["Sean Griffin <sean@seantheprogrammer.com>"]
build = "build.rs"
[build-dependencies]
-syntex = { version = "0.26.0", optional = true }
-diesel_codegen = { version = "0.5.0", default-features = false, features = ["postgres"] }
-dotenv_codegen = { version = "0.8.0", optional = true }
+syntex = { version = "0.31.0", optional = true }
+diesel_codegen = { git = "https://github.com/diesel-rs/diesel.git", default-features = false, features = ["postgres"] }
+dotenv_codegen = { git = "https://github.com/slapresta/rust-dotenv.git", optional = true }
[dependencies]
diesel = "0.5.0"
-diesel_codegen = { version = "0.5.0", default-features = false, features = ["postgres"] }
+diesel_codegen = { git = "https://github.com/diesel-rs/diesel.git", default-features = false, features = ["postgres"] }
dotenv = "0.8.0"
dotenv_macros = { version = "0.8.0", optional = true } |
This comment has been minimized.
cmsd2
commented
Apr 18, 2016
|
yep that works perfectly. thanks! |
cmsd2 commentedApr 18, 2016
i have both sqlite and postgres 64bit libs and bins on my path after a lot of messing about.
i'm using the 64bit stable gnu toolchain v1.8
i can't seem to compile diesel_demo using with-syntex and no default features.
the build.rs has a build dependency of pq-sys but doesn't add the pg_config's libdir to the link path.
i can get build.rs to build finally producing the build exe by ensuring the postgres lib dir is in the path.
but it's dynamically linked to diesel_codegen dll which is in the deps directory and not in the runtime path.
also the diesel_codegen dll is dynamically linked to the rust std library dll, which also isn't in the runtime path.
i figured that maybe it was because diesel_codegen links to libpq.dll so i tried generating a libpq.a with gendef and dlltool. i can't see any other dll deps like openssl.
i'm able to link statically i think to libpq.a now but cargo is still creating a diesel_codegen with crate-type=dylib and prefer-dynamic
got any tips?