Skip to content

Conversation

@czangela
Copy link
Contributor

Enables compilation with clang 11.

Angela Czirkos added 2 commits July 21, 2020 15:01
 - These headers use the std::reference_wrapper<const GeometryContext> type, that introduces the compatibility error.
@msmk0 msmk0 added Bug Something isn't working Component - Core Affects the Core module Impact - Minor Nuissance bug and/or affects only a single module labels Jul 21, 2020
@acts-issue-bot acts-issue-bot bot removed the Triage label Jul 21, 2020
@msmk0
Copy link
Contributor

msmk0 commented Jul 21, 2020

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?

@paulgessinger
Copy link
Member

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

@czangela
Copy link
Contributor Author

czangela commented Jul 21, 2020

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?

Hi @msmk0,
I forgot to mention that it is a follow-up.

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.

@krasznaa
Copy link
Member

Hi Paul,

We see this when using Intel's compiler (https://github.com/intel/llvm) on top of GCC 8's libstdc++ version. But @cgleggett was also reporting about some strange issues with a little different LLVM + libstdc++ combination. So yeah, it's very much a moving target. 😦

Also, don't miss that the code adds a missing include and a missing #pragma once statement as well. 😉

Cheers,
Attila

@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #343 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
Core/include/Acts/Fitter/KalmanFitter.hpp 36.43% <ø> (ø)
...re/include/Acts/Material/SurfaceMaterialMapper.hpp 50.00% <ø> (ø)
...ore/include/Acts/Material/VolumeMaterialMapper.hpp 60.00% <ø> (ø)
Core/include/Acts/Propagator/AtlasStepper.hpp 71.42% <ø> (ø)
...lude/Acts/Propagator/DenseEnvironmentExtension.hpp 59.64% <ø> (ø)
Core/include/Acts/Propagator/EigenStepper.hpp 93.10% <ø> (ø)
...re/include/Acts/Propagator/StraightLineStepper.hpp 68.88% <ø> (ø)
...ude/Acts/TrackFinder/CombinatorialKalmanFilter.hpp 27.69% <ø> (ø)
Core/include/Acts/Vertexing/VertexingOptions.hpp 100.00% <ø> (ø)
...include/Acts/Vertexing/FullBilloirVertexFitter.ipp 98.69% <0.00%> (+0.65%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35bcdc4...0f5e54c. Read the comment docs.

@paulgessinger paulgessinger added this to the v0.30.00 milestone Jul 22, 2020
@paulgessinger
Copy link
Member

Right, makes sense and LGTM

@msmk0 msmk0 merged commit 4803c2f into acts-project:master Jul 22, 2020
paulgessinger pushed a commit that referenced this pull request Sep 24, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Component - Core Affects the Core module Impact - Minor Nuissance bug and/or affects only a single module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants