mapnik-packaging icon indicating copy to clipboard operation
mapnik-packaging copied to clipboard

Build Win32 dependencies - fixes

Open ngmip opened this issue 12 years ago • 0 comments

I followed the build_mapnik_dependencies.md and had to change few things to get it built. I only build the vc++ 2010 version, I dit not try with vc++ 2008

Were is my walk through the file with all the note and modifications :

Prerequisites

  • Install VC++ 2010 Express -> OK
  • Install Gnu Unix tools -> OK
  • Install msysgit -> OK
  • Install cygwin tools
    • install default bundle
    • add util/patch, interpreters/perl and archive/unzip

Environment

Path configuration

As we changed the installation path of Git, the "set PATH" isn't right

WRONG : set PATH=%PATH%;c:\msysgit\msysgit\bin;c:\cygwin\bin;c:\GnuWin32\bin
RIGHT : set PATH=%PATH%;c:\Git\bin;c:\cygwin\bin;c:\GnuWin32\bin
Strange but noticeable issues
Use the right make.exe

I had a very strange error using make.exe failing with odd messages like : make: echo: Command not found make: mkdir: Command not found I finally found out that using the GnuWin32's make.exe instead of cygwin's make.exe went over this bug. It seems to be a kind of charset unix/windows issue but I'm not really sure. Both tools are in path and it's advised to put cigwin before GnuWin32 so I ended up renaming cygwin make.exe into __make.exe and errors vanished.

File permissions

the bsdtar command seems to mess around with the file permissions. I had errors like "file not found" where the file was obviously there. So I set the file permission for "Everyone" to full access and the error did not show up again. Here is a command you may use to grand permission recursively : cacls "C:\path\to\folder" /E /T /C /G "Everyone":F

Packages versions

  • change for ZLIB_VERSION : 1.2.5 -> 1.2.7
  • change for LIBPNG_VERSION : 1.5.10 -> 1.5.13
  • change for TIFF_VERSION : 4.0.0beta7 -> 4.0.3

Download

Change the URL to get postgres lib :

WRONG : http://ftp.de.postgresql.org/packages/databases/PostgreSQL/latest/postgresql-%POSTGRESQL_VERSION%.tar.gz
RIGHT : http://ftp.postgresql.org/pub/source/v%POSTGRESQL_VERSION%/postgresql-%POSTGRESQL_VERSION%.tar.gz

Change URL of libsigc++ an use wget instead of curl, otherwise file is corrupted

wget http://ftp.acc.umu.se/pub/GNOME/sources/libsigc++/2.2/libsigc++-%LIBSIGC++_VERSION%.tar.bz2

Building individual packages

ICU

VC++ 2010 : ok

boost

Ok (python not tested)

Jpeg

Be sure to build JPEG inside the %ROOTDIR% : do cd %ROOTDIR% prior to the unzip or jpeg will be build in /boost and won't be found when building mapnik

Freetype

VC++ 2010 : ok

zlib

VC++ 2010 : ok

libpng

VC++ 2010 : ok

libpq

ok

Tiff

I had errors with this the 4.0.0beta7 version and moved to 4.0.3. I droped the "sed" and did not modify anything in the nmake.opt :

bsdtar xvfz %PKGDIR%\tiff-%TIFF_VERSION%.tar.gz
rename tiff-%TIFF_VERSION% tiff
cd tiff
nmake /f Makefile.vc
cd %ROOTDIR%

Pixman

rename the .lib For further use in cairo, rename the file pixman/pixman/release/.lib into pixman/pixman/release/pixman-1.lib. I don't know why but I had a nameless (extension only) file and while building cairo it was looking for pixman-1.lib and did not find it.

make -f Makefile.win32 "CFG=release"
move /Y release\.lib release\pixman-1.lib
cd %ROOTDIR%

Cairo

ok

LibXML2

the directory of "patch" command is incorrect

WRONG : patch  -p1 < ..\libxml.patch
RIGHT : patch  -p1 < ..\..\libxml.patch

Proj4

unzip of additionnal package proj-datumgrid-%PROJ_GRIDS_VERSION%.zip has wrong path.

WRONG : unzip -o ../../proj-datumgrid-%PROJ_GRIDS_VERSION%.zip
RIGHT : unzip -o %PKGDIR%/proj-datumgrid-%PROJ_GRIDS_VERSION%.zip

Expat

The "start" command is not right, change the path :

WRONG : start expat-win32bin-%EXPAT_VERSION%.exe
RIGHT : start %PKGDIR%\expat-win32bin-%EXPAT_VERSION%.exe

follow the installation wizard and change the target installation folder to %ROOTDIR%\Expat 2.1.0\

GDAL

typo in the rem, there is no "name.opt" file but a "nmake.opt" file to edit in order to properly set the EXPAT_DIR variable. VC++ 2010 : Ok

libsigc++

for some reason the download failed, I had to re-download the archive. VC++ 2010 : Ok

cairomm

Cairo has to be built first and the "SET INCLUDE ..." commands have to be executed before building cairomm otherwise it won't build. It's the case if you build everything straight down successfully. VC++ 2010 : Ok

sqlite

Ok

GEOS

I did not build this one, but the path in the bsdtar isn't right

WRONG  : bsdtar xvf geos-%GEOS_VERSION%.tar.bz2
RIGHT : bsdtar xvf %PKGDIR%\geos-%GEOS_VERSION%.tar.bz2

ngmip avatar Jan 07 '13 15:01 ngmip