Open dbs4261 opened 1 month ago
libc++ is part of LLVM, I guess you mean libstdc++.
The problem is that the upstream PSTL (which is also part of LLVM!) changed the definition of that macro: https://github.com/llvm/llvm-project/commit/3b9a1bb1af90db9472340ef2122d3855eb9ba3fc#diff-4c6821476cefc699b801f5fdbeda3341e3c64626dcf39a79621ea02031bdd50eL113
It's no longer defined to 1
, which seems like a bad decision in the upstream code IMHO.
But the real problem is that onedpl is not including its own pstl_config.h
and is relying on an incompatible "third-party" header of the same name, found elsewhere in the include path.
Quick correction, libc++-13 and libc++-14 are the apt packages proving those files. However your point is a good one that both GNU C++ and Clang++ use LLVM's PSTL implementation. I tried adding #include "pstl_config.h"
to the top of algorithm_impl.h
, and that made me realize both the LLVM PSTL and oneDPL implementation use the same include guard, so that wont work. Looks like this will need to be resolved by either changing the code that checks for _PSTL_UDR_PRESENT
or by fixing the upstream header. I think fixing the LLVM PSTL header is the better choice for backwards compatibility reasons.
Hi folks, looks like there is an issue with using gcc-14. When compiling Open3d using oneApi with gcc-14, I am getting a build error. I've traced it to
oneapi/dpl/pstl/algorithm_impl.h
. It seems to be an issue with the macro#if (_PSTL_UDR_PRESENT || _ONEDPL_UDR_PRESENT)
(actual error:error: operator '||' has no left operand
). Now, I'm reporting the bug here because_PSTL_UDR_PRESENT
is defined inpstl_config.h
but that is never included. My IDE is telling me that the definition is coming instead frompstl_config.h
libc++-14 shown below:Now, in all versions of the file included in my oneApi installation have a value after
_PSTL_UDR_PRESENT
. This is also the case with libc++-13. So the fix might need to be made on that end.