[ 
https://issues.apache.org/jira/browse/HDFS-10355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Clampffer reassigned HDFS-10355:
--------------------------------------

    Assignee: James Clampffer

> Fix thread_local related build issue on Mac OS X
> ------------------------------------------------
>
>                 Key: HDFS-10355
>                 URL: https://issues.apache.org/jira/browse/HDFS-10355
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>         Environment: OS: Mac OS X 10.11
> clang: Apple LLVM version 7.0.2 (clang-700.1.81)
>            Reporter: Tibor Kiss
>            Assignee: James Clampffer
>
> The native hdfs library uses C++11 features heavily.
> One of such feature is thread_local storage class which is supported in GCC, 
> Visual Studio and the community version of clang compiler, but not by Apple's 
> clang (which is default on OS X boxes). 
> See further details here: http://stackoverflow.com/a/29929949
> Even though not many Hadoop cluster runs on OS X developers still use this 
> platform for development.
> The problem can be solved multiple ways:
>  a) Stick to gcc/g++ or community based clang on OS X. Developers will need 
> extra steps to build Hadoop.
>  b) Workaround thread_local with a helper class.
>  c) Get rid of all the globals marked with thread_local. Interface change 
> will be erquired.
>  d) Disable multi threading support in the native client on OS X and document 
> this limitation. 
> Compile error related to thread_local:
> {noformat}
>      [exec] 
> /Users/tiborkiss/workspace/apache-hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc:66:1:
>  error: thread-local storage is not supported for the current target
>      [exec] thread_local std::string errstr;
>      [exec] ^
>      [exec] 
> /Users/tiborkiss/workspace/apache-hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc:87:1:
>  error: thread-local storage is not supported for the current target
>      [exec] thread_local std::experimental::optional<fs_event_callback> 
> fsEventCallback;
>      [exec] ^
>      [exec] 
> /Users/tiborkiss/workspace/apache-hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc:88:1:
>  error: thread-local storage is not supported for the current target
>      [exec] thread_local std::experimental::optional<file_event_callback> 
> fileEventCallback;
>      [exec] ^
>      [exec] 1 warning and 3 errors generated.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to