Bug 1313234 - Dictionary compilation fails with #include <sstream>
Summary: Dictionary compilation fails with #include <sstream>
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: root
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-01 08:45 UTC by nvwarr
Modified: 2016-04-28 20:41 UTC (History)
2 users (show)

Fixed In Version: root-6.06.02-1.fc24 root-6.06.02-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-15 21:35:19 UTC


Attachments (Terms of Use)

Description nvwarr 2016-03-01 08:45:45 UTC
Description of problem:

Compilation of a dictionary fails when sstream is included

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

root-5.34.32-8.fc24.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Create a simple file MyClass.hh containing:
#ifndef __MYCLASS_HH__
#define __MYCLASS_HH__
#include <iostream>
#include <sstream>
class MyClass {
 public:
   MyClass() {
      std::cout << "hello, world!" << std::endl;
   };
};
#endif

2.Create a LinkDef.h containing:
#ifdef __CINT__
#pragma link off all classes;
#endif

3.rootcint -f MyClass.Dict.cc -c MyClass.hh

4. g++  -g -Wall -fPIC -I. -pthread -m64 -I/usr/include/root   -c -o MyClass.Dict.o MyClass.Dict.cc

Actual results:

In file included from MyClass.hh:5:0,
                 from MyClass.Dict.h:34,
                 from MyClass.Dict.cc:17:
/usr/include/c++/6.0.0/sstream:300:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
       struct __xfer_bufptrs
       ^~~~~~
<builtin>: recipe for target 'MyClass.Dict.o' failed
make: *** [MyClass.Dict.o] Error 1

Expected results:

Should create a .o file that can be made into a library using:

g++ -shared -Wl,-soname,libMyClass.so -o libMyClass.so MyClass.Dict.o

and then loaded into root with

.L libMyClass.so

Additional info:

Adding -DR__ACCESS_IN_SYMBOL to the compile works around the problem, since rootcint generates code containing:

#if !defined(R__ACCESS_IN_SYMBOL)
//Break the privacy of classes -- Disabled for the moment
#define private public
#define protected public
#endif

It is the #define private public which causes the problems.This interacts badly with sstream, which is where struct __xfer_bufptrs is declared (from libstdc++-devel-6.0.0-0.13.fc24.x86_64).

If the #include <sstream> is removed, it compiles in this case, but obviously not in realistic cases, where sstream is really needed.

Comment 1 nvwarr 2016-03-01 08:48:19 UTC
Ooops, the LinkDef.h makes no difference one way or the other, since it is not actually in the rootcint command:) The problem exists with or without a LinkDef.h

Comment 2 Fedora Update System 2016-04-11 12:57:54 UTC
pythia8-8.2.15-1.el7 root-6.06.02-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-fb4c8595e1

Comment 3 Fedora Update System 2016-04-11 12:58:16 UTC
pythia8-8.2.15-1.fc24 root-6.06.02-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ad70b05a7e

Comment 4 Fedora Update System 2016-04-12 10:53:47 UTC
pythia8-8.2.15-1.fc24, root-6.06.02-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ad70b05a7e

Comment 5 nvwarr 2016-04-12 10:58:22 UTC
It works. Thanks very much.

Comment 6 Fedora Update System 2016-04-13 13:52:21 UTC
pythia8-8.2.15-1.el7, root-6.06.02-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-fb4c8595e1

Comment 7 Fedora Update System 2016-04-15 21:34:59 UTC
pythia8-8.2.15-1.fc24, root-6.06.02-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-04-28 20:40:55 UTC
pythia8-8.2.15-1.el7, root-6.06.02-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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