mapbox / windows-builds

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

Stuck on ICU #3

Closed springmeyer closed 10 years ago

springmeyer commented 10 years ago

I'm using visual studio expression 2013 and it looks like the devenv.exe command is not available to upgrade solution files. If I comment the upgrading line I get a reasonable error (likely since I've not upgraded!):

screen shot 2014-06-26 at 3 57 11 pm

I can't locate a vcexpress.exe like mentioned at http://stackoverflow.com/questions/7818543/no-devenv-file-in-microsoft-visual-express-10

springmeyer commented 10 years ago

The one fly-in-the-ointment is that the Express editions of Visual C++ don't allow you to upgrade solutions - only projects. At least not from the command line. However you can do it through the GUI, which means invoking the IDE for each solution and manually clicking the wizard buttons!

What! That is from the bottom of http://chrisoldwood.blogspot.com/2009/05/building-visual-c-projects-from-command.html.

Upgrading through the GUI did work, but that is not sustainable :(

springmeyer commented 10 years ago

logging that I tried to launch the visual studio gui and then kill it, but this did not work because I found no way to click okay

start WDExpress.exe /SafeMode source\allinone\allinone.sln  >result.txt 2>&1
timeout 30
taskkill /im WDExpress.exe /f
springmeyer commented 10 years ago

Also tried to upgrade the vxcproj files with FOR /R %I IN (*.vcxproj) DO vcupgrade %I which seemed to work, but the same error persisted when calling msbuild on the sln.

springmeyer commented 10 years ago

woot! got it. glad I did not give up here. I found nobody who has pulled this off but by piecing together docs on msbuild I found that you can actually avoid the need for upgrading if you just explicitly pass:

/toolsversion:12.0 /p:PlatformToolset=v120

https://github.com/BergWerkGIS/mapnik-dependencies/commit/b59a6af58c668aeb7e538d3910664e5a29eb4f4c

springmeyer commented 10 years ago

btw, I've not had a problem with boost finding icu, even without debug icu so I've disable that debug build of icu.

wilhelmberg commented 10 years ago

icu: Strange, I came across the problem about not finding debug DLLs again just yesterday when fiddling with the regex build.

devenv.exe /upgrade: An alternative would have been using the Azure VM I created some time ago (with VS Ultimate, if I remember correctly). But that would introduce another tool into the toolchain, which is not what we want in terms of KISS. Great that you found out about /p:PlatformToolset=v120

I, too, found out about this option yesterday when looking for ways to speed up the compile: http://llvm.org/builds/: Alternatively, invoke MSBuild with /p:PlatformToolset=LLVM-vs2012 to try out the toolchain without modifying the project files.

Might be worth considering testing LLVM clang, both in terms of speed and final file size. Speed Test 2: Comparing C++ Compilers on Windows (NOV 26, 2013). Unfortunately it does not mention which version of VS/MSBuild was used.

LLVM clang

clang (No optimization, with command-line switch -O0) Command line: Measure-Command { clang -c -O0 test4.cpp } Total Milliseconds for compile only (first try): 5957.0582 Total Milliseconds for compile only (second try): 5880.9037 Total Milliseconds for compile only (third try): 5851.7289 Object file size: 1,271,660 bytes clang (Full optimization, with command-line switch -O3) Command line: Measure-Command { clang -c -O3 test4.cpp } Total Milliseconds for compile only: 4996.9006 Total Milliseconds for compile only: 4828.7302 Total Milliseconds for compile only: 4818.8122 Object file size: 143 bytes Final executable file size: 3335 bytes

Microsoft C++ Compiler

Microsoft cl with no optimization Command line: Measure-Command { cl /Ox /c /nologo test4.cpp } Total Milliseconds for compile only: 9378.7025 Total Milliseconds for compile only: 9444.0398 Total Milliseconds for compile only: 9536.6226 Object file size: 815,724 bytes Final executable file size: 48,128 bytes Microsoft cl with Maximum optimization Command line: Measure-Command { cl /c /nologo test4.cpp } Total Milliseconds for compile only: 7889.2335 Total Milliseconds for compile only: 7762.6916 Total Milliseconds for compile only: 7749.9278 Object file size: 986,117 bytes Final executable file size: 126,976 bytes

springmeyer commented 10 years ago