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

Chen Liang commented on HDFS-12026:
-----------------------------------

Thanks for reply [~anatoli.shein], [~sunilg]!

The error we hit was:
{code:java}
CMake Error at main/native/libhdfspp/CMakeLists.txt:64 (message):
  FATAL ERROR: The required feature thread_local storage is not supported by
  your compiler.  Known compilers that support this feature: GCC, Visual
  Studio, Clang (community version), Clang (version for iOS 9 and later).
{code}
We encountered this error when building on a rhel 6.6 machine (with glibc 2.12 
and gcc 4.4.7), the build failed. Then we switched to a rhel 7.4 machine (with 
glibc 2.17 and gcc 4.8.5) and the build succeeded. I did some checking, it 
appeared to me that this syntax thread_local is supported only in gcc 4.8+ (not 
too sure about which glibc version though). One resource I checked was pages 
for [4.4|https://gcc.gnu.org/gcc-4.4/cxx0x_status.html], 
[4.7|https://gcc.gnu.org/gcc-4.7/cxx0x_status.html] and 
[4.8|https://gcc.gnu.org/gcc-4.8/cxx0x_status.html] (just search for 
"thread-local storage").

The issue here, is that rhel6 does not support upgrading to gcc 4.8. see 
[here|https://access.redhat.com/solutions/19458]... So there seems no way to 
have this keyword on rhel6. Since the keyword thread_local is not available for 
rhel6, it would break compatibility.

I guess it may not be necessary to revert the Jira/the whole branch, but we 
should have some way of getting around and not break the build on rhel6.

> libhdfs++: Fix compilation errors and warnings when compiling with Clang 
> -------------------------------------------------------------------------
>
>                 Key: HDFS-12026
>                 URL: https://issues.apache.org/jira/browse/HDFS-12026
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: Anatoli Shein
>            Assignee: Anatoli Shein
>            Priority: Blocker
>         Attachments: HDFS-12026.HDFS-8707.000.patch, 
> HDFS-12026.HDFS-8707.001.patch, HDFS-12026.HDFS-8707.002.patch, 
> HDFS-12026.HDFS-8707.003.patch, HDFS-12026.HDFS-8707.004.patch, 
> HDFS-12026.HDFS-8707.005.patch, HDFS-12026.HDFS-8707.006.patch, 
> HDFS-12026.HDFS-8707.007.patch, HDFS-12026.HDFS-8707.008.patch, 
> HDFS-12026.HDFS-8707.009.patch, HDFS-12026.HDFS-8707.010.patch
>
>
> Currently multiple errors and warnings prevent libhdfspp from being compiled 
> with clang. It should compile cleanly using flag:
> -std=c++11
> and also warning flags:
> -Weverything -Wno-c++98-compat -Wno-missing-prototypes 
> -Wno-c++98-compat-pedantic -Wno-padded -Wno-covered-switch-default 
> -Wno-missing-noreturn -Wno-unknown-pragmas -Wconversion -Werror



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to