Increase the margin of error for error 1.64 on Solaris

<built-in>: note: this is the location of the previous definition
In file included from /usr/include/limits.h:12:0,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/limits.h:168,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/syslimits.h:7,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/limits.h:34,
                 from ./boost/log/detail/config.hpp:33,
                 from libs/log/src/attribute_set.cpp:16:
/export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications       and pre-2001 POSIX applications"
 #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
  ^~~~~

"g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -pthreads -m32 -fno-strict-aliasing -ftemplate-depth-1024 -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_USE_AVX2 -DBOOST_LOG_USE_SSSE3 -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_LOG_WITHOUT_IPC -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D__STDC_CONSTANT_MACROS  -I"." -I"libs/log/src" -c -o "bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/attribute_set.o" "libs/log/src/attribute_set.cpp"

...failed gcc.compile.c++ bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/attribute_set.o...
gcc.compile.c++ bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/attribute_value_set.o
<command-line>:0:0: warning: "_XOPEN_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
In file included from /usr/include/limits.h:12:0,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/limits.h:168,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/syslimits.h:7,
                 from /export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/limits.h:34,
                 from ./boost/log/detail/config.hpp:33,
                 from libs/log/src/attribute_value_set.cpp:16:
/export/home/user/gcc-6.2.0.bin/lib/gcc/i386-pc-solaris2.11/6.2.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications       and pre-2001 POSIX applications"
 #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
  ^~~~~

"g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -pthreads -m32 -fno-strict-aliasing -ftemplate-depth-1024 -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_USE_AVX2 -DBOOST_LOG_USE_SSSE3 -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_LOG_WITHOUT_IPC -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D__STDC_CONSTANT_MACROS  -I"." -I"libs/log/src" -c -o "bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/attribute_value_set.o" "libs/log/src/attribute_value_set.cpp"

...failed gcc.compile.c++ bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/attribute_value_set.o...
gcc.compile.c++ bin.v2/libs/log/build/gcc-6.2.0/release/link-static/threading-multi/code_conversion.o
<command-line>:0:0: warning: "_XOPEN_SOURCE" redefined




...skipped <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>libboost_log.so.1.64.0 for lack of <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>attribute_name.o...
...skipped <pstage/lib>libboost_log.so.1.64.0 for lack of <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>libboost_log.so.1.64.0...
...skipped <pstage/lib>libboost_log.so for lack of <pstage/lib>libboost_log.so.1.64.0...
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
                 from ./boost/log/detail/config.hpp:33,
                 from ./boost/log/detail/setup_config.hpp:20,
...skipped <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>libboost_log_setup.so.1.64.0 for lack of <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>setup/parser_utils.o...
...skipped <pstage/lib>libboost_log_setup.so.1.64.0 for lack of <pbin.v2/libs/log/build/gcc-6.2.0/release/threading-multi>libboost_log_setup.so.1.64.0...
...skipped <pstage/lib>libboost_log_setup.so for lack of <pstage/lib>libboost_log_setup.so.1.64.0...

      

There are some error logs in building Boost C ++ Libraries 1.64 with GCC version 6.2. What is the problem? This is one of many error logs.

$b2

      

This happened while executing the above command. The python logs and libraries had intense error logs.

I wonder why this error happened.

  • Build environment
  • Oracle Solaris 11.2 x86 Jun 23, 2014
  • GCC 6.2
  • Create target
  • Boost C ++ Libraries 1.64
+3


source to share


2 answers


I think you are pushing this piece of standards check in feature_test.h:

#if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
        and pre-2001 POSIX applications"
#elif !defined(_STDC_C99) && \
        (defined(__XOPEN_OR_POSIX) && defined(_XPG6))
#error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
        require the use of c99"
#endif

      

and this is the first #error run.



UNIX standards have many (confusing) names, POSIX, Xopen, IEEE XPG, SUS. Before using Single Unix Standard 3 (SUSv3) C90. SUSv3 and after using C99. g ++ 6.2 which is the default for C ++ 14 for C ++ also sets the c11 ( #define __STDC_VERSION__ 201112L

) flags

The bottom line of all this is that you probably need to install the _XPG6 macro. Usually you don't do it directly, you have to set _XOPEN_SOURCE to 600 and I can see that it is set on your 500 command line.

+3


source


As was discovered in the discussion following Paul Floyd 's answer , Solaris headers are incompatible with C ++, which leads to the errors you see.

This can be worked around by changing the Boost.Log sources, libs / log / build / Jamfile.v2, line 256. Change this:

<target-os>solaris:<define>_XOPEN_SOURCE=500

      

:



<target-os>solaris:<define>_XOPEN_SOURCE=600

      

(I have shortened the comment for brevity).

In Boost 1.65, the library should try to fix the problem automatically, so this modification is not required.

-1


source







All Articles