Skip to content

Fix build errors with clang16 (and clang17) #904

@valassi

Description

@valassi

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions