Boost C++ Libraries: Ticket #12098: Tests fail with #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications... https://svn.boost.org/trac10/ticket/12098 <p> Compiling with Oracle Solaris Studio12.5 several log several tests fail as follows: </p> <p> "CC" -std=c++11 -temp=/tmp/bn -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=600 -D<span class="underline">EXTENSIONS</span> -D<span class="underline">STDC_CONSTANT_MACROS -D</span>typeof<span class="underline">=</span>typeof<span class="underline"> -I".." -c -o "/export/home/sstrunk-tester/boost_regression/boost_regression_develop/boost_sparc-S2_cpp11/results/boost/bin.v2/libs/log/build/sun-12.5_cpp11/release/build-no/log-api-unix/threading-multi/once_block.o" "../libs/log/src/once_block.cpp" </span></p> <p> "/usr/include/sys/feature_tests.h", line 359: Error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications ?require the use of c99". </p> <p> See for example: <a href="http://www.boost.org/development/tests/develop/developer/output/oracle-sparc-S2-12-5-cpp11-boost-bin-v2-libs-log-test-attr_attribute_set-test-sun-12-5_cpp11-release-build-no-threading-multi.html">http://www.boost.org/development/tests/develop/developer/output/oracle-sparc-S2-12-5-cpp11-boost-bin-v2-libs-log-test-attr_attribute_set-test-sun-12-5_cpp11-release-build-no-threading-multi.html</a> </p> <p> The test passes, if '-D_XOPEN_SOURCE=600' is removed from the command line. So, inside libs/log/build/Jamfile.v2 removing the following line causes the compilation to succeed: </p> <p> &lt;target-os&gt;solaris:&lt;define&gt;_XOPEN_SOURCE=600 </p> <p> Output after removing '-D_XOPEN_SOURCE=600'from the command line. </p> <p> $CC -std=c++11 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DDATE_TIME_INLINE -DNDEBUG -D<span class="underline">EXTENSIONS</span> -D<span class="underline">STDC_CONSTANT_MACROS -D</span>typeof<span class="underline">=</span>typeof<span class="underline"> -I.. -c -o ./once_block.o ../libs/log/src/once_block.cpp </span></p> <p> $ </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12098 Trac 1.4.3 Aparna Kumta <aparna.kumta@…> Fri, 25 Mar 2016 19:39:21 GMT <link>https://svn.boost.org/trac10/ticket/12098#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12098#comment:1</guid> <description> <p> I see that previously, libs/log/build/Jamfile.v2 had '-D_XOPEN_SOURCE=500' defined. That seems to work. The change to '-D_XOPEN_SOURCE=600' is causing the failure when compiling with Oracle Solaris Studio 12.5. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Fri, 25 Mar 2016 20:23:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12098#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12098#comment:2</guid> <description> <p> Please, report this to Oracle. The headers should be compilable in C++11 mode. </p> <p> Does it fix the problem if you add "&lt;target-os&gt;solaris:&lt;define&gt;_STDC_C99" on the next line after "&lt;target-os&gt;solaris:&lt;define&gt;_XOPEN_SOURCE=600"? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Fri, 01 Apr 2016 07:58:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12098#comment:3 https://svn.boost.org/trac10/ticket/12098#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket