mapbox / windows-builds

DEPRECATED! build scripts for mapnik dependencies, mapnik, node-mapnik, node, libosmiom, osmium-tool
38 stars 22 forks source link

Pixman fails on windows-build-server but not on windows-builds #55

Closed wilhelmberg closed 8 years ago

wilhelmberg commented 8 years ago
------ pixman -----
"checking for pixman-0.32.6.tar.gz"
"downloading http://mapnik.s3.amazonaws.com/deps/pixman-0.32.6.tar.gz"
extracting
patching ...
patching file `Makefile.win32.common'
ATTENTION using "MMX=off" to compile cairo with 64bit

building ...
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\14.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\;Z:\mb\windows-builds-64\tmp-bin\make;Z:\mb\windows-builds-64\tmp-bin;Z:\mb\windows-builds-64\tmp-bin\ddt\x64;Z:\mb\windows-builds-64\tmp-bin\7zip\x64;Z:\mb\windows-builds-64\tmp-bin\ragel\x64;Z:\mb\windows-builds-64\tmp-bin\gnu-win-tools;Z:\mb\windows-builds-64\tmp-bin\nasm-2.11.08;Z:\mb\windows-builds-64\tmp-bin\cmake-3.1.0-win32-x86\bin;C:\Program Files (x86)\Git\bin;C:\Python27\Scripts;C:\Python27;C:\Windows\System32\WindowsPowershell\v1.0;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\cfn-bootstrap\;C:\Program Files\Amazon\AWSCLI\;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\nodejs\;
"Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
"Setting SSSE3 flag to default value 'on'... (use SSSE3=on or SSSE3=off)"
pixman.c
pixman-access.c
pixman-access-accessors.c
pixman-bits-image.c
pixman-combine32.c
pixman-combine-float.c
pixman-conical-gradient.c
pixman-filter.c
pixman-x86.c
pixman-mips.c
pixman-arm.c
pixman-ppc.c
c1: fatal error C1083: Cannot open source file: 'pixman-ppc.c': No such file or directory
make.exe: *** [release/pixman-ppc.obj] Error 2
========= ERROR PIXMAN
!!!!!ERROR: ABORTED!!!!!!
wilhelmberg commented 8 years ago

Very strange, pixman-ppc.c is there:

------ pixman -----
"checking for pixman-0.32.6.tar.gz"
"downloading http://mapnik.s3.amazonaws.com/deps/pixman-0.32.6.tar.gz"
extracting
patching ...
patching file `Makefile.win32.common'
ATTENTION using "MMX=off" to compile cairo with 64bit
building ...
DIR /S *.c
 Volume in drive Z is Temporary Storage 1
 Volume Serial Number is 6076-7882
 Directory of Z:\mb\windows-builds-64\packages\pixman\pixman
06/01/2014  10:57 PM                56 pixman-access-accessors.c
06/01/2014  10:57 PM            40,891 pixman-access.c
11/17/2013  08:43 AM            26,714 pixman-arm-neon.c
07/05/2014  12:50 AM            11,632 pixman-arm-simd.c
11/17/2013  08:43 AM             5,560 pixman-arm.c
07/05/2014  12:50 AM            26,503 pixman-bits-image.c
07/05/2014  12:50 AM            29,664 pixman-combine-float.c
07/05/2014  12:50 AM            72,340 pixman-combine32.c
06/01/2014  10:57 PM             5,410 pixman-conical-gradient.c
01/12/2013  11:21 AM                55 pixman-edge-accessors.c
06/01/2014  10:57 PM            10,845 pixman-edge.c
04/24/2014  04:34 AM            95,360 pixman-fast-path.c
04/24/2014  04:34 AM             9,007 pixman-filter.c
07/05/2014  12:50 AM             7,899 pixman-general.c
04/24/2014  04:34 AM            17,561 pixman-glyph.c
07/05/2014  12:50 AM             5,740 pixman-gradient-walker.c
06/01/2014  10:57 PM            24,036 pixman-image.c
03/23/2014  03:11 PM            11,154 pixman-implementation.c
06/01/2014  10:57 PM             7,496 pixman-linear-gradient.c
04/24/2014  04:34 AM            28,845 pixman-matrix.c
11/17/2013  08:43 AM            25,350 pixman-mips-dspr2.c
11/17/2013  08:43 AM             3,052 pixman-mips.c
04/24/2014  04:34 AM            98,331 pixman-mmx.c
11/17/2013  08:43 AM             4,531 pixman-noop.c
11/17/2013  08:43 AM             3,660 pixman-ppc.c
06/01/2014  10:57 PM            14,548 pixman-radial-gradient.c
11/17/2013  08:43 AM            77,661 pixman-region.c
01/12/2013  11:21 AM             2,347 pixman-region16.c
01/12/2013  11:21 AM             1,675 pixman-region32.c
11/17/2013  08:43 AM             2,167 pixman-solid-fill.c
04/24/2014  04:34 AM           164,393 pixman-sse2.c
04/24/2014  04:34 AM             9,642 pixman-ssse3.c
04/24/2014  04:34 AM             1,874 pixman-timer.c
11/17/2013  08:43 AM            16,854 pixman-trap.c
06/01/2014  10:57 PM             8,032 pixman-utils.c
04/24/2014  04:34 AM            45,834 pixman-vmx.c
06/28/2014  11:24 PM             6,078 pixman-x86.c
04/24/2014  04:34 AM            36,071 pixman.c
              38 File(s)        958,868 bytes
     Total Files Listed:
              38 File(s)        958,868 bytes
               0 Dir(s)  160,213,790,720 bytes free
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\14.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\;Z:\mb\windows-builds-64\tmp-bin\make;Z:\mb\windows-builds-64\tmp-bin;Z:\mb\windows-builds-64\tmp-bin\ddt\x64;Z:\mb\windows-builds-64\tmp-bin\7zip\x64;Z:\mb\windows-builds-64\tmp-bin\ragel\x64;Z:\mb\windows-builds-64\tmp-bin\gnu-win-tools;Z:\mb\windows-builds-64\tmp-bin\nasm-2.11.08;Z:\mb\windows-builds-64\tmp-bin\cmake-3.1.0-win32-x86\bin;C:\Program Files (x86)\Git\bin;C:\Python27\Scripts;C:\Python27;C:\Windows\System32\WindowsPowershell\v1.0;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\cfn-bootstrap\;C:\Program Files\Amazon\AWSCLI\;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\nodejs\;
"Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
"Setting SSSE3 flag to default value 'on'... (use SSSE3=on or SSSE3=off)"
pixman.c
pixman-access.c
pixman-access-accessors.c
pixman-bits-image.c
pixman-combine32.c
pixman-combine-float.c
pixman-conical-gradient.c
pixman-filter.c
pixman-x86.c
pixman-mips.c
pixman-arm.c
pixman-ppc.c
c1: fatal error C1083: Cannot open source file: 'pixman-ppc.c': No such file or directory
make.exe: *** [release/pixman-ppc.obj] Error 2
========= ERROR PIXMAN
!!!!!ERROR: ABORTED!!!!!!
wilhelmberg commented 8 years ago

