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

[GLib][GPU] Different cuda.h is included #37507

Closed
kou opened this issue Sep 1, 2023 · 0 comments · Fixed by #37508
Closed

[GLib][GPU] Different cuda.h is included #37507

kou opened this issue Sep 1, 2023 · 0 comments · Fixed by #37508

Comments

@kou
Copy link
Member

kou commented Sep 1, 2023

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

https://github.com/apache/arrow/blob/main/c_glib/arrow-cuda-glib/cuda.h not CUDA's cuda.h is included for

#include <cuda.h>
.

test-ubuntu-22.04-docs

https://github.com/ursacomputing/crossbow/actions/runs/6034388088/job/16372666129#step:7:8241

FAILED: arrow-cuda-glib/libarrow-cuda-glib.so.1400.0.0.p/cuda.cpp.o 
sccache c++ -Iarrow-cuda-glib/libarrow-cuda-glib.so.1400.0.0.p -Iarrow-cuda-glib -I../../arrow/c_glib/arrow-cuda-glib -I. -I../../arrow/c_glib -Iarrow-glib -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O0 -g -Wmissing-declarations -DARROW_NO_DEPRECATED_API -fPIC -MD -MQ arrow-cuda-glib/libarrow-cuda-glib.so.1400.0.0.p/cuda.cpp.o -MF arrow-cuda-glib/libarrow-cuda-glib.so.1400.0.0.p/cuda.cpp.o.d -o arrow-cuda-glib/libarrow-cuda-glib.so.1400.0.0.p/cuda.cpp.o -c ../../arrow/c_glib/arrow-cuda-glib/cuda.cpp
In file included from /usr/local/include/arrow/gpu/cuda_api.h:21,
                 from ../../arrow/c_glib/arrow-cuda-glib/cuda.hpp:22,
                 from ../../arrow/c_glib/arrow-cuda-glib/cuda.cpp:29:
/usr/local/include/arrow/gpu/cuda_context.h:155:26: error: 'CUstream' does not name a type; did you mean 'Stream'?
  155 |     [[nodiscard]] inline CUstream value() const noexcept {
      |                          ^~~~~~~~
      |                          Stream
/usr/local/include/arrow/gpu/cuda_context.h:161:14: error: expected type-specifier before 'CUstream'
  161 |     operator CUstream() const noexcept { return value(); }
      |              ^~~~~~~~
/usr/local/include/arrow/gpu/cuda_context.h:170:55: error: 'CUstream' has not been declared
  170 |     explicit Stream(std::shared_ptr<CudaContext> ctx, CUstream* st,
      |                                                       ^~~~~~~~
/usr/local/include/arrow/gpu/cuda_context.h:200:19: error: 'CUevent' does not name a type
  200 |     [[nodiscard]] CUevent value() const {
      |                   ^~~~~~~
/usr/local/include/arrow/gpu/cuda_context.h:206:14: error: expected type-specifier before 'CUevent'
  206 |     operator CUevent() const noexcept { return value(); }
      |              ^~~~~~~
/usr/local/include/arrow/gpu/cuda_context.h:220:58: error: 'CUevent' has not been declared
  220 |     explicit SyncEvent(std::shared_ptr<CudaContext> ctx, CUevent* ev,
      |                                                          ^~~~~~~

Component(s)

GLib, GPU

@kou kou added the Type: bug label Sep 1, 2023
kou added a commit to kou/arrow that referenced this issue Sep 1, 2023
Our source code should not have "#include"s that depend on
source/binary directories exists in include path.

This also fixes that CUDA's cuda.h isn't included problem.
@kou kou closed this as completed in #37508 Sep 1, 2023
kou added a commit that referenced this issue Sep 1, 2023
### Rationale for this change

Our source code should not have "#include"s that depend on source/binary directories exists in include path.

This also fixes that CUDA's cuda.h isn't included problem.

### What changes are included in this PR?

Don't use implicit include directories. 

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #37507

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 14.0.0 milestone Sep 1, 2023
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…#37508)

### Rationale for this change

Our source code should not have "#include"s that depend on source/binary directories exists in include path.

This also fixes that CUDA's cuda.h isn't included problem.

### What changes are included in this PR?

Don't use implicit include directories. 

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#37507

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…#37508)

### Rationale for this change

Our source code should not have "#include"s that depend on source/binary directories exists in include path.

This also fixes that CUDA's cuda.h isn't included problem.

### What changes are included in this PR?

Don't use implicit include directories. 

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#37507

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.

1 participant