Skip to content
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

Dropping support for windows binaries #848

Closed
springmeyer opened this issue Feb 6, 2018 · 14 comments
Closed

Dropping support for windows binaries #848

springmeyer opened this issue Feb 6, 2018 · 14 comments

Comments

@springmeyer
Copy link
Member

springmeyer commented Feb 6, 2018

For many years we've supported windows in the node-mapnik project, keeping builds working on appveyor and providing binaries for all downstream users.

We've been providing windows binaries since 2014 (v1.4.8 release): #202 (comment)

The time has come to drop support however. This is a tough decision because I'd like to keep supporting windows, but I don't have the ability to.

So, windows binaries are no longer going to be supported for > node-mapnik v3.6.3.

I'm sorry to those of you who have been depending on these binaries over the years (especially to those that might have downstream users or companies depending on them as well). This news probably comes as a major inconvenience/disappointment/surprise.

I've been developing in C++ for over 10 years now and much of that time I've been maintaining builds across mac, linux, windows for a variety of projects. Getting Mapnik running on Windows is the one of the hardest and most labor intensive things I've worked on due to:

  • how poor the support for modern C++ features have been in Visual Studio (for C++11 and C++14) (or instead how poor my understanding is, since I primarily develop on unix)
  • the large number of dependencies mapnik has and the lack of good consistent scripts or binary packages for them (requiring my team to maintain https://github.com/mapbox/windows-builds/tree/master/scripts)
  • the fact that mapnik's core build system does not support windows, requiring the maintenance of a totally separate build system (https://github.com/mapnik/mapnik-gyp), which therefore easily breaks.

All of these things combine with the fact that I'm managing a team at Mapbox now and I don't have the time to dig into failed builds. Also my colleague @BergWerkGIS, who was a major force behind making this system work for many years, has moved on to work on other things at Mapbox unrelated to C++ builds. Lastly we've been supporting windows for a couple years now without actually needing it at Mapbox (we don't depend on the windows builds of mapnik or node-mapnik since moving our focus to Mapbox GL - refs https://www.mapbox.com/help/upgrading-from-classic/ and https://www.mapbox.com/help/upgrading-from-classic/).

As such mapnik is no longer building on windows, and its tests have been failing for some time: https://ci.appveyor.com/project/Mapbox/mapnik/history.

If someone were to pick this up they would need to:

Since there is nobody that I know to step up to maintain this system, then my only reasonable option at this point is to drop support for node-mapnik on windows going forward.

So, my recommended solution for developers on windows that are depending on node-mapnik is to pin your usage in your package.json to v3.6.2 like:

  "dependencies": {
    "mapnik": "3.6.2",
  }

Mentioning a few people on this ticket who, from looking at past issues (https://github.com/mapnik/node-mapnik/search?q=windows&type=Issues&utf8=%E2%9C%93), have been users of node-mapnik on windows: @donnyv @eczajk1 @vjpr @BHare1985 @andrelom @bmehta @TimJMartin @germanjoey @aparshin @qiyexue @fnicollet @jbrwn @rclark @n9 @mohsentaleb @djodonnell @iceaxe @mojodna @beaugunderson @strk @mapbox/core-tech

@eczajk1
Copy link

eczajk1 commented Feb 6, 2018

Thanks for the heads up. And thanks to you and your team for this project!

@jbrwn
Copy link

jbrwn commented Feb 6, 2018

RIP windows builds and the cottage industry of bored developers hacking away at mapnik on their work issued windows boxes. Brings a tear to my eye thinking about the good old days.

Thanks to everyone who kept it rolling through the years.

@strk
Copy link
Contributor

strk commented Feb 7, 2018 via email

@springmeyer
Copy link
Member Author

springmeyer commented Feb 22, 2018

Thanks everyone for your comments and support. @flippmoke is kindly working on the next release of node-mapnik which will be the release in which we drop windows support. Per @flippmoke's plan at #808 (comment) this next release will be called v3.7.0. This indicates to me that anyone who is using ~3.6.2 in their package.json to install node-mapnik will be isolated from this breakage. However those using ^3.6.2 will be broken - since that will pull in 3.7.0 automatically which will lack windows binaries.

An example of an application that will currently break due to ^ usage and the plan @flippmoke has to release 3.7.0 is https://github.com/koopjs/koop, which depends on https://github.com/koopjs/koop-tile-plugin which depends on mapnik-tiles. This will break because mapnik-tiles is using ^ to install node-mapnik: https://github.com/chelm/mapnik-tiles/blob/6e2b2469edd851560566be917d87652e9d61e92e/package.json#L20. So I've created chelm/mapnik-tiles#2 as an example of a change that will help reduce the fallout. I encourage others to proactively do this asap to help protect their downstream users from breakages.

springmeyer added a commit to mapbox/mapbox-gl-js that referenced this issue Feb 23, 2018
This will protect your module from automatically upgrading to node-mapnik v3.7.0 (when it is published). This in turn will protect your users from breakages if they are running windows.

Refs mapnik/node-mapnik#848
springmeyer added a commit to mapbox/vector-tile-js that referenced this issue Feb 23, 2018
This will protect your module from automatically upgrading to node-mapnik v3.7.0 (when it is published). This in turn will protect your users from breakages if they are running windows.

Refs mapnik/node-mapnik#848
jfirebaugh pushed a commit to mapbox/mapbox-gl-js that referenced this issue Feb 23, 2018
This will protect your module from automatically upgrading to node-mapnik v3.7.0 (when it is published). This in turn will protect your users from breakages if they are running windows.

Refs mapnik/node-mapnik#848
jfirebaugh pushed a commit to mapbox/vector-tile-js that referenced this issue Feb 23, 2018
This will protect your module from automatically upgrading to node-mapnik v3.7.0 (when it is published). This in turn will protect your users from breakages if they are running windows.

Refs mapnik/node-mapnik#848
@springmeyer
Copy link
Member Author

I've made the above PRs by manually paging through https://github.com/search?o=desc&q=%22mapnik%22+extension%3A.json+language%3AJSON&s=indexed&type=Code&utf8=%E2%9C%93. I don't feel motivated to develop a more systematic approach, but if someone does I presume a better approach would be to write a script to download all the modules depending on mapnik via https://www.npmjs.com/search?q=mapnik&page=1&ranking=optimal and detect which are using ^. If someone is interested in taking this on, please comment here. Otherwise I see no next actions for myself, so will close this for now. @flippmoke is taking on next steps at #808. I've also created #855 to track full removal of window support in the repo.

@wayofthefuture
Copy link

I understand comments mentioned above. I think it is important to note, however, that Windows comprises 90% of market share. I switched to Linux and then back to Windows because I was always battling "business" compatibility. Business funding helps to drive all of this stuff so IMO dropping Windows is a huge mistake.

@flippmoke flippmoke changed the title Dropping support for windows Dropping support for windows binaries May 22, 2018
@strk
Copy link
Contributor

strk commented May 24, 2018 via email

@wayofthefuture
Copy link

Good point, can't argue with that.

@pedro-vicente
Copy link

pedro-vicente commented Jun 11, 2019

FYI, this fork

https://github.com/pedro-vicente/mapnik

has a CMake build for the 3.0 and 2.3 branches with the minimum dependencies

the 2.3 branch builds without errors and runs a test program with the OSM plugin
the 3.0 branch has a couple of compiling errors, with Visual Studio 2019

I posted these errors here

mapnik/mapnik#4062

the errors are not actually that many, it seems to me that with a little effort, the Windows build is doable;

how poor the support for modern C++ features have been in Visual Studio (for C++11 and C++14) (or instead how poor my understanding is, since I primarily develop on unix)

in this case, we just have to write code that compiles both for Visual Studio and gcc, even if it means getting rid of esoteric C++14 features

the large number of dependencies mapnik has and the lack of good consistent scripts or binary packages for them

you are right, there are a lot of code dependencies ; but this is the thing that once done, never has to be done again

the fact that mapnik's core build system does not support windows, requiring the maintenance of a totally separate build system

this is a case, where having CMake as the build system is a must have

I used a script to build the dependencies

for the 3.0 branch, this is the CMake script used, not complete regarding list of source files

https://github.com/pedro-vicente/mapnik/blob/master/CMakeLists.txt

list of dependencies can be built with

https://github.com/pedro-vicente/mapnik/blob/master/build/bld.bat

https://github.com/pedro-vicente/mapnik/blob/master/build/dep.bat

EDIT

all this concerns mapnik itself, not node-mapnik

@dalelutz
Copy link

Following up on @pedro-vicente 's post, we'd love to find someone we could pay to get the 3.0 branch compiling and passing tests on VS 2019 (again mapnik, not node-mapnik). Pedro himself is not available for quite some time and we'd love to see this happen sooner. Feel free to write me at [email protected] if you're interested.

@KuDeSnik33ra
Copy link

Mapnik incompatibility with boost 1.7 prevent it from building with vcpkg - vcpkg has no support for different lib versions - only the last added one. Are you planing to support it?

@am2222
Copy link

am2222 commented May 29, 2020

@dalelutz, @KuDeSnik33ra the fork in my profile is compatible with vcpkg and I am currently adding the port into vcpkg so it is possible to build it on the windows.
However I am working on mapnik tarball generation to be able to make nodejs mapnik work again.

@RavelDevelopment
Copy link

@springmeyer I'd be interested in bringing Windows support back to life and was wondering if you might have some guidance on where to begin.

@am2222
Copy link

am2222 commented Apr 17, 2021 via email

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

No branches or pull requests

10 participants