Skip to content

Update civetweb to 1.10 #13

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

Closed
wants to merge 2 commits into from
Closed

Conversation

kureuil
Copy link
Contributor

@kureuil kureuil commented Nov 1, 2017

I've updated the civetweb dependency to version 1.10 in order to fix the compile error on macOS introduced in version 1.9.

This release deprecated the uri field in the MgRequest structure but this didn't seem to affect either the tests nor the crates.io tests.

Fixes #12

Fixes recently introduced compile errors on macOS.
@kureuil kureuil mentioned this pull request Nov 1, 2017
3 tasks
@jtgeibel
Copy link

jtgeibel commented Nov 3, 2017

Just to clarify, I'm getting the linking error I mentioned in #12 on this branch as well. Rust is linking with cc which reports its version as cc (Ubuntu 7.2.0-8ubuntu3) 7.2.0.

@jtgeibel
Copy link

jtgeibel commented Nov 4, 2017

I think this is due to the switch to cmake. If I use the old build script from 0.9.1 (git checkout ec2341c2 civet-sys/build.rs) then this branch builds and passes tests on my machine.

@jtgeibel
Copy link

jtgeibel commented Nov 4, 2017

I'm able to get this building by switching to the cc crate, which should work on Windows as well. Would you give it a test @kureuil?

diff --git a/civet-sys/Cargo.toml b/civet-sys/Cargo.toml
index 950633f..81c7863 100644
--- a/civet-sys/Cargo.toml
+++ b/civet-sys/Cargo.toml
@@ -14,4 +14,4 @@ name = "civet_sys"
 path = "lib.rs"
 
 [build-dependencies]
-cmake = "0.1"
+cc = "1"
diff --git a/civet-sys/build.rs b/civet-sys/build.rs
index 5c8cd08..2f4a06b 100644
--- a/civet-sys/build.rs
+++ b/civet-sys/build.rs
@@ -1,14 +1,8 @@
-extern crate cmake;
-
-use cmake::Config;
+extern crate cc;
 
 fn main() {
-    let mut dst = Config::new("civetweb")
-                         .define("CMAKE_BUILD_TYPE", "Release")
-                         .define("BUILD_TESTING", "OFF")
-                         .define("CIVETWEB_ALLOW_WARNINGS", "ON")
-                         .build();
-    dst.push("lib");
-    println!("cargo:rustc-link-search=native={}", dst.display());
-    println!("cargo:rustc-link-lib=static=civetweb");
+    cc::Build::new()
+        .file("civetweb/src/civetweb.c")
+        .include("civetweb/include")
+        .compile("civetweb");
 }

@kureuil
Copy link
Contributor Author

kureuil commented Nov 16, 2017

Closed. See #14.

@kureuil kureuil closed this Nov 16, 2017
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.

Can't build civet-sys 0.2.0 on macos :(
2 participants