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

Gawain BOLTON commented on ARROW-7804:
--------------------------------------

It seems that clang versions < v3.9 haveĀ  a bug regarding "const" and 
"constexpr" as can be seen with the following two line code snipet:
{code:java}
struct EndRowType {};
constexpr EndRowType EndRow;{code}
The simplest change I have found is to replace "constexpr" with "extern const" 
but this will require the implementation file to define the constant.

It is not clear to me which compiler versions must be supported so please let 
me know if clang < v3.9 must indeed work with arrow >= v1.0.0

> [C++][R] Compile error on macOS 10.11
> -------------------------------------
>
>                 Key: ARROW-7804
>                 URL: https://issues.apache.org/jira/browse/ARROW-7804
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++, Continuous Integration, R
>            Reporter: Neal Richardson
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> So, yeah, macOS 10.11 is from 2015, but that's what CRAN (R) builds on. 
> [~jeroenooms] found this error when building binaries for 0.16:
> {code}
> ==> cmake ../cpp -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG 
> -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG 
> -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/apache-arrow/
> ==> make
> Last 15 lines from /Users/builder/Library/Logs/Homebrew/apache-arrow/02.make:
> /tmp/apache-arrow-20200208-1254-r2avjm/apache-arrow-0.16.0/cpp/src/parquet/stream_writer.h:233:22:
>  error: default initialization of an object of const type 'const 
> parquet::EndRowType' without a user-provided default constructor
> constexpr EndRowType EndRow;
>                      ^
>                            {}
> /tmp/apache-arrow-20200208-1254-r2avjm/apache-arrow-0.16.0/cpp/src/parquet/stream_writer.h:236:27:
>  error: default initialization of an object of const type 'const 
> parquet::EndRowGroupType' without a user-provided default constructor
> constexpr EndRowGroupType EndRowGroup;
>                           ^
>                                      {}
> 2 errors generated.
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to