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

mapnik Python bindings fail with VS2015 Update 3 #92

Open
wilhelmberg opened this issue Jun 29, 2016 · 13 comments
Open

mapnik Python bindings fail with VS2015 Update 3 #92

wilhelmberg opened this issue Jun 29, 2016 · 13 comments
Assignees

Comments

@wilhelmberg
Copy link
Contributor

wilhelmberg commented Jun 29, 2016

/cc @artemp @springmeyer

AppVeyor doesn't build bail on a Python bindings build error so I don't know exactly for how long this has been failing.

Maybe just a missing reference to freetype.lib:

29>Link:
        Creating library lib/python2.7/mapnik/_mapnik.lib and object lib/python2.7/mapnik/_mapnik.exp
     Linker: LibDef Total time = 0.00196s PB: 410066944 [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\lib\python2.7\mapnik\_mapnik.pyd] 
29>mapnik_font_engine.obj : error LNK2019: unresolved external symbol "class mapnik::freetype_engine const volatile * __cdecl boost::get_pointer<class mapnik::freetype_engine const volatile >(class mapnik::freetype_engine const volatile *)" (??$get_pointer@$$CDVfreetype_engine@mapnik@@@boost@@YAPEDVfreetype_engine@mapnik@@PEDV12@@Z) referenced in function "public: static struct _object * __cdecl boost::python::objects::make_instance_impl<class mapnik::freetype_engine,struct boost::python::objects::pointer_holder<class mapnik::freetype_engine *,class mapnik::freetype_engine>,struct boost::python::objects::make_ptr_instance<class mapnik::freetype_engine,struct boost::python::objects::pointer_holder<class mapnik::freetype_engine *,class mapnik::freetype_engine> > >::execute<class mapnik::freetype_engine *>(class mapnik::freetype_engine * &)" (??$execute@PEAVfreetype_engine@mapnik@@@?$make_instance_impl@Vfreetype_engine@mapnik@@U?$pointer_holder@PEAVfreetype_engine@mapnik@@V12@@objects@python@boost@@U?$make_ptr_instance@Vfreetype_engine@mapnik@@U?$pointer_holder@PEAVfreetype_engine@mapnik@@V12@@objects@python@boost@@@456@@objects@python@boost@@SAPEAU_object@@AEAPEAVfreetype_engine@mapnik@@@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj]
29>lib/python2.7/mapnik/_mapnik.pyd : fatal error LNK1120: 1 unresolved externals [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj]
     Linker:   Wait PDB close Total time = 0.00130s PB: 413396992 [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\lib\python2.7\mapnik\_mapnik.pyd] 
     Linker:   Wait type merge Total time = 0.35704s PB: 388227072 [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\lib\python2.7\mapnik\_mapnik.pyd] 
     Linker: Final Total time = 2.66497s < 88804153009 - 88830802662 > PB: 35565568 [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\lib\python2.7\mapnik\_mapnik.pyd] 
29>Done Building Project "c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj" (default targets) -- FAILED.
"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) (29) ->
(Link target) -> 
  mapnik_font_engine.obj : error LNK2019: unresolved external symbol "class mapnik::freetype_engine const volatile * __cdecl boost::get_pointer<class mapnik::freetype_engine const volatile >(class mapnik::freetype_engine const volatile *)" (??$get_pointer@$$CDVfreetype_engine@mapnik@@@boost@@YAPEDVfreetype_engine@mapnik@@PEDV12@@Z) referenced in function "public: static struct _object * __cdecl boost::python::objects::make_instance_impl<class mapnik::freetype_engine,struct boost::python::objects::pointer_holder<class mapnik::freetype_engine *,class mapnik::freetype_engine>,struct boost::python::objects::make_ptr_instance<class mapnik::freetype_engine,struct boost::python::objects::pointer_holder<class mapnik::freetype_engine *,class mapnik::freetype_engine> > >::execute<class mapnik::freetype_engine *>(class mapnik::freetype_engine * &)" (??$execute@PEAVfreetype_engine@mapnik@@@?$make_instance_impl@Vfreetype_engine@mapnik@@U?$pointer_holder@PEAVfreetype_engine@mapnik@@V12@@objects@python@boost@@U?$make_ptr_instance@Vfreetype_engine@mapnik@@U?$pointer_holder@PEAVfreetype_engine@mapnik@@V12@@objects@python@boost@@@456@@objects@python@boost@@SAPEAU_object@@AEAPEAVfreetype_engine@mapnik@@@Z) [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj]
  lib/python2.7/mapnik/_mapnik.pyd : fatal error LNK1120: 1 unresolved externals [c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\build\_mapnik.vcxproj]

