You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jin Shang (Jira)" <ji...@apache.org> on 2022/09/17 13:35:00 UTC

[jira] [Comment Edited] (ARROW-17763) Allow Bazel to pass custom __DATE__, __TIME__, and __TIMESTAMP__ flags to Arrow's toolchain

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

Jin Shang edited comment on ARROW-17763 at 9/17/22 1:34 PM:
------------------------------------------------------------

Hi Stefan,
Tensorflow has a native BUILD rule for arrow: [https://github.com/tensorflow/io/blob/master/third_party/arrow.BUILD]. We have been using it on our Bazel toolchain and it works well enough.
You may need to add some defines and copts such as ARROW_SIMD_LEVEL and -O2 etc depending on your need.


was (Author: JIRAUSER295132):
Hi Stefan,
Tensorflow has a native BUILD rule for arrow: https://github.com/tensorflow/io/blob/master/third_party/arrow.BUILD. We have been using it on our Bazel toolchain and it works well enough.
You may need to add some defines and cppopts depending on your need such as simd level and -O2 etc.

 

> Allow Bazel to pass custom __DATE__, __TIME__, and __TIMESTAMP__ flags to Arrow's toolchain
> -------------------------------------------------------------------------------------------
>
>                 Key: ARROW-17763
>                 URL: https://issues.apache.org/jira/browse/ARROW-17763
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 9.0.0
>            Reporter: Stefan Novak
>            Priority: Major
>
> Hello!
> I've been looking into incorporating Arrow into a Bazel build build project and have been having some challenges getting it to work.
> I've been using Bazel's [rules_foreign_cc|https://bazelbuild.github.io/rules_foreign_cc/main/index.html] to call CMake, however the build process is erroring out as [described by another community member|[https://github.com/bazelbuild/rules_foreign_cc/issues/879]].
> One thing that I've learned: Bazel's C++ integration will [specify|#L622-L624] DATE, TIME, and TIMESTAMP flags to ensure reproducible builds.
> These values are expected to be quoted strings. However, when Arrow's toolchain [translates|#L4874]] {{CMAKE_CXX_FLAGS}} to {{{}ARROW_CXX_COMPILER_FLAGS{}}}, CMake is [calling|https://github.com/apache/arrow/blob/apache-arrow-9.0.0/cpp/cmake_modules/ThirdpartyToolchain.cmake#L4874] {{configure_file(...)}} with the {{ESCAPE_QUOTES}} option which is mucking up the parsing.
> Does anyone happen to have any recommendations for a workaround or a fix?
> Thank you! I appreciate everyone's efforts in continuing to develop Arrow.
> Cheers,
> Stefan



--
This message was sent by Atlassian Jira
(v8.20.10#820010)