You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "helly25 (via GitHub)" <gi...@apache.org> on 2024/03/23 11:28:19 UTC

[PR] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

helly25 opened a new pull request, #40763:
URL: https://github.com/apache/arrow/pull/40763

   Fix issue with define ARROW_CXX_COMPILER_FLAGS:
   https://github.com/apache/arrow/issues/40762
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2041774993

   BTW, should we provide a CMake option to redefine `__DATE__` (something like `-DARROW_FORCE_DATE=redacted`) instead?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2016460277

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - Contributing Overview](https://arrow.apache.org/docs/developers/overview.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "helly25 (via GitHub)" <gi...@apache.org>.
helly25 commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2016982024

   > Could you use our PR template instead of removing it entirely?
   
   @kou : Sorry my mistake. I hope this looks correct now?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2024553364

   Your use case is `cmake -DCMAKE_CXX_FLAGS='-D__DATE__=\\"redacted\\"' ...`, right?
   
   I think that you don't need to specify `\`: `cmake -DCMAKE_CXX_FLAGS='-D__DATE__="redacted"' ...`
   Why do you need to escape `"`?
   
   We're using `ESCAPE_QUOTE` to generate `config.h` from `config.h.cmake`. It escapes quotes for string literal: https://cmake.org/cmake/help/latest/command/configure_file.html
   I'm worried that using both `ESCAPE_QUOTE` and `R"(...)"` escape too much.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2017080284

   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2016956964

   Could you use our PR template instead of removing it entirely?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "helly25 (via GitHub)" <gi...@apache.org>.
helly25 commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2018563551

   @kou with jfrog working again, I think all that is needed for CI to pass is to rerun the failed steps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2016463966

   :warning: GitHub issue #40762 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "helly25 (via GitHub)" <gi...@apache.org>.
helly25 commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2028836896

   > Your use case is `cmake -DCMAKE_CXX_FLAGS='-D__DATE__=\\"redacted\\"' ...`, right?
   
   @kou To explain a bit deeper. Both `__DATE__` and `__TIME__` need to be actual strings including the `"` (see https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html). Now if you do not escape the quotes as in `cmake -DCMAKE_CXX_FLAGS='-D__DATE__="redacted"' ...`, then the result is __DATE__ defined as `redacted` without the quotes because the quotes are treated as quotes for the command line/flag parsing. If you escape them, then they actually make it to the compiler and are taken as part of the define.
   
   Now whether they are quoted or escaped in the header is of little concern because they are not used in building any software. They are just a reference to check how the software was build.
    
   > I think that you don't need to specify `\`: `cmake -DCMAKE_CXX_FLAGS='-D__DATE__="redacted"' ...` Why do you need to escape `"`?
   > 
   > We're using `ESCAPE_QUOTE` to generate `config.h` from `config.h.cmake`. It escapes quotes for string literal: https://cmake.org/cmake/help/latest/command/configure_file.html I'm worried that using both `ESCAPE_QUOTE` and `R"(...)"` escape too much.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-40762: [C++] Fix issue with define ARROW_CXX_COMPILER_FLAGS: [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #40763:
URL: https://github.com/apache/arrow/pull/40763#issuecomment-2041773949

   Thanks for explaining more.
   
   I'm trying reproduce this problem with `cmake -DCMAKE_CXX_FLAGS='-D__DATE__=\\"redacted\\"' ...` and the following C++ program:
   
   ```cpp
   #include <iostream>
   
   #include <arrow/util/config.h>
   
   int main(void) {
     std::cout << ARROW_CXX_COMPILER_FLAGS << std::endl;
     return 0;
   }
   ```
   
   But I couldn't reproduce this. Could you explain how to reproduce this problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org