|
Boost : |
Subject: [boost] [log] Boost 1.62 cannot compile log with Oracle Developer Studio 12.5
From: Aparna Kumta (aparna.kumta_at_[hidden])
Date: 2016-09-14 12:21:47
Compiling Boost.log with Oracle Developer Studio 12.5, we see the
following failure:
% "CC" -std=c++11 -library=stdcpp,CrunG3 -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_HAS_PTHREAD_MUTEX_ROBUST
-DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -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=500
-D__EXTENSIONS__ -D__STDC_CONSTANT_MACROS -D__typeof__=__typeof__
-I"../../.." -I"../../../libs/log/src" -c -o
"../../../bin.v2/libs/log/build/sun/release/stdlib-gnu/threading-multi/posix/ipc_reliable_message_queue.o"
"../../../libs/log/src/posix/ipc_reliable_message_queue.cpp"
"../../../libs/log/src/posix/ipc_reliable_message_queue.cpp", line 61:
Error: #error Boost.Log: Native 32-bit atomic operations are required
but not supported by Boost.Atomic on the target platform.
This seems to be a configuration issue.
The following changes seems to work:
1) In boost/atomic/detail/platform/platform.hpp
% !diff
diff ./platform.hpp ./platform.hpp_orig
46c46
< #elif (defined(__GNUC__) || (__SUNPRO_CC >= 0x5130)) &&
(defined(__i386__) || defined(__x86_64__))
--- > #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 68c68 < #elif (defined(__GNUC__) || (__SUNPRO_CC >= 0x5130)) && defined(__sparc) --- > #elif defined(__GNUC__) && defined(__sparc_v9__) The above change causes the compilation to proceed further, however, it fails again with another configuration issue causing failure to build atomic library "CC" -std=c++11 -library=stdcpp,CrunG3 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"../../.." -c -o "../../../bin.v2/libs/atomic/build/sun/release/stdlib-gnu/threading-multi/lockpool.o" "../../../libs/atomic/src/lockpool.cpp" "../../../boost/atomic/detail/ops_gcc_sparc.hpp", line 69: Error: The function "fence_before_store" must have a prototype. In boost/atomic/detail/ops_gcc_sparc.hpp, the following change seems to resolve the issue % !diff % diff ./ops_gcc_sparc.hpp ./ops_gcc_sparc.hpp_orig 69c69 < fence_before(order); --- > fence_before_store(order); 71c71 < fence_after(order); --- > fence_after_store(order); 110c110 < fence_before(order); --- > base_type::fence_before(order); 118c118 < fence_after(order); --- > base_type::fence_after(order); I will submit a PR for this change. Thanks, Aparna
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk