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

Errors when building OCCA transpiler with with LLVM, Clang built from source #239

Open
kris-rowe opened this issue Jul 26, 2024 · 5 comments
Labels
bug Something isn't working question Further information is requested

Comments

@kris-rowe
Copy link
Member

When trying to build the occa transpiler with the latest LLVM, Clang built from the llvm-project source I ran into several issues.

  • The strict requirement for LLVM 17 needs to be relaxed here. I can check-out and build v17 if it is explicitly required, however we should document somewhere why it is required.
  • Several C++ related compiler errors, e.g.
 /home/krowe/OCCA/occa/deps/occa-transpiler/lib/core/transpiler_session/header_info.h:49:73: 
   error: non-virtual member function marked 'override' hides virtual member function
   49 |                             clang::SrcMgr::CharacteristicKind FileType) override;

Has anyone on the occa transpiler development team successfully tested the transpiler with a from-source LLVM build? If they have could they share any relevant flags, etc. that should be used?

@kris-rowe kris-rowe added bug Something isn't working question Further information is requested labels Jul 26, 2024
@YuraCobain
Copy link

Hi Kris,
Thank you for reporting.
We will go via triage procedure and give a comprehensive answer on Monday.

@kris-rowe
Copy link
Member Author

@YuraCobain Awesome, thank you.

This scenario is relevant to large HPC systems where users likely don't have sudo privileges.

@YuraCobain
Copy link

Sure, we will add compatibility with clang version 17 and higher. Unfortunately clang community do not bother with compatibility of API between versions.

@YuraCobain
Copy link

Hi @kris-rowe,

The PR is updated with instructions how to build clang from source and how to configure OCCA to use it.
So far clang-17 is hard requirement and minimum version that consists all necessary features for a new transpiler.

Newer versions(18,19,20) of clang are not beneficial for transpiler.
To support them a compatibility layer should be added to transpiler as a feature because there is slight incompatibility in C++ API in clang tooling of newer versions.
I would appreciate any contribution from community to add compatibility layer.

@IuriiKobein
Copy link
Collaborator

Hi @kris-rowe
Do you have a chance to test the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants