Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Instructions for building a debug configuration #108

Open
DiabloRusso opened this issue Feb 10, 2017 · 10 comments
Open

Instructions for building a debug configuration #108

DiabloRusso opened this issue Feb 10, 2017 · 10 comments

Comments

@DiabloRusso
Copy link

DiabloRusso commented Feb 10, 2017

Hi!
At the request of Wilhelm Berg in this issue I share my results on the build of mapnik debug configuration.
I create 2 Pull Requests: windows-builds and mapnik-gyp
Build v3.0.x(not master) Mapnik branch.

Instructions

  1. Clone my debug branch windows-builds.
  2. Start settings.bat with "FASTBUILD=0" "BUILD_TYPE=Debug" "MAPNIKBRANCH=v3.0.x".
  3. Start scripts\build.bat.
    Error: LINK : fatal error LNK1104: cannot open file '..\..\masmx64\gvmat64.obj'
    Replace packages\zlib\contrib\vstudio\vc11\zlibvc.vcxproj by this file.
    Repeat start scripts\build.bat. Again the same error(((
    Repeat start scripts\build.bat again! Build is going on!!!
    Build Mapnik fails.
  4. Manually changed packages\boost\spirit\home\support\attributes.hpp and replace line 1035 to using std::swap; (see here).
  5. Manually changed packages\boost\bin.v2\project-cache.jam and set has_icu builds to true (see here).
  6. Replace packages\mapnik-master\mapnik-gyp\build.bat by this file.
  7. Start scripts\build_boost.bat.
  8. Start scripts\build_mapnik.bat.

---------- DONE windows-builds MAPNIK --------------
Build complete!

My configuration: Notebook i3, 4GB RAM, ~16GB free space, Win7, VS2015.3
Thanx!

@DiabloRusso DiabloRusso changed the title Changes that you need to make to build a debug configuration Instructions for building a debug configuration Feb 12, 2017
@wilhelmberg
Copy link
Contributor

wilhelmberg commented Feb 13, 2017

@DiabloRusso I merged your PRs (#107 and mapnik/mapnik-gyp#30) into Debug branches of the respective respositories (https://github.com/mapbox/windows-builds/tree/Debug, https://github.com/mapnik/mapnik-gyp/tree/Debug).

I also added patches for the boost std::swap issues so 4. shouldn't be neceassary anymore.

Trying to replicate:

  • git clone -b Debug https://github.com/mapbox/windows-builds.git windows-builds-DEBUG
  • cd windows-builds-DEBUG
  • settings "FASTBUILD=0" "BUILD_TYPE=Debug" "MAPNIKBRANCH=v3.0.x" "MAPNIKGYPBRANCH=Debug" "PACKAGEMAPNIK=0"
  • scriptcs scripts\build.csx -- upto=mapnik <- use this instead of scripts\build.bat to get log files in directory build-logs
  • 3. as there is no patch yet for zlib
  • scriptcs scripts\build.csx -- upto=mapnik

Unfortunately I still get this error (LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs;) <- conflict Release/Debug.

Any ideas what I may have missed?


Full error:

         Debug\obj\mapnik\..\..\src\/unicode.obj
         Debug\obj\mapnik\..\..\src\/value.obj
         Debug\obj\mapnik\..\..\src\/vertex_adapters.obj
         Debug\obj\mapnik\..\..\src\/vertex_cache.obj
         Debug\obj\mapnik\..\..\src\/warp.obj
         Debug\obj\mapnik\..\..\src\/webp_reader.obj
         Debug\obj\mapnik\..\..\src\/well_known_srs.obj
         Debug\obj\mapnik\..\..\src\/wkb.obj
         Debug\obj\mapnik\..\..\src\/xml_tree.obj
            Creating library c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\Debug\mapnik.lib and object c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\Debug\mapnik.exp
         Linker: LibDef Total time = 0.14959s PB: 1578319872 [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\lib\mapnik.dll] 
     2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj]
     2>expression_node.obj : error LNK2019: unresolved external symbol "public: class std::vector > __cdecl boost::re_detail_106200::icu_regex_traits_implementation::do_transform(int const *,int const *,class icu_56::Collator const *)const " (?do_transform@icu_regex_traits_implementation@re_detail_106200@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0PEBVCollator@icu_56@@@Z) referenced in function "public: class std::vector > __cdecl boost::re_detail_106200::icu_regex_traits_implementation::transform(int const *,int const *)const " (?transform@icu_regex_traits_implementation@re_detail_106200@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0@Z) [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj]
     2>expression_node.obj : error LNK2019: unresolved external symbol "public: bool __cdecl boost::icu_regex_traits::isctype(int,unsigned __int64)const " (?isctype@icu_regex_traits@boost@@QEBA_NH_K@Z) referenced in function "class boost::u16_to_u32_iterator __cdecl boost::re_detail_106200::re_is_set_member,int,class boost::icu_regex_traits,unsigned __int64>(class boost::u16_to_u32_iterator,class boost::u16_to_u32_iterator,struct boost::re_detail_106200::re_set_long const *,struct boost::re_detail_106200::regex_data const &,bool)" (??$re_is_set_member@V?$u16_to_u32_iterator@PEB_WH@boost@@HVicu_regex_traits@2@_K@re_detail_106200@boost@@YA?AV?$u16_to_u32_iterator@PEB_WH@1@V21@0PEBU?$re_set_long@_K@01@AEBU?$regex_data@HVicu_regex_traits@boost@@@01@_N@Z) [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj]
     2>expression_node.obj : error LNK2019: unresolved external symbol "private: class boost::basic_regex & __cdecl boost::basic_regex::do_assign(int const *,int const *,unsigned int)" (?do_assign@?$basic_regex@HVicu_regex_traits@boost@@@boost@@AEAAAEAV12@PEBH0I@Z) referenced in function "public: class boost::basic_regex & __cdecl boost::basic_regex::assign(int const *,int const *,unsigned int)" (?assign@?$basic_regex@HVicu_regex_traits@boost@@@boost@@QEAAAEAV12@PEBH0I@Z) [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj]
     2>lib\mapnik.dll : fatal error LNK1120: 3 unresolved externals [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj]
         Linker:   Wait PDB close Total time = 0.00486s PB: 1585659904 [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\lib\mapnik.dll] 
         Linker:   Wait type merge Total time = 0.17471s PB: 1584013312 [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\lib\mapnik.dll] 
         Linker: Final Total time = 14.40621s < 65469356643 - 65613418791 > PB: 214474752 [c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\lib\mapnik.dll] 
     2>Done Building Project "c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.vcxproj" (default targets) -- FAILED.
     1>Done Building Project "c:\mb\windows-builds-DEBUG\packages\mapnik-v3.0.x\mapnik-gyp\build\mapnik.sln" (mapnik;mapnik-json;mapnik-wkt;mapnik-render;shapeindex;mapnik-index;csv;gdal;geojson;ogr;pgraster;postgis;raster;shape;sqlite;topojson;test;test_visual_run;test_rendering;test_expression_parse;test_face_ptr_creation;test_font_registration;test_offset_converter;test_proj_transform1;test_quad_tree target(s)) -- FAILED.

Build FAILED.

@wilhelmberg
Copy link
Contributor

wilhelmberg commented Feb 13, 2017

Tried to build just mapnik a second time (scriptcs scripts\build.csx -- build=mapnik) and now get:

<EDIT this happens when test.exe is run EDIT>

image

image

@DiabloRusso
Copy link
Author

DiabloRusso commented Feb 13, 2017

Unfortunately I still get this error (LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs;) <- conflict Release/Debug.

@BergWerkGIS I also get this warning, but still I did not attach importance to it.
I saw that gdal201.dll depends on MSVCP140.dll and VCRUNTIME140.dll. It is necessary to check the build type of gdal!

@wilhelmberg
Copy link
Contributor

wilhelmberg commented Feb 13, 2017

@DiabloRusso gdal is still Release as is libtiff: mapbox/mapnik-vector-tile#231 (comment)

@DiabloRusso
Copy link
Author

@BergWerkGIS To build debug libtiff manually changed \packages\libtiff\nmake.opt and replace line 117 /MD to /MDd

@wilhelmberg
Copy link
Contributor

@DiabloRusso that's great.

Would you be open to contribute those fixes to the Debug branches to get a fully automated process with no manual actions that just works by specifying either "BUILD_TYPE=Debug" or "BUILD_TYPE=Release" when calling settings.bat?

Thinking about

  • zlib
  • libtiff
  • gdal

Like the other patches that live here: https://github.com/mapbox/windows-builds/tree/Debug/patches

@DiabloRusso
Copy link
Author

@BergWerkGIS Ok, I'll try to do it! It will take some time... I am newbie in github))))

@DiabloRusso
Copy link
Author

@BergWerkGIS I create PR
But there was remain one problem, see my first post issue 5., how to fix has_icu = false? If not for that, automatic building was completed successfully(((((

@wilhelmberg
Copy link
Contributor

Thanks @DiabloRusso - we'll find a way to make 5. (icu) work.

I've done several full clean builds now, but I'm still getting the errors posted above when running tests.
Do you see those too?

@DiabloRusso
Copy link
Author

DiabloRusso commented Feb 16, 2017

@BergWerkGIS These errors are I've seen, I had not set the goal to correct the tests, but I'll see)))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants