mapnik / mapnik-gyp Goto Github PK
View Code? Open in Web Editor NEWGYP build system for Mapnik 3.x
GYP build system for Mapnik 3.x
@springmeyer ok to squash and merge pyhton-glob
(already includes windows-python-bindings
) in order to get AppVeyor building again?
Or do you want anything else in there?
@JamesRamm - I've added you as a committer, want to add docs on this to the README?
Surfaced from mapnik/mapnik#2570 (comment)
To allow the python bindings to be easy to set up we need to generate a mapnik_settings.py and have these environment variables set in it, using relative paths.
The mapnik v2.2.0 SDK used something like:
from os import path
mapnik_data_dir = path.normpath(path.join(__file__,'../../../../../share/'))
env = {
'GDAL_DATA': path.join(mapnik_data_dir, 'gdal'),
'PROJ_LIB': path.join(mapnik_data_dir, 'proj')
}
__all__ = [env]
How to enable cairo python bindings in the mapnik build?
HAVE_CAIRO
is defined and mapnik builds with cairo support. But mapnik.have_pycairo()
returns false.
those currently are:
src/renderer_common/render_group_symbolizer.os \
src/renderer_common/render_markers_symbolizer.os \
src/renderer_common/render_thunk_extractor.os \
src/json/libmapnik-json.a \
src/wkt/libmapnik-wkt.a \
src/css_color_grammar.os \
src/expression_grammar.os \
src/transform_expression_grammar.os \
src/image_filter_grammar.os \
... and from my measurements also:
src/json/mapnik_topojson_grammar.cpp // also caused appveyor run oom
utils/mapnik-index/process_geojson_file.cpp
I managed to get mapnik to build, but I'm unsure of where the final build is and whether everything I need is there?! Specifically I'm looking for the python bindings and what I now need to put on my PYTHONPATH?
I ran with the defaults (simply following the build_xxx.bat scripts given in https://github.com/BergWerkGIS/mapnik-dependencies)
I end up with a couple of likley folders: mapnik-sdk
and build
, none of which match the structure im used to from downloading the mapnik...
mapnik-sdk
is missing the python
folder - is this not build by default? I have python installed and have boost-python.
In build
I have a Release
folder. There is a bindings/python
folder full of object files. There is a lib/python2.7/mapnik
folder, but this only has __init__
and printing.py
Am I missing something?
If I am to rebuild, do I need to delete all and start over?
Have added HAVE_LIBXML2
to the gyp file.
Error I'm getting is:
HAVE_LIBXML2 defined but compiling rapidxml_loader.cpp!
Extra configuration step needed?
https://ci.appveyor.com/project/Mapbox/mapnik/build/1.0.582#L122
It was apparently compiling 3 files at once:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe ... /MP ...
... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\expression_grammar.cpp)
... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\transform_expression_grammar.cpp)
... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\css_color_grammar.cpp)
0 Warning(s)
3 Error(s)
The problem is likely that msbuild /m:1
option limits only the number of processes msbuild spawns, but the compiler then forks itself: /MP
Also while you'll be looking into it, would it be possible to make the /p:SelectedFiles=
more easily editable? I honestly have no idea whether it can be multiline, or whether you can use backticks to read the list from another file.
I've managed to install all dependencies but get the following error:
Traceback (most recent call last):
File "..\tests\visual_tests\test.py", line 5, in <module>
import mapnik
File "C:\dev\projects\mapnik-dependencies\packages\mapnik-master\bindings\python\mapnik\__init__.py", line 73, in <module
from _mapnik import *
ImportError: DLL load failed: The specified module could not be found.
DONE building Mapnik
----------ERROR MAPNIK --------------
!!!!!ERROR: ABORTED!!!!!!
Started at 2:12:17.49, finished at 2:39:02.49
-- DONE ---
Started at 2:12:17.49, finished at 2:39:02.49
Might this be because I'm using VS 15 CTP instead of VS 14?
Hi all,
I am using Mapnik in order to render OSM from Postgre/PostGIS DB.
My code is like this
mapnik::feature_type_style road_blocked_style;
rule road_blocked_rule;
road_blocked_rule.set_filter(parse_expression("[osm_id] = '61924590'"));
stroke road_blocked_rule_stk(color(255,0,0), 3.0);
road_blocked_rule.append(line_symbolizer(road_blocked_rule_stk));
road_blocked_style.add_rule(road_blocked_rule);
map.insert_style("road_blocked_style", road_blocked_style);
ISSUE: With the filter parse_expression("[osm_id] = '61924590'"), there is no result! ( like no street with this ID would be found in the DB). But I am sure that the ID is valid.
I have read that there has been issues with the convertion to BIG INT type.
I am using mapnik-v2.2.0.
How could I solve this issue? Do you have any ideas?
Thank you in advance!
When running the mapnik build, I'm getting a warning for each visual studio solution that was created by gyp, along the lines of:
MSB8012 TargetPath does not match the Linkers OutputFile property
The result is that there seems to be files missing from the output...
It seems this issue is caused by upgrading a solution from one version of VS to another (I presume gyp is handling this or something as the sln files are autogenerated). I don't know enough about gyp to fix it in the gyp file, so I tried manually editing the .sln files in VS2014, but could not get it going.
It would be helpful if the instructions gave some indication of the expected output and folder structure to help with determining what went wrong and where.
Currently the build.bat
makes an attempt to copy a few things around in order to be able to run various tests. This should be refactored into cleanly separated targets:
built.bat # builds everything
build.bat test # bootstraps tests
build.bat install /path/to/install # installs all of mapnik + runtime deps
build.bat package path/to/package{.7z|tar|zip} # installs sdk to given location and archives it for distribution
After running "npm install mapnik", I see this error. npm debug log
npm-debug.log.txt
is attached. Can you please help?
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\bmehta
\programs\node_modules\mapnik\lib\binding\node-v46-win32-x64\mapnik.node --modul
e_name=mapnik --module_path=E:\bmehta\programs\node_modules\mapnik\lib\binding\n
ode-v46-win32-x64' (1)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "mapnik"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fall
back-to-build'.
npm ERR! This is most likely a problem with the mapnik package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls mapnik
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\bmehta\programs\npm-debug.logrror:
We need to have the gyp system auto-create mapnik-config.bat. Steps to get to this are:
mapnik-config.bat
and turn it into a template like we do for mapnik-config for unix/with scons: https://github.com/mapnik/mapnik/blob/master/bin/mapnik-config.template.shQuestions:
mapnik.gyp
file to the gyp action? As a bunch of command line args (quoting will be tricky) or maybe just serialize them to an intermediate json file. Then a python script could read that and combine with the template for the final result.7z is needed to run package.bat
for example but we don't mention this in the readme.
Make use of
to prevent race conditions when building x86 and x64 at the same time.
We temporarily lost the ability to run the visual tests on windows when the python bindings moved out: 4ccf161.
But Mapnik core now has C++ visual tests. Next actions are:
mapnik.gyp
git submodule update --init
the test data and visual test dataA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.