python-mapnik icon indicating copy to clipboard operation
python-mapnik copied to clipboard

Boost 1.60 bindings problems reintroduced

Open jgreenbaum opened this issue 8 years ago • 7 comments

Commit 8c2fade fixed an issue when building with Boost 1.60. Then commit 6256787 undid the fix. The commit comment doesn't make it clear why the fix was backed out. What is the right thing to do here? Reintroduce the fix? Don't use Boost 1.60 (current stable on Fedora 24)?

jgreenbaum avatar Jul 24 '16 20:07 jgreenbaum

/cc @artemp can you take a look at this?

springmeyer avatar Aug 08 '16 18:08 springmeyer

@jgreenbaum @springmeyer - ok, I'll take a look. BTW, I'm currently building on OS X using boost-1.61 without issues

artemp avatar Aug 08 '16 19:08 artemp

I experienced the problem on Fedora 24. Sorry that wasn't in my report.

-- Jack

@jgreenbaum @springmeyer - ok, I'll take a look. BTW, I'm currently building on OS X using boost-1.61 without issues


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mapnik/python-mapnik/issues/104#issuecomment-238342358

jgreenbaum avatar Aug 08 '16 19:08 jgreenbaum

@jgreenbaum - Thanks for reporting! Having both register_ptr_to_python and also registering conversion in _class constructor is causing runtime warnings. At least on OS X/python-3.5/boost_1_61

/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: to-Python converter for std::__1::shared_ptr<mapnik::geometry::geometry<double> > already registered; second conversion method ignored.
  return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: to-Python converter for std::__1::shared_ptr<mapnik::feature_impl> already registered; second conversion method ignored.
  return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: to-Python converter for std::__1::shared_ptr<mapnik::Featureset> already registered; second conversion method ignored.
  return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: to-Python converter for std::__1::shared_ptr<mapnik::datasource> already registered; second conversion method ignored.
  return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: to-Python converter for std::__1::shared_ptr<mapnik::image_any> already registered; second conversion method ignored.
  return f(*args, **kwds)

/cc @springmeyer @tomhughes

artemp avatar Aug 09 '16 17:08 artemp

@jgreenbaum - ~~could you try latest master and see if this issue is solved~~ I'm seeing other issues creeping in - will take another look tomorrow

artemp avatar Aug 09 '16 17:08 artemp

@jgreenbaum - could you try latest master and see if this issue is solved

Yeah, I'll check it out. I'm in the CEST timezone this week, but my workstation is in PDT, so it will take me a week or so to get to it.

Thanks,

-- Jack

jgreenbaum avatar Aug 09 '16 19:08 jgreenbaum

Hmm. With the latest master I get the run-time warnings, where as previously it failed with no conversion registered. If I disable the register_ptr_to_python calls added under #ifdef to mapnik_python.cpp at line 1068 then the run-time warnings go away and all works as expected. Do we call this fixed or is it worth it for me to back up and figure out exactly which fix did the trick?

jgreenbaum avatar Aug 30 '16 15:08 jgreenbaum