-
Notifications
You must be signed in to change notification settings - Fork 47
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
Windows builder in CI #161
Comments
@michaelkirk I'll take a stab at it. |
Awesome! Just in case you weren't already aware, our existing CI runs are configured at: https://github.com/georust/proj/blob/main/.github/workflows/test.yml I'm imaging we can add one or more entries for windows there, like we have for macos and ubuntu. |
@michaelkirk So I've run into an issue related to curl and the (failure) to link libraries. At first, I thought this was something with sqlite3 because that's what cargo reports. However, I eventually identified that curl is the source. Please see this commit over at OSGEO/PROJ. They enabled linking to a static library because otherwise, Windows requires a whole bunch of other network libraries to be linked. Unfortunately for this project, that solution is no good because networkfilemanager.cpp.obj is calling functions exclusive to the dynamic library (e.g. __imp_curl_easy_cleanup etc.). So I guess the obvious, if not necessarily feasible, options are to either go down the rabbit hole with the extra network libraries or else to provide alternative methods for linking that don't rely on the dynamic curl library. |
I'm going to try grabbing the stuff that isn't being linked manually. Sounds like that might work per #158 |
@cerrussell Just to check – we've swapped out cURL for Rust-native network libraries and we disable linking to it when building specifically to avoid the dependency on macOS / Linux / BSD…I can't see your progress, but I just wanted to ensure we aren't working at cross-purposes – is cURL necessary elsewhere in the Windows build process? |
@urschrei Thanks for your input, that's really helpful. I think what happened on my side is that initially cargo build would fail and say curl is required for libproj, and libproj is a required component of proj so I kind of took that at face value and ran in the wrong direction. I don't think curl is used apart from linking, so I am optimistic that I'll ultimately get it working. |
So just an update @urschrei @michaelkirk I've managed to set up windows builds using MSYS2. MSYS2 offers the significant benefit of being able to get all the dependencies from one of their repos and this was a much better experience than trying to cobble everything together using a mixture of vcpkg, chocolatey, and building from source. It was also much faster than when I was using an MSVC toolchain. Currently, I have only proj-windows set up and it uses an MSYS2 provided copy of proj for linking. You can see that here. Note that there are 12 different windows builds configured - this is certainly overkill but I was curious to see how they compared in terms of build times. Clang64 appears to be noticeably faster. I haven't had any luck as of yet building libproj from source, but I wonder if that's truly a necessity for Windows when it can be so easily installed from the MSYS2 repo. If there is an existing proj installation, the path would just need to be exported to the environment path so it can be found. |
@temeddix There's nothing we can do about third-party dependencies and their availability on a given platform. If you want a better Windows experience, feel free to contribute patches. As open source developers our time is limited and we rely on contributions from interested users who feel that support for a feature or platform is lacking. |
At least I think I can help on improving docs on how to install things on Windows, I'll try to make a PR on that if I succeed |
@temeddix Definitely try using msys2 on Windows if possible... so much easier. |
Thanks :) well, I'm trying to develop code on windows and deploy it to Ubuntu webserver....so I need to make this work on both of them. |
I'm not very familiar with windows builds, but we have a steady stream of support requests about it.
I think it could be helpful to have an official build in CI to point people to, and also to have some confidence that it's possible to build this crate on windows at all.
Is anyone out there interested in setting one up?
related: #79, #156, #158
The text was updated successfully, but these errors were encountered: