Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

bits/atomicity.h unable to #include_next <bits/atomicity.h>

Brian VandenbergMar 30 2015 — edited Apr 1 2015

I have an installation of boost 1.46, where non-header only libs were built with solaris studio 12.3.  I know I'll need to recompile those for -std=c++03, but at the moment I'm only worrying about errors from boost headers.  We'll move to a newer version of boost soon (preferably a recent version with better support for solaris studio); it was the most recent version we could get to build with 12.2 / 12.3), but in the interim I thought I'd see how bad the errors were switching over to using -std=c++03.

One of the headers in the SS installation (eg, bits/c++config.h) is setting __GLIBCXX__ and/or __GLIBCPP__.  In boost/smart_ptr/detail/atomic_count.hpp there's the following:

#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)

#  include <boost/smart_ptr/detail/atomic_count_gcc.hpp>

(...)

... which then goes on to include <bits/atomicity.h>.  In the SS installation, lib/compilers/include/CC/gnu/bits/atomicity.h is an interposed header that attempts to #include_next <bits/atomicity.h> (because __GNUC__ and __GNUC_MINOR__ are undefined.  None of the headers in the SS installation set those two macros, and they aren't set internally either), but the only other header of that name is ext/atomicity.h.  I don't have a bits/atomicity.h on my system, nor do I see it in any of my other gcc installations (3.4.6, 4.4.7, 4.6.0, 4.7.2, 4.9.2) for either linux or solaris.

I'll keep tinkering with this, but I thought it might be useful for someone to look at that interposed header and see whether there's something missing from the installation, or if some other correction needs to be made.

-Brian

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 29 2015
Added on Mar 30 2015
1 comment
1,162 views