Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Cannot pass multiple options in ARROW_CXX_FLAGS_DEBUG #36239

Closed
pitrou opened this issue Jun 22, 2023 · 2 comments · Fixed by #36281
Closed

[C++] Cannot pass multiple options in ARROW_CXX_FLAGS_DEBUG #36239

pitrou opened this issue Jun 22, 2023 · 2 comments · Fixed by #36281
Assignees
Milestone

Comments

@pitrou
Copy link
Member

pitrou commented Jun 22, 2023

Describe the bug, including details regarding any error messages, version, and platform.

If I use:

export ARROW_C_FLAGS_DEBUG="-g1 -gz"

then our CMake script only takes -g1 and ignores -gz.
@kou

Component(s)

C++

@kou
Copy link
Member

kou commented Jun 22, 2023

Are you using Docker?

Does the following patch solve this?

diff --git a/ci/scripts/cpp_build.sh b/ci/scripts/cpp_build.sh
index b2dd1631c..2ef9c0ee2 100755
--- a/ci/scripts/cpp_build.sh
+++ b/ci/scripts/cpp_build.sh
@@ -84,12 +84,12 @@ cmake \
   -DARROW_CSV=${ARROW_CSV:-ON} \
   -DARROW_CUDA=${ARROW_CUDA:-OFF} \
   -DARROW_CXXFLAGS=${ARROW_CXXFLAGS:-} \
-  -DARROW_CXX_FLAGS_DEBUG=${ARROW_CXX_FLAGS_DEBUG:-} \
-  -DARROW_CXX_FLAGS_RELEASE=${ARROW_CXX_FLAGS_RELEASE:-} \
-  -DARROW_CXX_FLAGS_RELWITHDEBINFO=${ARROW_CXX_FLAGS_RELWITHDEBINFO:-} \
-  -DARROW_C_FLAGS_DEBUG=${ARROW_C_FLAGS_DEBUG:-} \
-  -DARROW_C_FLAGS_RELEASE=${ARROW_C_FLAGS_RELEASE:-} \
-  -DARROW_C_FLAGS_RELWITHDEBINFO=${ARROW_C_FLAGS_RELWITHDEBINFO:-} \
+  -DARROW_CXX_FLAGS_DEBUG="${ARROW_CXX_FLAGS_DEBUG:-}" \
+  -DARROW_CXX_FLAGS_RELEASE="${ARROW_CXX_FLAGS_RELEASE:-}" \
+  -DARROW_CXX_FLAGS_RELWITHDEBINFO="${ARROW_CXX_FLAGS_RELWITHDEBINFO:-}" \
+  -DARROW_C_FLAGS_DEBUG="${ARROW_C_FLAGS_DEBUG:-}" \
+  -DARROW_C_FLAGS_RELEASE="${ARROW_C_FLAGS_RELEASE:-}" \
+  -DARROW_C_FLAGS_RELWITHDEBINFO="${ARROW_C_FLAGS_RELWITHDEBINFO:-}" \
   -DARROW_DATASET=${ARROW_DATASET:-ON} \
   -DARROW_DEPENDENCY_SOURCE=${ARROW_DEPENDENCY_SOURCE:-AUTO} \
   -DARROW_ENABLE_TIMING_TESTS=${ARROW_ENABLE_TIMING_TESTS:-ON} \

@pitrou
Copy link
Member Author

pitrou commented Jun 22, 2023

Yes, and yes!

kou added a commit to kou/arrow that referenced this issue Jun 25, 2023
kou added a commit that referenced this issue Jun 26, 2023
#36281)

### Rationale for this change

Quoting is needed for multiple flags.

### What changes are included in this PR?

Add quoting.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #36239

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 13.0.0 milestone Jun 26, 2023
thisisnic pushed a commit to thisisnic/arrow that referenced this issue Jun 26, 2023
…FLAGS_* (apache#36281)

### Rationale for this change

Quoting is needed for multiple flags.

### What changes are included in this PR?

Add quoting.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#36239

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants