Cactus fails to link with gcc-10 due to duplicate linker symbols
Issue #2406
resolved
Compiling with gcc-10 Cactus eventually fails to link with errors such as (shown for ExternalLibraries/HDF5 but also happen eg for the restricted parameters structs _wavetoyres_
or so):
/usr/bin/ld: ../src/libh5check.a(h5pline.o):/data/rhaas/postdoc/gr/cactus/ET_Turing/configs/sim/scratch/build/HDF5/h5check_2_0/src/h5_check.h:2126: multiple definition of `g_verbose_num'; h5checker_main.o:/data/rhaas/postdoc/gr/cactus/ET_Turing/configs/sim/scratch/build/HDF5/h5check_2_0/tool/../src/h5_check.h:2126: first defined here
This is due to the compiler defaulting to -fno-common
(https://gcc.gnu.org/gcc-10/porting_to.html) and can be avoiding by add -fcommon
.
Comments (8)
-
reporter -
reporter Pull request is here: https://bitbucket.org/cactuscode/cactus/pull-requests/96/rhaas-common
-
reporter Please review.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to open
-
reporter - changed status to resolved
-
reporter Will backport to ET_2020_05 after some more testing
-
reporter - Log in to comment
I good solution is likely to check for
__attribute__((__common__))
in configure then use that when declaring the parameter structs as this does not require that a particular command line option be used.