@wilhelmberg wilhelmberg self-assigned this Jun 29, 2016
@springmeyer
Copy link

Seems like this might be related to https://github.com/mapnik/python-mapnik/blob/master/src/boost_std_shared_shim.hpp. Could BOOST_NO_CXX11_SMART_PTR be being set to true in this build?

@wilhelmberg
Copy link
Contributor Author

Could BOOST_NO_CXX11_SMART_PTR be being set to true in this build?

As far as I can tell that's not the problem.
Used compiler switches /E, /E, /P, /EP to dump all preprocessor directives to files and looking through them couldn't find any reference to BOOST_NO_CXX11_SMART_PTR.

@wilhelmberg
Copy link
Contributor Author

Also tried additionally linking to freetype.lib, but the output of the /VERBOSE linker switch tells me that it is not used.
Being already linked into to mapnik.dll before.

Unused libraries:
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk/lib/\freetype.lib
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk/lib/\libboost_regex-vc140-mt-1_60.lib
  c:\mb\windows-builds-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk/lib/\icuin.lib
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64\OLDNAMES.lib
  C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\uuid.lib

@stoicio
Copy link

stoicio commented Jul 18, 2016

Hello !
I am running into the same error as above. Is there a resolution for this ? Or as a temporary fix will switching to a old commit help ?

@wilhelmberg
Copy link
Contributor Author

@MBHala as temporary workaround till we find a solution you can use the pre-built Windows mapnik SDK without Python bindings.

64-bit:
https://mapnik.s3.amazonaws.com/dist/dev/mapnik-win-sdk-v3.0.11-163-g00e5d00-x64-14.0.7z

32-bit:
https://mapnik.s3.amazonaws.com/dist/dev/mapnik-win-sdk-v3.0.11-163-g00e5d00-x86-14.0.7z

@jadavbheda
Copy link

jadavbheda commented Aug 3, 2016

If any one still wants to compile one on their own, they can do so after uninstalling VS 2015 update 2.

Below are the steps that I followed:

Dependencies:

  • 64bit windows 7 or later operating system
  • Visual Studio 2015 with Update 2 (Not available on Microsoft site. Use below link to download it.)

Download link -
[Important note* - Make sure you install VS2015 without 'update 3'. If you go with recommended installation wizzard then it will automatically install the update 3. Hence, choose the custom installation option and uncheck the 'update 3' checkbox.]

  • Python 2.7 32 bit installed into C:\Python27 [No. 64-bit version of python is not going to work. Don't even experiment!]

git installed into C:\Program Files (x86)\Git

Mapbox script:

@thisisbinod
Copy link

Any update on this?

@wilhelmberg
Copy link
Contributor Author

@thisisbinod currently no update, but we plan on testing with VS2017 within a few weeks.

@alex85k
Copy link

alex85k commented Apr 23, 2017

@wilhelmberg
Copy link
Contributor Author

^^ /cc @springmeyer @artemp

@alex85k
Copy link

alex85k commented Apr 23, 2017

The suggested workaround worked for pyosimium:
osmcode/pyosmium@3fa3471

@springmeyer
Copy link

Thank you so much for that insight @alex85k. We should try this with mapnik.

@alex85k
Copy link

alex85k commented Apr 25, 2017

I am certified Google&StackOverflow user :)
The only problem with this workaround is that additional get_pointer functions should not be defined twice.

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

6 participants