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

Fix build errors with clang16 (and clang17) #904

Closed
valassi opened this issue Jul 11, 2024 · 2 comments · Fixed by #905
Closed

Fix build errors with clang16 (and clang17) #904

valassi opened this issue Jul 11, 2024 · 2 comments · Fixed by #905
Assignees

Comments

@valassi
Copy link
Member

valassi commented Jul 11, 2024

Fix build errors with clang16 - this is a subtask in #734

The first error is the following

ccache /data/avalassi/GPU2023/madgraph4gpuX/tools/compilers/mg-lcg-clang++-16.0.3 -o fcheck_cpp.exe ./fcheck_sa_fortran.o -fopenmp ./fsampler_cpp.o -L../../lib -lmg5amc_common_cpp -Wl,-rpath='$ORIGIN/../../lib'  -lgfortran -L../../lib -lmg5amc_gg_ttx_cpp ./CommonRandomNumberKernel_cpp.o ./RamboSamplingKernels_cpp.o
/cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: ./fcheck_sa_fortran.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/cvmfs/sft.cern.ch/lcg/releases/binutils/2.40-acaab/x86_64-el9/bin/ld: failed to set dynamic section sizes: bad value
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

This can be fixed by adding -no-pie

Then I also disabled OMP for this specific compiler (while waiting to disable OMP generally when merging PR #900)

@valassi valassi self-assigned this Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
…6 builds madgraph5#904 (disabling OMP only for clang16; add -no-pie for fcheck_cpp.exe)
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
@valassi valassi linked a pull request Jul 11, 2024 that will close this issue
@valassi
Copy link
Member Author

valassi commented Jul 11, 2024

This is closed in PR #905. Closing the issue even if the MR is not yet merged

@valassi valassi closed this as completed Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
@valassi valassi changed the title Fix build errors with clang16 Fix build errors with clang16 (and clang17) Jul 11, 2024
@valassi
Copy link
Member Author

valassi commented Jul 11, 2024

I later fixed also clang17 and added wrappers

(NB I think that clang formatting would behave very differently instead...)

valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
…ph5#904: remove link-time -no-pie, add compiler-time -fPIC to fortran
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
…5#904: remove link-time -no-pie, add compiler-time -fPIC to fortran
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 11, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
…6 builds madgraph5#904 (disabling OMP only for clang16; add -no-pie for fcheck_cpp.exe)
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
…ph5#904: remove link-time -no-pie, add compiler-time -fPIC to fortran
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
…5#904: remove link-time -no-pie, add compiler-time -fPIC to fortran
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 12, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 17, 2024
…6 builds madgraph5#904 (disabling OMP only for clang16; add -no-pie for fcheck_cpp.exe)
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 17, 2024
valassi added a commit to valassi/madgraph4gpu that referenced this issue Jul 17, 2024
…5#904: remove link-time -no-pie, add compiler-time -fPIC to fortran
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 a pull request may close this issue.

1 participant