SUMMARY:
Recent versions of gcc such as 10.2.0 are, by default, stricter than older versions. This will require either improving sage :) or hacking and delaying a proper improvement :P. I outline the improvement and state the hack.
REPRODUCE BUG:
COMMIT=0fec63735eaa5923431e276c586108e2653a96c5
LANG=C
wget https://codeload.github.com/darrencroton/sage/tar.gz/${COMMIT}
tar -x -f ${COMMIT}
cd sage-${COMMIT}
gcc --version # gives: gcc (GCC) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. ...
make
ERROR MESSAGES:
cc -g -O0 -Wall ./code/main.o ./code/core_read_parameter_file.o ./code/core_init.o ./code/core_io_tree.o ./code/core_cool_func.o ./code/core_build_model.o ./code/core_save.o ./code/core_mymalloc.o ./code/core_allvars.o ./code/model_infall.o ./code/model_cooling_heating.o ./code/model_starformation_and_feedback.o ./code/model_disk_instability.o ./code/model_reincorporation.o ./code/model_mergers.o ./code/model_misc.o ./code/io/tree_binary.o -g -lm -lgsl -lgslcblas -lm -Xlinker -rpath -Xlinker -o sage
/usr/bin/ld: ./code/core_read_parameter_file.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_read_parameter_file.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_read_parameter_file.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_read_parameter_file.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_read_parameter_file.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_init.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_init.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_init.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_init.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_init.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_io_tree.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_io_tree.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_io_tree.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_io_tree.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_io_tree.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_cool_func.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_cool_func.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_cool_func.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_cool_func.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_cool_func.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_build_model.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_build_model.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_build_model.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_build_model.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_build_model.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_save.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_save.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_save.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_save.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_save.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_mymalloc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_mymalloc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_mymalloc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_mymalloc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_mymalloc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/core_allvars.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/core_allvars.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_allvars.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/core_allvars.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/core_allvars.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_infall.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_infall.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_infall.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_infall.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_infall.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_cooling_heating.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_cooling_heating.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_cooling_heating.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_cooling_heating.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_cooling_heating.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_starformation_and_feedback.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_starformation_and_feedback.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_starformation_and_feedback.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_starformation_and_feedback.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_starformation_and_feedback.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_disk_instability.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_disk_instability.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_disk_instability.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_disk_instability.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_disk_instability.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_reincorporation.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_reincorporation.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_reincorporation.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_reincorporation.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_reincorporation.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_mergers.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_mergers.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_mergers.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_mergers.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_mergers.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/model_misc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/model_misc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_misc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/model_misc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/model_misc.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
/usr/bin/ld: ./code/io/tree_binary.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/io/../core_simulation.h:27: multiple definition of `Halo'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_simulation.h:27: first defined here
/usr/bin/ld: ./code/io/tree_binary.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/io/../core_allvars.h:184: multiple definition of `Gal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/io/tree_binary.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/io/../core_allvars.h:184: multiple definition of `HaloGal'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:184: first defined here
/usr/bin/ld: ./code/io/tree_binary.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/io/../core_allvars.h:195: multiple definition of `HaloAux'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:195: first defined here
/usr/bin/ld: ./code/io/tree_binary.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/io/../core_allvars.h:316: multiple definition of `TreeType'; ./code/main.o:/build/sage-0fec63735eaa5923431e276c586108e2653a96c5/code/core_allvars.h:316: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:82: sage] Error 1
POSSIBLE SOLUTIONS:
See -fno-common in info gcc for discussion of repeated
declarations - of "common" variables. Use of something like
#ifndef HAVE_SAGE_CORE
#define HAVE_SAGE_CORE 1
...(main body of declarations)
#endif
would probably be the best solution.
A fast hack that works for me is the following:
make OPTIONS=-fcommon
With this-fcommon hack, I get lots of warnings, but a sage binary is created:
$ ls -l sage
-rwxr-xr-x 1 boud boud 173136 Oct 2 17:34 sage*
SUMMARY: Recent versions of gcc such as 10.2.0 are, by default, stricter than older versions. This will require either improving sage :) or hacking and delaying a proper improvement :P. I outline the improvement and state the hack.
REPRODUCE BUG:
ERROR MESSAGES:
POSSIBLE SOLUTIONS:
See
-fno-common
ininfo gcc
for discussion of repeated declarations - of "common" variables. Use of something likewould probably be the best solution.
A fast hack that works for me is the following:
With this
-fcommon
hack, I get lots of warnings, but a sage binary is created: