Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCompilation problem #91
Comments
This comment has been minimized.
This comment has been minimized.
|
Windows CI is broken with the same error. It would be great if someone with access to a windows machine could give us a hand getting this up and running again. In the meantime, if you have installed jemalloc on windows yourself, you can use the |
This comment has been minimized.
This comment has been minimized.
|
I have access to a Windows machine. What is the appropriate C toolchain to install? I think it’s looking for
|
This comment has been minimized.
This comment has been minimized.
|
jemalloc itself can be built with both, this is It uses MSYS2 and defines:
|
This comment has been minimized.
This comment has been minimized.
|
After a round of
|
This comment has been minimized.
This comment has been minimized.
|
#95 should fix some path concatenation issues, but I don't know if you are getting there. Maybe you can try with that branch? There is a function in the build script that transforms the names of the windows targets before calling configure for some reason. |
This comment has been minimized.
This comment has been minimized.
|
It might be worth it to detect windows in the script, and depending on the target and toolchain, define inside the |
This comment has been minimized.
This comment has been minimized.
|
Same, with #95. |
This comment has been minimized.
This comment has been minimized.
|
@leonardo-m: If we could get your test code it'd reduce the barrier to entry for reproducing the problem even further! |
This comment has been minimized.
This comment has been minimized.
|
@ErichDonGubler AFAIK the library just doesn't build. That is:
should reproduce the issue on windows, pretty much independently of the windows target used. The appveyor build bots hit this and they use MSYS2, and we don't have travis-ci windows build bots yet, but i've played a bit with those and they all hit these issues under GIT BASH. This happens for all targets: |
This comment has been minimized.
This comment has been minimized.
|
Even with the With the
This is expected to fail on MSYS2 because it uses other POSIX APIs to be cross-platform. I'm not with the APIs exposed by |
This comment has been minimized.
This comment has been minimized.
Yes, the Looking at Is there a better way of doing this ?
That's weird - could you build with [0] on unixes' we ship a configure script in |
This comment has been minimized.
This comment has been minimized.
Well, okay, it might just be me that's wrong. By a large margin CMake has been the de-facto standard for cross-platform compilations I've seen, but I've only worked with more "modern" C/C++ codebases recently.
Would a few Output of
|
This comment has been minimized.
This comment has been minimized.
It is, there is an issue open about using CMake with jemalloc, but it is a non-trivial amount of work.
Yes, this is why we try to ship a configure (or more) that work on the hosts, so that
Sure, thanks! So one weird thing is this:
Some paths appear right, some use the |
This comment has been minimized.
This comment has been minimized.
|
@gnzlbg: Yeah, the same applies to |
This comment has been minimized.
This comment has been minimized.
|
@gnzlbg: I don't believe these paths are making a difference. I forced the paths to contain forward slashes with this patch: diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs
index 6909f96..d672ca9 100644
--- a/jemalloc-sys/build.rs
+++ b/jemalloc-sys/build.rs
@@ -298,7 +298,9 @@ fn main() {
cmd.arg(format!("--host={}", gnu_target(&target)));
cmd.arg(format!("--build={}", gnu_target(&host)));
- cmd.arg(format!("--prefix={}", out_dir.display()));
+ let mut out_dir_string = out_dir.display().to_string();
+ out_dir_string = out_dir_string.replace("\\", "/");
+ cmd.arg(format!("--prefix={}", out_dir_string));
run(&mut cmd);
...and now they print like this:
...but I'm getting the same compilation errors anyway -- that makes sense, since these are technically output folders and depend on a finished compilation first!
I doubt that this would make a meaningful difference for the |
This comment has been minimized.
This comment has been minimized.
|
So, to me, the real question is: why is |
This comment has been minimized.
This comment has been minimized.
note that jemalloc's own CI uses appveyor with MSYS2 (https://github.com/jemalloc/jemalloc/blob/dev/.appveyor.yml), and the only thing they do is |
This comment has been minimized.
This comment has been minimized.
|
@gnzlbg: So, I decided to take your suggestion and explore what upstream does with Appveyor. I've managed to make things compile and have eliminated all but one issue getting this to work on my fork's Appveyor -- I hope to have enough time in the next couple of days to resolve the issue and make a PR. :) |
This comment has been minimized.
This comment has been minimized.
|
I have managed to make |
This comment has been minimized.
This comment has been minimized.
|
@ErichDonGubler Sure, a PR that allows the |
leonardo-m commentedNov 5, 2018
I see that x86_64-pc-windows-gnu is supported, but when I try to use it in a test program I get the error messages (it can't find the specified file):
https://gist.github.com/rust-play/a29bb45bd2e6077616d1a5256072d4fb