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

[jira] [Commented] (ARROW-17763) [C++] 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=17606184#comment-17606184 ] 

Kouhei Sutou commented on ARROW-17763:
--------------------------------------

Could you show how Bazzel specifies {{\_\_DATE\_\_}} and so on? {{export CXXFLAGS="-D__DATE__=\\\"redacted\\\" ..."}}? {{export CXXFLAGS="-D__DATE__=\"redacted\" ..."}}?

> [C++] 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 {{\_\_DATE\_\_}}, {{\_\_TIME\_\_}}, and {{\_\_TIMESTAMP\_\_}} flags to ensure reproducible builds.
> These values are expected to be quoted strings. However, when Arrow's toolchain [translates|https://github.com/bazelbuild/bazel/blob/5.3.0/tools/cpp/unix_cc_configure.bzl#L622-L624] {{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)