Towards better Windows compatibility: TOOLS, DATA_TOOLS & documentation#2521
Towards better Windows compatibility: TOOLS, DATA_TOOLS & documentation#2521kevinkreiser merged 26 commits intovalhalla:masterfrom gis-ops:2300-build-tools-windows
Conversation
I believe we're using LuaJIT for performance reasons which uses the 5.1 syntax? |
|
@nilsnolde @purew An early version of my LuaJIT PR did support multiple syntaxes (by re-writing the @nilsnolde From #2352, LuaJIT outperformed Lua5.3 by ~12% for the |
|
Thanks for the insight @danpat ! I found it a little confusing, but maybe you can shed some light on it: using LuaJIT means one can entirely get rid of Lua5.x libraries? I have both installed on Win, might explain why I have to manually tell cmake how to link the proper paths to include and lib (and likely doing it wrong on top of that). Then it might use Lua5.3 which is why it can't make sense of the |
You need luajit libraries. It's a completely different implementation of lua 5.1. |
|
Right, it probably got confused since I had both installed, luajit and 5.3. BTW, no Windows CI builds on PRs? Or are subsequent webhooks disabled when the first CI fails? (and I'll run format.sh, forgot about it) |
|
@danpat @purew removing Lua5.3 from my packages helped! Lua back to previous state. I also followed Kevin's advice and allowed an optional arg for GraphTile::Suffix, so it's quite a few changed files. Didn't touch the tests, they'd fail currently (if they'd run for Windows). For some other time:) Not sure if the README addition is really needed. I'm rather considering writing a blog about it, being more detailed. In the current state a Windows build is pretty deducible from the Linux instructions (+ the CI). What do you think? Once you're happy I'll properly prepare the PR. Was only working on Windows so far and don't wanna deal with why |
|
sorry for all the bs commits! guess that'll need a squash.. |
|
Finally the Win CI builds work. Will do the same for appveyor then. Before I finish this off:
|
Looks ok to me.
Yes please!
Not sure what this means, almost none of us build valhalla on Windows and have no ability to do this? |
I meant running a few TOOLS/DATA_TOOLS executables on CI after it built. Cheap testing, but wouldn't be much effort and prevent at least some runtime regressions for Win? |
Ohh yea definitely, that's a great idea. |
|
Ok, should be good for review now. Few more things:
|
|
x86 build for win is still failing.. don't really understand why.. CMake is set to x86 & Release build, yet it's complaining that there's no config for Win32 & Debug build. Found a similar issue over at CMake. Anyone got an idea (cc @mloskot @mattrjackson)? If not, I'll try a cross compile myself later this week and see if I can resolve. My Win disk is completely full already, 88 GB to work on a single project 💥 Will also add some caching on Azure once x86 works (almost 1 hour CI builds right now!): https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops#get-started |
This is where it exits: Lines 146 to 163 in b2fed9f But this worked: valhalla/src/mjolnir/valhalla_build_admins.cc Line 308 in b2fed9f So, the code knows where to find |
|
@nilsnolde As for the sanitizer question, this looks like a known issue with Leak Sanitizer (which is a part of Address Sanitizer): see the #2296(comment). Due to this Leak Sanitizer is disabled in CI. You can also disable it while testing locally, e.g. |
The problem is in the CMake command line(s) in this PR: |
|
Good for merge from my side @kevinkreiser @purew Caching on Azure with |
|
Thanks @nilsnolde for the great set of improvements. I used to get excited and configured all free CI services (AzP, AV, Travis, CircleCI) for projects I maintain, but that eventually becomes pain to maintain. Then, the disrupting GitHub Actions arrived and IMHO we should consider complete switch to GA as single CI with jobs for the big three: Linux, Windows and macOS. |
|
Yeah, I also loathe all the external CI stuff by now.. For internal stuff we keep using Gitlab with its amazing infrastructure, but the lack of SEO prevents public repos unfortunately. Didn't try Github Actions yet, but I'd be all in favor of ditching external CI. Now that I got you here @mloskot, did you ever encounter this on Win with spatialite? #2521 (comment) |
I am moving home during next weeks, and GSoC is finalising, so I won't be able to do anything soon, but I will keep this task in mind for the autumn.
I have seen this issue, but it did not ring any bells. I may be wrong, can't verify it now, but I think did not build Valhalla with SQLite support. |
| struct url_facet : dir_facet { | ||
| protected: | ||
| virtual char do_thousands_sep() const { | ||
| return '/'; |
There was a problem hiding this comment.
this will also need the do_grouping function that is what splits it every 3 digits
There was a problem hiding this comment.
Isn't it inherited from dir_facet?
There was a problem hiding this comment.
hmm. yeah, just read up quickly about virtual inheritance and seems like url_facet inherits do_grouping from the base class numpunct here (?!).. I'll add that. curious that the tests wouldn't fail then..
There was a problem hiding this comment.
my eyes completely missed that you inherited from dir_facet! im sorry that would work and explain the passing tests... sorry for the stupid mistake there!
There was a problem hiding this comment.
No worries:) I also misunderstood what virtual inheritance is and actually already did what you asked. Anyways, should we just stick with the way it is now? The azure build time problem is a show-stopper right now anyways I think?!
|
Oh crap.. In the last run, we were running out of Azure CI build time.. build times are very close to 1 hour now and x64 must've just passed that limit.. damn slow windows builds.. not sure how to speed this up without losing the additional TOOLS & DATA_TOOLS.. any ideas? |
|
@nilsnolde one idea is to run some unit tests instead of building utrecht. we have a bunch of unit tests that exorcise tile building etc notably the gurka ones. perhaps you could pick one interesting one and run that? it might be cheaper than all of utrecht? the only way this is possible on our linux CI is we use ccache. i googled a while back about on windows but it wasnt clear if its possible or what state it is in. |
|
@kevinkreiser all "tests" (running some exes) take less than a minute actually, incl building all of Utrecht. Cache is an option on Azure too. Looks like I overlooked a few things last time I looked at it. With this config caching
Github Actions seems to be a LOT more relaxed with their OSS plans: https://docs.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits |
|
The caching of the dependencies is a great idea. We avoid this on linux using docker, but if there is a good mechanism for windows we should definitely do that. After that it would be great for us to cache the actual build contents like ccache does. If we do those two things (or even one to start) we should be in the clear. Github actions is also fine with me if you can find the time to look at it. I just dont have the time at the moment. |
|
Ok, let me look at the deps cache first. Should be easy enough. Not sure I understand why caching the build contents is interesting, but I'm not the build (tools) expert.. Ccache is available for Win, but not for Visual Studio compiler it seems. Phuu, that's really exhausting.. fingers crossed Win is based on linux soon 🤞 |
I think it's easier to track working vcpkg state in CI configuration like it's done now Lines 34 to 35 in 9e9eab1 |
#2300
This is the first bit to improve Windows compatibility for Valhalla with big thanks to @mattrjackson who did most of the changes:
update Lua syntax to 5.3 (include new bit operator instead of separate library from 5.2: http://www.lua.org/manual/5.3/manual.html#3.4.2)(misunderstanding on my part)With these modifications, it's possible to run the valhalla_build_tiles.exe and the valhalla_run_* executables.
Tasklist
Let me know what you think of the tasks below...
/docs, short and crispybuild Python bindings on Windows (hopefully only a documentation item as well)maybe:as long as no proper testing is possible on Azure, manually test some of the executables in the Win pipelines?enable caching for installed(too intense for now, see Towards better Windows compatibility: TOOLS, DATA_TOOLS & documentation #2521 (comment))vcpkgpackages