[ 
https://issues.apache.org/jira/browse/THRIFT-3924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16740422#comment-16740422
 ] 

James E. King III commented on THRIFT-3924:
-------------------------------------------

THRIFT-4720 moved the C++ side to C++11.  We don't have access to a SunCC / 
solaris compiler to do this work.  It would need to be submitted by pull 
request an taken on faith that it works.

> Make C++ library build on SunOS with the Sun compiler
> -----------------------------------------------------
>
>                 Key: THRIFT-3924
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3924
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>         Environment: 1.upgrade thrift from 0.9.0 to 0.9.2
> 2.SunOS
> 3./opt/SUNWspro/prod/include/CC/Cstd
> 4.CC compiler
>            Reporter: Guoguang Lan
>            Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> when Both Clang and GNUC are not define , there is an error!
> 1.upgrade thrift from 0.9.0 to 0.9.2
> 2.SunOS
> 3./opt/SUNWspro/prod/include/CC/Cstd
> compile: CC -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift 
> -I/CBB_3rdTools/server/OpenSource/src/thrift/thrift-0.9.2/boost_1_57_0//include
>  -I./src -D_POSIX_PTHREAD_SEMANTICS -D_SUN_ -DSUN 
> -I/CBB_3rdTools/server/OpenSource/src/thrift/thrift-0.9.2/openssl/include 
> -I/CBB_3rdTools/server/OpenSource/src/thrift/thrift-0.9.2/boost_1_57_0/include/boost/tr1
>  -Wextra -pedantic -g -c src/thrift/transport/TFileTransport.cpp -KPIC -DPIC 
> -o src/thrift/transport/.libs/TFileTransport.o CC: Warning: Option -Wextra 
> passed to ld, if ld is invoked, ignored otherwise CC: Warning: Option 
> -pedantic passed to ld, if ld is invoked, ignored otherwise 
> "./src/thrift/cxxfunctional.h", line 124: Error: stdcxx is not a member of 
> apache::thrift.
> when i modify the code like this:
> `#ifdef clang
> /* Clang has two options, depending on standard library:
> - no -stdlib or -stdlib=libstdc++ set; uses GNU libstdc++.
> - -stdlib=libc++; uses LLVM libc++.
> , no 'std::tr1'. *
> The compiler itself doesn't define anything differently
> depending on the value of -stdlib, but the library headers
> will set different preprocessor options. In order to check,
> though, we have to pull in some library header.
> */
> #include
> /* With LLVM libc++, utility pulls in __config, which sets
> _LIBCPP_VERSION. */
> #if defined(_LIBCPP_VERSION)
> #define _THRIFT_USING_CLANG_LIBCXX 1
> /* With GNU libstdc++, utility pulls in bits/c++config.h,
> which sets GLIBCXX. */
> #elif defined(GLIBCXX)
> #define _THRIFT_USING_GNU_LIBSTDCXX 1
> /* No idea. /
> #else
> #error Unable to detect which C++ standard library is in use.
> #endif
> #elif GNUC
> #define _THRIFT_USING_GNU_LIBSTDCXX 1
> / No idea. */
> #else
> #error Unable to detect which C++ standard library is in use. Both Clang and 
> GNUC are not define!
> #endif`
> output:
> "./src/thrift/cxxfunctional.h", line 71: Error: #error Unable to detect which 
> C++ standard library is in use. Both Clang and GNUC are not define!.
> Thank you!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to