docbrown1955 / marty-public

Calculation of tree-level and one-loop Feynman diagrams Beyond the Standard Model
https://marty.in2p3.fr
GNU General Public License v3.0
18 stars 5 forks source link

Compilation with gcc-13 and gcc-14, and recent versions of clang #78

Open marco-palmiotto opened 3 weeks ago

marco-palmiotto commented 3 weeks ago

I wanted to ask if we can upgrade MARTY to be compiled with gcc-13 and 14. Right now, it presents some errors on std::find, therefore the compilation fails.

It is important to upgrade it, because on the most recent versions of Fedora already, the least version of gcc available is 13. Same goes for Arch, and I did not test alpine yet. The use case is container creation to launch MARTY on a server.

I also tried to switch to clang, but I have the same errors.

docbrown1955 commented 1 week ago

@marco-palmiotto Sure!

I think I already tried locally a more recent gcc version but the procedure would be as follows to make it officially supported:

  1. Compile locally with the required compiler and fix possible issues
  2. Create a pull request with the required changes
  3. Update the .github/workflows/c-cpp.yml to test e.g. gcc-14 instead of gcc-12 (the gcc-9 test can be kept if possible to ensure MARTY can be built with a range of compatible compilers)
  4. Update the README.md to update the range of compatible compilers
  5. Merge! :)

As for clang, I see the c-cpp.yml is using ubuntu-latest and the default clang so that it must already be quite up-to-date, but it can be checked or we can also specify a fixed version of clang in the test.