Boost logo

Boost Users :

Subject: Re: [Boost-users] Python TypeError with application compiled with CXX11_ABI=0
From: Jackson Wiegman (jackson_at_[hidden])
Date: 2016-07-29 13:58:10


Thanks Jason

Yeah I ended up just going back and compiling Boost and some other packages
with G++-4.9, though your suggestion may have been less headache for me.

Jackson

Jackson Wiegman
Sr. Director of Engineering
Providius Corp.
Hamilton, ON, Canada
Cell: 289-700-6597
Fax: 647-873-5549
jackson_at_[hidden]
www.providiusdesign.com

On Fri, Jul 29, 2016 at 7:56 AM, Jason Roehm <jasonr_at_[hidden]> wrote:

>
> On Jul 28, 2016, at 4:30 PM, Jackson Wiegman <jackson_at_[hidden]>
> wrote:
>
> Hi,
>
> I have an application I am trying to compile on Ubuntu 16.04. This is
> using GCC 5.4.0 and libboost 1.58.0 (stock libraries).
>
> The application has a linking to a library that was built with GCC 4.*, so
> I have to compile with D_GLIBCXX_USE_CXX11_ABI=0 to get backwards
> comparability (otherwise I have undefined abi:cxx11 links). However when I
> do this, I get a TypeError in Python:
>
> TypeError: No registered converter was able to produce a C++ rvalue of
>> type std::string from this Python object of type str
>
>
> It looks like boost is having a problem working without the ABI. Does
> anyone have a work-around or a patch for this?
>
>
> If you’re linking against the stock Ubuntu 16.04 Boost package, that could
> be an issue. The Ubuntu-packaged Boost is going to have been built with the
> distribution’s packaged gcc version (5.4.0). This version uses the new
> C++11 ABI by default (hence your need to define _GLIBCXX_USE_CXX11_ABI=0
> when you build your application), so the “stock” Boost is going to be using
> the new ABI. You can force your application to use the old ABI, but the
> Boost libraries that you’re linking against (e.g. Boost.Python) are built
> against the new ABI. This is likely to cause problems.
>
> Is this the root cause of your problem? I don’t know. But it’s worth
> building your own Boost with the appropriate _GLIBCXX_USE_CXX11_ABI=0
> setting and see if it helps.
>
> Jason
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net