-
Notifications
You must be signed in to change notification settings - Fork 230
Workaround for building on clang and libstdc++ (part 2) #343
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
Workaround for building on clang and libstdc++ (part 2) #343
Conversation
- These headers use the std::reference_wrapper<const GeometryContext> type, that introduces the compatibility error.
|
Hi @czangela, could you let us know in which environment you encounter this error (operating system, how are the external dependencies installed) and the exact compile error you encounter? |
Most likely LCG clang + libstdc++, as we've had before. We really need a build of that going again... |
Hi @msmk0, There was a patch about it a few months ago, which content was then moved to a separate header file. As far as we know the error occurs because clang and gcc standard header files differ a little bit, and mixing one compiler with the other's header files might introduce errors. Usually, it doesn't mean any problem. However, putting a (const) std::any (GeometryContext) type in a std::reference_wrapper (and moving that around) seems to trigger an error. compile_error.txt (So clang and libstdc++ are not 100% compatible. It has to do something with the order of template instantiation. Or something like that.) This is just a workaround for this. It is definitely not a good solution but it works. |
|
Hi Paul, We see this when using Intel's compiler (https://github.com/intel/llvm) on top of GCC 8's Also, don't miss that the code adds a missing include and a missing Cheers, |
Codecov Report
@@ Coverage Diff @@
## master #343 +/- ##
==========================================
+ Coverage 48.63% 48.66% +0.03%
==========================================
Files 325 325
Lines 16356 16356
Branches 7588 7588
==========================================
+ Hits 7954 7959 +5
+ Misses 3093 3084 -9
- Partials 5309 5313 +4
Continue to review full report at Codecov.
|
|
Right, makes sense and LGTM |
This fixes the clang compatibility issue that we see with std::reference_wrapper<std::any>, as from #343 Issue found when compiling with dpcpp/clang++ w/ the SYCL plugin.
Enables compilation with clang 11.