-
Notifications
You must be signed in to change notification settings - Fork 165
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
Enable all platforms again #976
base: master
Are you sure you want to change the base?
Conversation
I will wait for some feedback before putting more effort into it. |
mainly seeking some feedback from you @artemp :D |
This reverts commit e29ac46.
@GimpMaster So I've added github publishing for the build process. |
@@ -0,0 +1,9 @@ | |||
FROM ghcr.io/mathisloge/mapnik:docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a Dockerfile for this base image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's build from this branch mapnik/mapnik#4267
This image does not build for me (linux, aarch64, built base image from mapnik/mapnik@7631f93):
Pre-built binaries should not be required when building from source. |
Trying to manually patch it up by adding '-DCMAKE_C_COMPILER=gcc', '-DCMAKE_CXX_COMPILER=g++' to the actions in
Same result even if I remove the one mention of I'm not a cmake pro and not sure at all how to continue from here. Currently attempting from 3nprob@6ba144f (https://github.com/mathisloge/node-mapnik/compare/master...3nprob:linux-docker-build?expand=1) and I can't see where harfbuzz would enter in the first,let alone second, place. |
Hey, I'm currently not on my PC so I can't help you that much. You can try to set |
Hmm, I tried setting that both here and here with same outcome. Would it go somewhere else? |
Hello, I was able to successfully build the latest devbuild10 Mapnik on my Windows 10 system. My issue is that I am trying to build Mapnik to use in an Electron app for Windows. When I get to the point that I can successfully build Mapnik from source, I then run it through electron-rebuild it does appear to rebuild successfully but when starting my program I get "a dynamic link library (DLL) initialization routine failed" errors every time. My electron version is 14.2.9 but I've tried several different versions of electron up to 18 with the same result. I'm not sure what is missing or needs to be done at this point, any thoughts/ideas? |
@3nprob oh sorry. You actually need to set @wxitguy glad to hear that you were successful compiling from source. IIRC you need to compile a different napi lib for electron. |
So this PR adds a way to build for all platforms that are supported by mapnik (including windows)
Currently the whole dependency setup is done via vcpkg. I recommend this for windows, because, as #848 stated, it would take a lot of effort to pull in all the dependencies with a script.
On linux and osx the system libraries should be used. This splitting is generally easy. On windows the submodule would be cloned or, as it is also possibile, added via FetchContent. Otherwise mapnik would be found via pkg-config or cmakes find_package.
However since this will use cmake as a build system i had to remove node-gyp. I think it will need discussion if you want to pursude this path.This will use cmake-js as the build system and node-pre-gyp for packaging and publishing.
Depends on:
currently there is a known issue that happens when installing mapnik in manifest mode. The proj port will inject a invalid include path which get carried into mapniktargets.cmake.RESOLVEDif someone wants to try this PR, the fileRESOLVEDbuild\vcpkg_installed\<your_triplet>\share\mapnik\MapnikTargets.cmake
needs a patch at line 57 with[...]vcpkg_installed/include
to[...]vcpkg_installed/<your_triplet>/include
. You will need to build manually withcmake-js build--CDCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" --target node-mapnik
and after the first build file, apply the described workaround.Todo:
mapnik_settings.json
with the correct valuesmaybe there is a way to use node-pre-gyp in conjunction with cmake-js( build with cmake, publish and package with node-pre-gyp)so building with cmake-js and package & publish with node-pre-gyp works pretty wellcould narrow down the problem: somehow the libpq could not be imported.was just a missing PATH entryprebuild binaries
For development and testing purposes, there is a devbuild npm package:
https://www.npmjs.com/package/@mathisloge/mapnik
Currently there should be published packages for windows and linux.
integration tests
Simple integration test with windows and linux each with node versions 12, 14 and 16
https://github.com/mathisloge/node-mapnik-test