When including arrow/io/interfaces.h from a .cu source file (compiled with nvcc, the CUDA compiler), we get warnings like the following:
[6/58] Building CUDA obje.../csv/csv_reader_impl.cu.
arrow/install/include/arrow/io/interfaces.h(195): warning: attribute does not apply to any entity
This example is from compiling [libcudf|[https://github.com/rapidsai/cudf].] libcudf installs these headers and includes them. This is a problem for libraries like libcudf which treat warnings as errors.
There is a simple fix (I will submit a PR): change this code in interfaces.h:
// TODO(kszucs): remove this after 0.13
#ifndef _MSC_VER
using WriteableFile ARROW_DEPRECATED("Use WritableFile") = WritableFile;
using ReadableFileInterface ARROW_DEPRECATED("Use RandomAccessFile") = RandomAccessFile;
#else``// MSVC does not like using ARROW_DEPRECATED with using declarations``using WriteableFile = WritableFile;
using ReadableFileInterface = RandomAccessFile;
#endif
Just change the ifndef to:
#if not defined(_MSC_VER) && not defined(__CUDACC__)
This fix should have no impact on other compilers.
Reporter: Mark Harris / @harrism
Assignee: Mark Harris / @harrism
PRs and other links:
Note: This issue was originally created as ARROW-6205. Please see the migration documentation for further details.
When including arrow/io/interfaces.h from a .cu source file (compiled with nvcc, the CUDA compiler), we get warnings like the following:
[6/58] Building CUDA obje.../csv/csv_reader_impl.cu.arrow/install/include/arrow/io/interfaces.h(195): warning: attribute does not apply to any entityThis example is from compiling [libcudf|[https://github.com/rapidsai/cudf].] libcudf installs these headers and includes them. This is a problem for libraries like libcudf which treat warnings as errors.
There is a simple fix (I will submit a PR): change this code in interfaces.h:
// TODO(kszucs): remove this after 0.13#ifndef _MSC_VERusing WriteableFile ARROW_DEPRECATED("Use WritableFile") = WritableFile;using ReadableFileInterface ARROW_DEPRECATED("Use RandomAccessFile") = RandomAccessFile;#else``// MSVC does not like using ARROW_DEPRECATED with using declarations``using WriteableFile = WritableFile;using ReadableFileInterface = RandomAccessFile;#endifJust change the ifndef to:
#if not defined(_MSC_VER) && not defined(__CUDACC__)This fix should have no impact on other compilers.
Reporter: Mark Harris / @harrism
Assignee: Mark Harris / @harrism
PRs and other links:
Note: This issue was originally created as ARROW-6205. Please see the migration documentation for further details.