Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix build under MSYS2/MINGW64 #54
Conversation
|
I'm mostly concerned about the upstream build system modifications. Have you talked to the JS team about these changes and issues? Reviewed 7 of 7 files at r1. makefile.cargo, line 49 [r1] (raw file): makefile.cargo, line 58 [r1] (raw file): Also this is the only difference in the two branches. Could we pull that out and then only have one all rule? mozjs/config/baseconfig.mk, line 34 [r1] (raw file): mozjs/config/external/icu/Makefile.in, line 30 [r1] (raw file): Comments from the review on Reviewable.io |
tschneidereit
commented
Sep 22, 2015
|
It'd be great if you could split these changes into upstreamable and hacky bits. Then we can take the former on mozilla-central and deal with the hacky bits later. It's not like we don't have build system hacks already. |
|
And rebase, please. |
|
Rebased and commits split out. The missing #! to milestone.py, and the allowing of msys make for mingw64/msys2 could be upstreamed. The latter patch would ideally need a reliable way of actually detecting MSYS2 -- mozilla-build currently has $MSYSTEM = MINGW32 for historical raisins, even though that's mostly a lie. The ICU changes are... correct, but it depends on what you're trying to accomplish. If we're trying to use mingw to create windows-style libraries, then they're not correct (we don't want lib* as a prefix). But if we're trying to make static libs, then they are. The right thing here might be to have an entirely separate platform config file that's something like mingw64-msys2, and then find a way to explicitly tell ICU to use that config. The makefile.cargo fixes are unfortunate, for the python change. But I couldn't find any way to get around it, given that the spidermonkey tree has its own copy of virtualenv.py that it really wants to use. |
adamncasey
commented
Oct 18, 2015
|
Would be nice to see this added soon, so servo on windows can move forward |
|
I'd like @metajack to look at the new changes, but he's out all week :/ |
|
I appreciate the extra comments in the weird spots. There are still two comments that appear unanswered. In makefile.cargo on line 49 there is a hardcoded path, which I asked if that was guaranteed to be there. In the icu makefile there seems to be a typo between "lib" and "libs" in the two branches. Is that intentional or an error? Reviewed 5 of 6 files at r2, 1 of 1 files at r3. build.rs, line 23 [r3] (raw file): Comments from the review on Reviewable.io |
The default install location is now hardcoded, along with a NATIVE_WIN32_PYTHON env var fallback. There's a message that gets printed if python can't be found using either of the two.
Intentional -- both branches are moving libraries that have an "s" prefix to ones that don't (libsicu -> libicu, or sicu -> icu).
JS doesn't have the "mini nspr" for Windows that posixy platforms have in vm/PosixNSPR.{cpp,h} We need to link with real nspr until someone writes that code... it shouldn't be difficult to do, other than the lack of native condvars on Windows. |
|
The path I am talking about is Other than that, you've answered the questions I had. |
|
Oh, sorry, was looking at the wrong line. That path is where the nspr includes will be from the mingw64 nspr package. They will always be in that location (/mingw64/include/nspr will get mapped to wherever the base msys2 install happened in the actual filesystem). |
|
Squash and r=me Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. Comments from the review on Reviewable.io |
|
I'm working on changing the linking here a bit -- figured out how to link with nspr statically, to avoid the DLL deps. I'll update this PR once things check out. |
|
static nspr linking didn't work out -- it has issues with threading, since some of the nspr threading functionality depends on DllMain being notified of thread attach/detach. |
|
@vvuk Is this ready for re-review? |
|
Sorry, yes -- this should be ready for re-review. |
|
@bors-servo r+ Reviewed 4 of 4 files at r4. Comments from the review on Reviewable.io |
|
@bors-servo: r=metajack |
|
|
Fix build under MSYS2/MINGW64 This is a set of changes needed to build mozjs under msys2/mingw64. Core changes: - Allow building with msys make - Don't strip "lib" prefix from library names - Use system nspr with correct lib names (nspr-config gives incorrect values) - Force using native win32 python instead of the mingw64/msys python I'm not really happy with these changes since these are all basically core m-c js files, and I don't think we could take some of these changes in m-c. But, the majority of changes are correct or are resolving deeper issues in the m-c build system (e.g. the need to use the native win32 python instead of the msys one). The ICU libprefix stuff can probably be resolved a different way, I just wasn't sure how to go about it. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/54) <!-- Reviewable:end -->
|
|
vvuk commentedSep 22, 2015
This is a set of changes needed to build mozjs under msys2/mingw64.
Core changes:
I'm not really happy with these changes since these are all basically core m-c js files, and I don't think we could take some of these changes in m-c. But, the majority of changes are correct or are resolving deeper issues in the m-c build system (e.g. the need to use the native win32 python instead of the msys one).
The ICU libprefix stuff can probably be resolved a different way, I just wasn't sure how to go about it.