A FASTBUILD=1 just succeeded, which also failed yesterday. Will kick off a FASTBUILD=0 now.

wilhelmberg commented 8 years ago

oops, just x64 build succeeded. x86 failed:

2015-08-04 15:37:42 : Z:\mb\windows-builds-32\packages\mapnik-master\include\mapnik/value.hpp(168): warning C4805: '!=': unsafe mix of type 'mapnik::value_double' and type 'mapnik::value_bool' in operation (compiling source file ..\..\src\agg\process_markers_symbolizer.cpp) [Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
2015-08-04 15:37:42 :
2015-08-04 15:37:42 : ERROR:NULL
2015-08-04 15:37:42 :
2015-08-04 15:37:42 : 'Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\mapnik.sln' (default target) (1) ->
2015-08-04 15:37:42 : 'Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\csv.vcxproj.metaproj' (default target) (2) ->
2015-08-04 15:37:42 : 'Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj' (default target) (17) ->
2015-08-04 15:37:42 : (ClCompile target) ->
2015-08-04 15:37:42 : Z:\mb\windows-builds-32\packages\mapnik-master\src\agg\process_markers_symbolizer.cpp : fatal error C1083: Cannot open compiler generated file: 'Release\obj\mapnik\..\..\src\agg\/process_markers_symbolizer.obj': No such file or directory [Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
2015-08-04 15:37:42 : cl : Command line error D8040: error creating or communicating with child process [Z:\mb\windows-builds-32\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
2015-08-04 15:37:42 :
2015-08-04 15:37:42 : 144 Warning(s)
2015-08-04 15:37:42 : 2 Error(s)
2015-08-04 15:37:42 :
2015-08-04 15:37:42 : Time Elapsed 00:03:08.13
wilhelmberg commented 8 years ago

It seems, that there was a bug and some execution time limit in the version of the EC2Config tools that was bundled with the AMI, that I used above.

Another thing, that might have contributed to this, is the fact that EC2Config is collecting all the console output and/or errors that occur during execution of userdata and tries to write them to a log file after userdata has finished. I think, it is the enormous amount of console output during the builds, that might have killed the EC2Config service (buffer size exceeded for saving the output), which in turn killed the WebServer <-> wbs-cli <-> SignalR communication, which in turn killed one of the build threads, which in turn signaled the system to shutdown, which in turn wiped the temporary disks (where the build files are), which in turn made the remaining build thread fail with file not found errors.

I worked around it, by creating a new AMI with updated EC2Config tools and breaking out of the userdata script for execution of build.

TODO:

image

wilhelmberg commented 8 years ago

FASTBUILD=1 for 32bit and 64bit just ran thru, successfully. 30 minute break is unacceptable tough.

Try FASTBUILD=0 next.

wilhelmberg commented 8 years ago

gyp is taking the time to generate the solution file:

image

wilhelmberg commented 8 years ago

using the same scripts and same temporary drives, but being logged in, takes less than one second, not 20 minutes as above:

08:32:02 generating solution file, calling gyp...
08:32:02 solution file generated
wilhelmberg commented 8 years ago

Had another quick look at the automated builds and I think I found the problem: find.exe

Still have to figure out, why this only happens when the EC2 is started automatically and not manually. And why/when this started to happen.

Interesting findings:

Main python process seems to start a python subprocess for each CPU. So we get 34 python processes when doing a 32/64 build:

Command line of main python:

image

Command line of sub python:

image

Example command line of find

This is, where it's stuck. After the find processes have finished, build continues as expected.

image

wilhelmberg commented 8 years ago

find was behaving strange when not run in an interactive session as it started searching from the root directory (C:\) scanning the whole disk, thus the delay.

Replaced find with a short Python script: https://github.com/mapnik/mapnik-gyp/blob/d81a9403e875f9829e75707b9f57b55e75d8aa79/glob-files.py