Skip to content
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

Clang Build Fixing Errors and Warnings #31

Merged
merged 30 commits into from
Oct 8, 2020
Merged

Clang Build Fixing Errors and Warnings #31

merged 30 commits into from
Oct 8, 2020

Conversation

mdavis36
Copy link
Collaborator

@mdavis36 mdavis36 commented Sep 23, 2020

Summary

Fixing errors and warnings for building spheral with clang. Clang seems to be a little more picky so it was able to pick up some things that weren't reported with gcc.

Changes

  • Commenting out unused arguments.
  • Type signage warnings.
  • Swapped std -> boost for unordered_map. It appears that with C++11 the stdlibs for clang does not have support for unordered_map. I believe this change was previously made in some other places of spheral. Now all unordered_map calls are pulled from boost.
  • Override declarations, clang wanted explicit override calls on virtual function implementations.
  • Reverted the addition of the dt function in DamageModel.hh. This was reverted from changes made in the gcc fix as it is never implemented and created an undefined symbol when building with clang, breaking the Spheral python module.
  • Mismatched struct/class declaration of DomainNode and FieldListSet.
  • Removed duplicate struct definition of KeyTraits in GeomPolygon.
  • Removed unused functions in polyclipper2d.cc and fillFacetVolume.cc
  • -Wno-terminate only needed for gcc.
  • Attempt to fix the undefined-var-template warnings. These are produced when using a static variable of a class template that is initialized in another translation unit. For the most part his was fixed e.g. GeomVector, GeomRankTensor. This is done by instantiating the static variables within the headers. However I was unable to fix this with GeomTensor, This is because GeomTensor::zero is not called ever in the compiled C++ Geometry library, leaving them undefined, thus throwing an undefined symbol error when importing the Spheral python module. There are other fixes for this but I believe they are beyond the scope of this PR so I have turned off that warning for all builds in the meantime.

…eaders, this satisfies undefined-var-template warnings.
…, because of multiple definitions. Not sure about this, but we are turning off undefined-var-templates for now anyway.
@mdavis36 mdavis36 changed the title [WIP] Clang Build Fixing Errors and Warnings Clang Build Fixing Errors and Warnings Oct 1, 2020
@mdavis36 mdavis36 marked this pull request as ready for review October 1, 2020 21:26
Copy link
Collaborator

@jmikeowen jmikeowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only question is about moving back to boost::unordered_map from std::unordered_map. We've been trying to go to the std:: versions as they're available -- what's up with clang?

@mdavis36 mdavis36 merged commit db9d87d into develop Oct 8, 2020
@mdavis36 mdavis36 deleted the clang-build branch October 8, 2020 21:49
jmikeowen pushed a commit that referenced this pull request Mar 19, 2021
* commit '655f48309d25f1e9c06c91412aa2933a4f6e73ca':
  Setting host configs to not use prebuilt PolyClipper on LC machines. This should be reversed when we update the prebuilt version of PolyClipper.
  typo
  Updates to use v1.2.0 of PolyClipper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants