Bug 1293531 - GCC5.3.1 in fedora23 have a bug, not good for the developers!
GCC5.3.1 in fedora23 have a bug, not good for the developers!
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
x86_64 Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 23:18 EST by blackbear008
Modified: 2015-12-22 05:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-22 03:07:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the gcc different on Fedora22 and Fedora23 (289.37 KB, image/png)
2015-12-21 23:18 EST, blackbear008
no flags Details

  None (edit)
Description blackbear008 2015-12-21 23:18:39 EST
Created attachment 1108558 [details]
the gcc different on Fedora22 and Fedora23

Description of problem:
GCC5.3.1  in  fedora23  have a bug, not good for the developers!
As a developer, we have a lot of library files is compiled in gcc4.I spent a lot of time checking  my C++ code to find the error.Because my code is ok on fedora22(gcc 5.3.1) , but not ok on fedora23( the same gcc 5.3.1).
At last I find a tiny difference about the gcc on F22 and f23. 
There is a switch in gcc configure: --with-default-libstdcxx-abi = gcc-compatible.

And gcc group has this Caution on gcc 5.3:
http://www.linuxfromscratch.org/blfs/view/svn/general/gcc.html
They said:
The 5.1.0 version of GCC introduces an incompatible ABI change in the C++ library libstdc++.so. This does not prevent using programs compiled with the previous version of GCC , since both old and new symbols are available in the library. But compiling, with the new version, programs which use libraries compiled with the old version is likely to give errors. So, if you are upgrading from any previous version prior to 5.1.0, you have two solutions: recompile all the libraries with the new version, or use the --with-default-libstdcxx-abi switch to configure.

As a developer , I spent days to check this out. Maybe thousands of developers have the same trouble.

Version-Release number of selected component (if applicable):
gcc 5.1.1 upper

How reproducible:
update the gcc rpm, and add this --with-default-libstdcxx-abi=gcc4-compatible switch.

Steps to Reproduce:
1.rebuild the gcc5.3.1 rpm package for fedora23, and add the --with-default-libstdcxx-abi=gcc4-compatible switch to gcc.
2.
3.

Actual results:
new gcc 5.3.1 will support gcc4 library files. and the junior developers will no face the problems with gcc, without the switch.

Expected results:
gcc5.3.1 rpm package for fedora23, and add the --with-default-libstdcxx-abi=gcc4-compatible switch to gcc.

Additional info:
Comment 1 blackbear008 2015-12-22 03:04:30 EST
I think I have found where the bug came from. GNU has updated the gcc to 5.3 , and have release the fix methods:

http://www.gnu.org/software/gcc/gcc-5/changes.html
Runtime Library (libstdc++)

A Dual ABI is provided by the library. A new ABI is enabled by default. The old ABI is still supported and can be used by defining the macro _GLIBCXX_USE_CXX11_ABI to 0 before including any C++ standard library headers.


you need to add this to your code:

#define _GLIBCXX_USE_CXX11_ABI 0.

I still suggest fedora to add the switch:--with-default-libstdcxx-abi=gcc4-compatible in the next update adout gcc 5.3.1.

thank you very much.
Comment 2 Jakub Jelinek 2015-12-22 03:07:27 EST
This is of course not a bug, but intentional decision.  The new ABI is there so that libstdc++ can satisfy the C++11 requirements, the old ABI violates some of the C++11 requirements e.g. on std::string or std::list templates.
The reason why F22 has been built with gcc4-compatible ABI is that there wasn't enough time in the schedule to mass rebuild everything, but in F23 all the packages have been rebuilt.
Comment 3 blackbear008 2015-12-22 03:16:44 EST
Jakub Jelinek , thank you very much.

But maybe thousands of C++ developer have to add this:
#define _GLIBCXX_USE_CXX11_ABI 0

to their code.

most of them do not know this.And finding the problems in their code and setting about the LD_LIBRARY_PATH or others .

you know, lots of company(such as ORACLE, IBM) doesn't update their library files to the new version of gcc5.3. Developers will not use those files happy.


I hope they can see this bugzilla,even it is not a bug. And Hope the companys will update all their librarys quickly.
Comment 4 Jonathan Wakely 2015-12-22 05:56:56 EST
(In reply to blackbear008 from comment #3)
> I hope they can see this bugzilla,even it is not a bug. And Hope the
> companys will update all their librarys quickly.

The change has already been documented in much more visible places than this bugzilla entry.

http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
https://fedoramagazine.org/gcc-5-in-fedora-whats-an-abi-and-what-happens-when-we-change-it/

Note You need to log in before you can comment on or make changes to this bug.