[gentoo-dev] Re: gcc-5 news item wrt C++ ABI

2015-10-03 Thread Duncan
Anthony G. Basile posted on Sat, 03 Oct 2015 19:53:14 -0400 as excerpted:

> On 10/3/15 7:16 PM, hasufell wrote:
>> On 10/03/2015 04:13 AM, Mike Frysinger wrote:
>>> Title: GCC 5 Defaults to the New C++11 ABI Author: Mike Frysinger
>>> 
>>> Content-Type: text/plain Posted: 2015-10-02 Revision: 1
>>> News-Item-Format: 1.0 Display-If-Installed: >=sys-devel/gcc-5
>>>
>>> GCC 5 uses the new C++ ABI by default.  When building new code, you
>>> might run into link time errors like:
>>> ...: undefined reference to
>>> '_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17'
>>> Or you might see linkage failures with "std::__cxx11::string" in the
>>> output.
>>>
>>> These are signs that you need to rebuild packages using the new C++
>>> ABI.
>>> You can quickly do so by using revdep-rebuild like so:
>>> # revdep-rebuild --library 'libstdc\+\+\.so\.6'
>>>
>> We shouldn't assume a particular PM/toolset in news items, IMO. Just
>> saying that people might have to rebuild packages linked against
>> libstdc++.so.6 should be enough.
>>
>> They can read the docs if they don't know how.
>>
> Nothing precludes adding "see  if you use paludis or clang."
> However, I'd like to see the above in there.

... Or simply...

 "If you have gentoolkit installed, you can quickly do so by using revdep-
rebuild like so:"...

I've seen that wording used before, and it seems reasonable enough to me, 
not assuming anything about whether it's installed, but giving at least 
some guidance to the folks who need it.

(If they don't have gentoolkit installed and don't know why, that it 
doesn't work with their PM or so, they probably simply followed the basic 
handbook install and are thus using portage.  In which case, that's a 
hint to install gentoolkit...  If they're using a PM other than portage, 
an assumption that they can read between the lines and make their own 
decisions on the merits is reasonable, given that they already did so in 
ordered to have that PM in the first place.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




[gentoo-dev] Re: gcc-5 news item wrt C++ ABI

2015-10-03 Thread Ryan Hill
On Sat, 3 Oct 2015 13:04:08 +0800
Jason Zaman  wrote:

> On Fri, Oct 02, 2015 at 10:13:09PM -0400, Mike Frysinger wrote:

> > GCC 5 uses the new C++ ABI by default.  When building new code, you might
> > run into link time errors like:
> > ...: undefined reference to
> > '_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17'
> 
> Exactly what part of this line is the important part? I take it its the
> @GLIBCXX_3.4.17? or is it the lack of the __cxx11::? I have a feeling
> that posted like this and users will think anytime it says undefined
> reference then its a C++ issue which is likely not the case.

If it's got a GLIBCXX symbol version and a mangled name and it broke when you
switched compilers and revdep-rebuild fixes it then you know it's a C++ ABI
issue. :)

The __cxx11 errors look a little different:

cmGlobalGenerator.cxx:(.text+0x12c04): undefined reference to
`Json::Value::Value(std::__cxx11::basic_string const&)'

kfilemetainfo.cpp:(.text+0xfb5): undefined reference to
`Strigi::AnalysisResult::AnalysisResult(std::__cxx11::basic_string const&, long,
Strigi::IndexWriter&, Strigi::StreamAnalyzer&, std::__cxx11::basic_string const&)'

Either way CXX is right there in the error message.  Compare it to something
that fails due to C99 inline:

../../src/tcs/libtcs.a(libtcs_a-tcsps.o): In function 
`psfile_get_parent_uuid_by_uuid':
tcsps.c:(.text+0x3e8): undefined reference to `read_data'

bwm-ng.o: In function `main':
bwm-ng.c:(.text.startup+0x1d3): undefined reference to `get_iface_stats'

Rebuilding won't help with these of course.


-- 
Ryan Hillpsn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463


pgp6GcJOlN1Kg.pgp
Description: OpenPGP digital signature


[gentoo-dev] Re: gcc-5 news item wrt C++ ABI

2015-10-02 Thread Ryan Hill
On Fri, 2 Oct 2015 22:13:09 -0400
Mike Frysinger  wrote:

> Title: GCC 5 Defaults to the New C++11 ABI 
> Author: Mike Frysinger 
> Content-Type: text/plain
> Posted: 2015-10-02
> Revision: 1
> News-Item-Format: 1.0
> Display-If-Installed: >=sys-devel/gcc-5
> 
> GCC 5 uses the new C++ ABI by default.  When building new code, you might run
> into link time errors like:
> ...: undefined reference to '_ZNSt6chrono12steady_clock3nowEv@GLIBCXX_3.4.17'
> Or you might see linkage failures with "std::__cxx11::string" in the output.
> 
> These are signs that you need to rebuild packages using the new C++ ABI.
> You can quickly do so by using revdep-rebuild like so:
> # revdep-rebuild --library 'libstdc\+\+\.so\.6'
> 
> For more details, feel free to peruse:
> https://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
> https://blogs.gentoo.org/blueness/2015/03/10/the-c11-abi-incompatibility-problem-in-gentoo/
> 

LGTM.

-- 
Ryan Hillpsn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463


pgp8sN8qTZUiO.pgp
Description: OpenPGP digital signature