You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "cholmcc (via GitHub)" <gi...@apache.org> on 2023/11/14 09:04:49 UTC

[I] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

cholmcc opened a new issue, #38709:
URL: https://github.com/apache/arrow/issues/38709

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Hi, 
   
   On MacOSX the system header [`vnode.h`](https://opensource.apple.com/source/xnu/xnu-6153.41.3/bsd/sys/vnode.h.auto.html) defines the symbol `PREALLOCATE` as a preprocessor define.   This causes a compilation error with `#include <arrow/compute/kernel.h>` where this name (`PREALLOCATE`) is used as an identifier , if `sys/vnode.h` and `arrow/compute/kernel.h` are both (possibly indirectly) included into the same compilation unit. 
   
   Perhaps the `PREALLOCATE` symbol should be `#undef` in `arrow/compute/kernel.h` in case it is defined as preprocessor macro - e.g., 
   
   ```
       #if defined(__APPLE__) and defined(PREALLOCATE)
       # undef PREALLOCATE 
       #endif  
   ```
   Yours,
   _Christian_
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

Posted by "cholmcc (via GitHub)" <gi...@apache.org>.
cholmcc commented on issue #38709:
URL: https://github.com/apache/arrow/issues/38709#issuecomment-1815379626

   Hi, 
   
   I think I would suggest to use the `kPreallocate` approach, as it is much less likely to cause conflicts.   However, I would worry a little about backward compatibility with existing client code. 
   
   I made a [PR](https://github.com/apache/arrow/compare/main...cholmcc:arrow:patch-2).  If you choose the `kPreallocate` route, then just kill the PR. 
   
   Yours,
   _Christian_
   
   


-- 
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: [I] [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #38709: [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define
URL: https://github.com/apache/arrow/issues/38709


-- 
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: issues-unsubscribe@arrow.apache.org

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


Re: [I] [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #38709:
URL: https://github.com/apache/arrow/issues/38709#issuecomment-1815894905

   Let's choose `undef` approach for now.
   
   It seems that a PR isn't made yet. Could you ensure opening a PR with the change?


-- 
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: [I] [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #38709:
URL: https://github.com/apache/arrow/issues/38709#issuecomment-1813828079

   Could you open a pull request with the approach?
   
   Or we can use `kPreallocate` name because our coding style uses the convention: https://google.github.io/styleguide/cppguide.html#Enumerator_Names
   But it breaks backward compatibility and our many existing source codes don't follow the convention...


-- 
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: [I] [C++] Conflict between `arrow::compute::MemAllocation::PREALLOCATE` and system header `vnode.h` preprocessor define [arrow]

Posted by "cholmcc (via GitHub)" <gi...@apache.org>.
cholmcc commented on issue #38709:
URL: https://github.com/apache/arrow/issues/38709#issuecomment-1816283200

   Sorry, my bad - forgot to hit the button :-)   The PR is [here](https://github.com/apache/arrow/pull/38760)


-- 
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