Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for ROOT6 limitation #1843

Merged

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Dec 17, 2013

ROOT6 uses a version of the llvm just in time compiler that cannot handle embedded assembler code.
boost/shared_ptr.hpp contains (indirectly) two headers that contain assembler. This breaks many framework unit tests.
This workaround sets preprocessor variables recognized by boost that are used if and only if ROOTCLING is defined. These preprocessor definitions cause the assembler code to not be included. This fixes the unit test errors.
The final fix for this problem should be either that ROOT6 is fixed to handle assembler, OR that CMSSW replaces with std::shared_ptr those uses of boost::shared_ptr that cause problems

I accidentally closed #1842. This is a duplicate of #1842

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wmtan for CMSSW_7_0_ROOT6_X.

Workaround for ROOT6 limitation

It involves the following packages:

DataFormats/Common
DataFormats/FWLite
DataFormats/Provenance
DataFormats/Streamer
DataFormats/TestObjects
DataFormats/WrappedStdDictionaries
FWCore/Common
FWCore/MessageLogger
FWCore/TFWLiteSelector
FWCore/TFWLiteSelectorTest
FWCore/Utilities

@cmsbuild, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.

@wmtan
Copy link
Contributor Author

wmtan commented Dec 17, 2013

Unfortunately, contrary to what the ROOT team says, using BOOST_SP_USE_SPINLOCK does not fix the problem, for two separate reasons: 1) the headers pulled in by spinlock also contain assembler, AND 2) boost/shared_ptr contains (indirectly) a second header that includes assembler that is unaffected by spinlock.

Refactoring the code to use std::shared ptr is a good idea but far from easy, because the framework uses many other boost constructs that require boost::shared_ptr.

davidlt added a commit that referenced this pull request Dec 17, 2013
@davidlt davidlt merged commit 5e1d92b into cms-sw:CMSSW_7_0_ROOT6_X Dec 17, 2013
@wmtan wmtan deleted the WorkaroundForROOT6Limitation branch December 18, 2013 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants