mapbox / windows-builds

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

Boost 1.60 #88

Closed wilhelmberg closed 8 years ago

wilhelmberg commented 8 years ago

refs https://github.com/mapnik/mapnik/issues/3333 https://github.com/mapnik/mapnik-packaging/commit/c2b46038b3935eab1aa394a114a074802ef3a3ba

@springmeyer seeing this on Windows:

expression_node.obj : error LNK2019: unresolved external symbol "public: class std::vector<int,class std::allocator<int> > __cdecl boost::re_detail_106000::icu_regex_traits_implementation::do_transform(int const *,int const *,class icu_56::Collator const *)const " (?do_transform@icu_regex_traits_implementation@re_detail_106000@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0PEBVCollator@icu_56@@@Z) referenced in function "public: class std::vector<int,class std::allocator<int> > __cdecl boost::re_detail_106000::icu_regex_traits_implementation::transform(int const *,int const *)const " (?transform@icu_regex_traits_implementation@re_detail_106000@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
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<wchar_t const *,int> __cdecl boost::re_detail_106000::re_is_set_member<class boost::u16_to_u32_iterator<wchar_t const *,int>,int,class boost::icu_regex_traits,unsigned __int64>(class boost::u16_to_u32_iterator<wchar_t const *,int>,class boost::u16_to_u32_iterator<wchar_t const *,int>,struct boost::re_detail_106000::re_set_long<unsigned __int64> const *,struct boost::re_detail_106000::regex_data<int,class boost::icu_regex_traits> const &,bool)" (??$re_is_set_member@V?$u16_to_u32_iterator@PEB_WH@boost@@HVicu_regex_traits@2@_K@re_detail_106000@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-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
expression_node.obj : error LNK2019: unresolved external symbol "private: class boost::basic_regex<int,class boost::icu_regex_traits> & __cdecl boost::basic_regex<int,class boost::icu_regex_traits>::do_assign(int const *,int const *,unsigned int)" (?do_assign@?$basic_regex@HVicu_regex_traits@boost@@@boost@@AEAAAEAV12@PEBH0I@Z) referenced in function "class boost::basic_regex<int,class boost::icu_regex_traits> __cdecl boost::re_detail_106000::do_make_u32regex<wchar_t const *>(wchar_t const *,wchar_t const *,unsigned int,struct boost::mpl::int_<2> const *)" (??$do_make_u32regex@PEB_W@re_detail_106000@boost@@YA?AV?$basic_regex@HVicu_regex_traits@boost@@@1@PEB_W0IPEBU?$int_@$01@mpl@1@@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
lib\mapnik.dll : fatal error LNK1120: 3 unresolved externals [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
springmeyer commented 8 years ago

@BergWerkGIS if you are seeing this locally it may be the same problem I had whereby older boost versions were still around and conflicting. I had to clean out my installation directory completely of boost libs and headers and then the problem went away. If you are seeing this remotely on a clean build then it may be that the icu configure check is failing and boost is being built without ICU support. I saw this and came up with this quick fix that enables ICU no matter what the configure check says (which works nicely): https://github.com/mapnik/mapnik-packaging/blob/master/osx/patches/boost_icu_check.diff

wilhelmberg commented 8 years ago

Yes, locally, but I'm 99% percent sure I got rid of all leftovers of previous (boost) builds. Tried twice locally, but haven't tried remotely yet.

quick fix that enables ICU no matter what the configure check says

Quite a sophisticated fix :smirk:

springmeyer commented 8 years ago

@BergWerkGIS still broken or working now?

wilhelmberg commented 8 years ago

@springmeyer still broken.

Currently hitting

c:\mb\windows-builds-64\packages\mapnik-master\include\mapnik/util/variant.hpp(27): 
fatal error C1083: Cannot open include file: 'mapbox/variant.hpp': No such file or directory 
(compiling source file ..\..\src\renderer_common\render_group_symbolizer.cpp) 
[c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]

Despite having added "../deps/mapbox/variant/include/" to common_includes: https://github.com/mapnik/mapnik-gyp/commit/6f393f904e757bec907375ce655aba6acedb046f

wilhelmberg commented 8 years ago

Ah, had a typo in common_includes, past that now.

Local (boost@1.60) errors are similar to those on AppVeyor (boost@1.59): e.g. https://ci.appveyor.com/project/Mapbox/mapnik/build/1.0.965#L1021

Additionally to AppVeyor I get the errors mentioned in the original post locally.

wilhelmberg commented 8 years ago

@springmeyer @artemp

Getting those errors with mapnik-json. Tried with boost@1.59, boost@1.60 and boost@1.61.0 beta.

My hunch is that maybe boost doesn't use C++14 features with VS2015 (hit the same problem with OSRM).

Any other ideas?

"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.sln" (default target) (1) ->
"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\topojson.vcxproj.metaproj" (default target) (24) ->
"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj" (default target) (25) ->
(ClCompile target) -> 
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/qi/detail/assign_to.hpp(152): error C2440: 'static_cast': cannot convert from 'const std::vector<mapnik::json::json_object_element,std::allocator<_Ty>>' to 'mapnik::json::json_value' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/qi/detail/assign_to.hpp(152): error C2440: 'static_cast': cannot convert from 'const double' to 'mapnik::json::json_value' (compiling source file ..\..\src\json\mapnik_json_geometry_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2679: binary '=': no operator found which takes a right-hand operand of type 'double' (or there is no acceptable conversion) (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2672: 'boost::proto::detail::check_reference': no matching overloaded function found (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2679: binary '=': no operator found which takes a right-hand operand of type 'double' (or there is no acceptable conversion) (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2672: 'boost::type_of::typeof_register_type': no matching overloaded function found (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2027: use of undefined type 'boost::type_of::msvc_extract_type<boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_and_hidden_nested_result_type,boost::type_of::msvc_extract_type_default_param>::id2type_impl<true>' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2955: 'boost::type': use of class template requires template argument list (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2955: 'boost::mpl::if_c': use of class template requires template argument list (compiling source file ..\..\src\json\mapnik_json_feature_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2039: 'type': is not a member of 'boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_result_type' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2027: use of undefined type 'boost::type_of::msvc_extract_type<boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_and_hidden_nested_result_type,boost::type_of::msvc_extract_type_default_param>::id2type_impl<true>' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2039: 'type': is not a member of 'boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_result_type' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2679: binary '=': no operator found which takes a right-hand operand of type 'double' (or there is no acceptable conversion) (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2672: 'boost::proto::detail::check_reference': no matching overloaded function found (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2679: binary '=': no operator found which takes a right-hand operand of type 'double' (or there is no acceptable conversion) (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2672: 'boost::type_of::typeof_register_type': no matching overloaded function found (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2027: use of undefined type 'boost::type_of::msvc_extract_type<boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_and_hidden_nested_result_type,boost::type_of::msvc_extract_type_default_param>::id2type_impl<true>' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2955: 'boost::type': use of class template requires template argument list (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2955: 'boost::mpl::if_c': use of class template requires template argument list (compiling source file ..\..\src\json\mapnik_topojson_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2039: 'type': is not a member of 'boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_result_type' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2027: use of undefined type 'boost::type_of::msvc_extract_type<boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_and_hidden_nested_result_type,boost::type_of::msvc_extract_type_default_param>::id2type_impl<true>' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2039: 'type': is not a member of 'boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_result_type' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]
springmeyer commented 8 years ago

@artemp - this looks like something to do with your recent json commits - it will block the release: can you take a look?

artemp commented 8 years ago

@springmeyer - looks like it doh.. will take a look

artemp commented 8 years ago

@BergWerkGIS - can you elaborate re: "My hunch is that maybe boost doesn't use C++14 features with VS2015 (hit the same problem with OSRM)." ? What was the issue with OSRM/boost c++14?

wilhelmberg commented 8 years ago

If C++14 features are the problem I could go through Macros that describe C++14 features not supported and comment them, rebuild and see if it helps.

AFAIK latest VS2015 Update 2 should support all C++14 (and some C++17) features, but boost doesn't use them (screenshot from 1.61 beta):

image

wilhelmberg commented 8 years ago

Oops, we commented at the same time.

What was the issue with OSRM/boost c++14?

Problem was that OSRM code used some specific C++14 boost features. But that didn't compile as boost disables C++14 with VS2015.

artemp commented 8 years ago

We're not using any c++14 features only c++11.

Reading through errors I noticed:

 c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/proto/transform/default.hpp(154): error C2027: use of undefined type 'boost::type_of::msvc_extract_type<boost::proto::detail::default_assign<Grammar>::impl<Expr &,State,Data>::nested_and_hidden_nested_result_type,boost::type_of::msvc_extract_type_default_param>::id2type_impl<true>' [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik-json.vcxproj]

which indicates that perhaps boost is not configured and/or built correctly ? http://www.boost.org/doc/libs/1_60_0/boost/typeof/msvc/typeof_impl.hpp <--- various workarounds specific for VC++ that maybe not activated with VS2015 ?

daniel-j-h commented 8 years ago

Problem was that OSRM code used some specific C++14 boost features.

Interesting, which ones in particular? OSRM is stuck on C++11 at the moment, I can't remember us doing the switch.

wilhelmberg commented 8 years ago

@daniel-j-h I thought there was a c++14 branch that I tried, didn't I?

daniel-j-h commented 8 years ago

Ah sorry, yes I forgot about https://github.com/Project-OSRM/osrm-backend/pull/1975 --- never landed though since we're blocked mainly by https://github.com/Project-OSRM/node-osrm/pull/153.

wilhelmberg commented 8 years ago

Reopening this issue as it is about boost@1.60 and https://github.com/mapnik/mapnik/commit/dc8494357585b218c54bfd5d1743568345daaaee was tested with boost@1.59.

Next step: try with boost@1.60.

wilhelmberg commented 8 years ago

Errors with boost@1.60 still persist:

"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.sln" (default target) (1) ->
"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj.metaproj" (default target) (2) ->
"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj" (default target) (27) ->
(Link target) -> 
  expression_node.obj : error LNK2019: unresolved external symbol "public: class std::vector<int,class std::allocator<int> > __cdecl boost::re_detail_106000::icu_regex_traits_implementation::do_transform(int const *,int const *,class icu_56::Collator const *)const " (?do_transform@icu_regex_traits_implementation@re_detail_106000@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0PEBVCollator@icu_56@@@Z) referenced in function "public: class std::vector<int,class std::allocator<int> > __cdecl boost::re_detail_106000::icu_regex_traits_implementation::transform(int const *,int const *)const " (?transform@icu_regex_traits_implementation@re_detail_106000@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
  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<wchar_t const *,int> __cdecl boost::re_detail_106000::re_is_set_member<class boost::u16_to_u32_iterator<wchar_t const *,int>,int,class boost::icu_regex_traits,unsigned __int64>(class boost::u16_to_u32_iterator<wchar_t const *,int>,class boost::u16_to_u32_iterator<wchar_t const *,int>,struct boost::re_detail_106000::re_set_long<unsigned __int64> const *,struct boost::re_detail_106000::regex_data<int,class boost::icu_regex_traits> const &,bool)" (??$re_is_set_member@V?$u16_to_u32_iterator@PEB_WH@boost@@HVicu_regex_traits@2@_K@re_detail_106000@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-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
  expression_node.obj : error LNK2019: unresolved external symbol "private: class boost::basic_regex<int,class boost::icu_regex_traits> & __cdecl boost::basic_regex<int,class boost::icu_regex_traits>::do_assign(int const *,int const *,unsigned int)" (?do_assign@?$basic_regex@HVicu_regex_traits@boost@@@boost@@AEAAAEAV12@PEBH0I@Z) referenced in function "class boost::basic_regex<int,class boost::icu_regex_traits> __cdecl boost::re_detail_106000::do_make_u32regex<wchar_t const *>(wchar_t const *,wchar_t const *,unsigned int,struct boost::mpl::int_<2> const *)" (??$do_make_u32regex@PEB_W@re_detail_106000@boost@@YA?AV?$basic_regex@HVicu_regex_traits@boost@@@1@PEB_W0IPEBU?$int_@$01@mpl@1@@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
  lib\mapnik.dll : fatal error LNK1120: 3 unresolved externals [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
artemp commented 8 years ago

@BergWerkGIS - this above looks familiar, was boost-regex built with correct ICU etc ?

wilhelmberg commented 8 years ago

I think I found the problem, seems something has changed with boost build. References cannot be found because they are not exported properly. BOOST_REGEX_DECL should be set to BOOST_SYMBOL_EXPORT (__declspec (dllexport)) but it is not, thus icu_regex_traits not being available.

Investigating ...

wilhelmberg commented 8 years ago

ha, found the real reason: utility has_icu.exe fails to build, thus ICU cannot be detected :smirk:

wilhelmberg commented 8 years ago

Got a successful mapnikbuild going:


Still trying to figure out why has_icu.exe doesn't build. Tried with boost@1.60 and boost@1.61. Completely removed all files between tries, including %TEMP%\b2*.cmd.


Probably a typo in one of the scripts or jam files.

rsp/manifest files:


Interesting that has_icu.exe seems to get built in Debug when doing a Release build. We've run into build problems before when boostrelease builds failed because they were looking for ICU debug builds.

image

wilhelmberg commented 8 years ago

Couldn't find any error messages of failed has_icu.exe build with the default settings.


After un-commenting #define BOOST_HAS_ICU in boost\regex\user.hpp I get this in bin.v2\config.log (using ICU@56.1 and boost@1.61):

file bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_test.obj.rsp
"libs\regex\build\has_icu_test.cpp" -Fo"bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_test.obj"    -TP /Z7 /Od /Ob0 /W4 /GR /MDd /Zc:forScope /Zc:wchar_t /favor:blend /wd4675 /EHs -c 
-DBOOST_ALL_NO_LIB=1 
-DBOOST_HAS_ICU=1 
"-I." 
"-Ic:\mb\windows-builds-64\packages\icu\include"
compile-c-c++ bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_test.obj

    call "C:\Users\ADMINI~1\AppData\Local\Temp\2\b2_msvc_14.0_vcvarsall_amd64.cmd" >nul
cl /Zm800 -nologo @"bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_test.obj.rsp" 

has_icu_test.cpp

file bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe.rsp

"bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_test.obj"    
msvc.link bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe

        call "C:\Users\ADMINI~1\AppData\Local\Temp\2\b2_msvc_14.0_vcvarsall_amd64.cmd" >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /MACHINE:X64 /MANIFEST /subsystem:console /out:"bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe"  c:\mb\windows-builds-64\packages\icu\lib64\icuuc.lib @"bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe.rsp"
        if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

has_icu_test.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class icu_56::Collator * __cdecl icu_56::Collator::createInstance(class icu_56::Locale const &,enum UErrorCode &)" (__imp_?createInstance@Collator@icu_56@@SAPEAV12@AEBVLocale@2@AEAW4UErrorCode@@@Z) referenced in function main
bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe : fatal error LNK1120: 1 unresolved externals
...failed msvc.link bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.exe bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.pdb...
...removing bin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi\has_icu_exe.pdb
...skipped <pbin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi>has_icu.output for lack of <pbin.v2\libs\regex\build\msvc-14.0\debug\address-model-64\threading-multi>has_icu_exe.exe...
...failed updating 2 targets...
...skipped 1 target...
...updated 8 targets...
...found 1 target...
...updating 1 target...
wilhelmberg commented 8 years ago

Alright, I'm down to the root cause: ICU detection on Windows seems to be flawed in boost@1.60/1.61 and the library references (icu*.lib) not set correctly, despite passing ICU_PATH and ICU_LINK to b2.


I created a new VS2015 solution based on regex/build/has_icu_test.cpp@1.61. After setting include and linker properties correctly it builds just fine.

Running it I get U_FILE_ACCESS_ERROR despite having set ICU_DATA before:

image

wilhelmberg commented 8 years ago

Before I pointed ICU_DATA to the icudt56l.dat (~7MB) we distribute with mapnik, which seems to be a stripped down version => U_FILE_ACCESS_ERROR.

Pointing ICU_DATA to icu\source\data\in\icudt56l.dat (~24MB) makes U_FILE_ACCESS_ERROR go away.

Next, looking into making boost find icu again.

wilhelmberg commented 8 years ago

Finally :tada: works again with boost@1.59 :tada: and boost@1.60 :tada:.


boost@1.61 shows 2 errors (/cc @artemp ):

"c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj" (ClCompile target) (1) ->
(ClCompile target) -> 
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/support/attributes.hpp(1036): error C2672: 'swap': no matching overloaded function found (compiling source file ..\..\src\image_filter_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/support/attributes.hpp(1036): error C2784: 'void boost::spirit::swap(boost::spirit::multi_pass<T,Policies> &,boost::spirit::multi_pass<T,Policies> &)': could not deduce template argument for 'boost::spirit::multi_pass<T,Policies> &' from 'mapnik::color' (compiling source file ..\..\src\image_filter_grammar.cpp) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\mapnik.vcxproj]

Takeaways

/cc @springmeyer wrt https://github.com/mapnik/mapnik-packaging/blob/master/osx/patches/boost_icu_check.diff

SET ICU_LINK="/LIBPATH:%PKGDIR%\icu\lib64 icuuc.lib icuin.lib icudt.lib"

Commit https://github.com/mapbox/windows-builds/commit/f85b64ed3528e2f2454e8065ec8f92b70362f69c

springmeyer commented 8 years ago

Thank you thank you thank you @BergWerkGIS

wilhelmberg commented 8 years ago

boost quest to be continued for 1.61 #90