Closed Alessandro-Barbieri closed 1 month ago
gentoo CI tried to build with LTO and failed
make[1]: Entering directory '/var/tmp/portage/sys-cluster/mpi-benchmarks-2021.3/work/mpi-benchmarks-IMB-v2021.3/src_cpp' mpicxx -DMT -IMT -I. -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -g -Wall -Wextra -pedantic -Wno-long-long -fopenmp -fPIC -c -o MT/MT_suite.o MT/MT_suite.cpp mpicc -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -g -Wall -Wno-long-long -Ihelpers -I../src_c -DMPIIO -I. -DMPIIO -c -o IO/IMB_read.o ../src_c/IMB_read.c mpicc -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -g -Wall -Wno-long-long -Ihelpers -I../src_c -DMPIIO -I. -DMPIIO -c -o IO/IMB_write.o ../src_c/IMB_write.c mpicxx -Ihelpers -I../src_c -DMPIIO -I. -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -g -Wall -Wextra -pedantic -Wno-long-long -fPIE -o IMB-IO imb.o args_parser.o args_parser_utests.o scope.o IO/IO_suite.o IO/IO_benchmark.o benchmark_suites_collection.o IO/IMB_declare.o IO/IMB_init.o IO/IMB_mem_manager.o IO/IMB_benchlist.o IO/IMB_strgs.o IO/IMB_err_handler.o IO/IMB_parse_name_io.o IO/IMB_g_info.o IO/IMB_warm_up.o IO/IMB_open_close.o IO/IMB_output.o IO/IMB_utils.o IO/IMB_init_transfer.o IO/IMB_init_file.o IO/IMB_user_set_info.o IO/IMB_chk_diff.o IO/IMB_cpu_exploit.o IO/IMB_read.o IO/IMB_write.o -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 ../src_c/IMB_comm_info.h:99:8: error: type �-Werror=odr][]] 99 | struct comm_info { | ^ ../src_c/IMB_comm_info.h:99:8: note: a different type is defined in another translation unit 99 | struct comm_info { | ^ ../src_c/IMB_comm_info.h:129:21: note: the first difference of corresponding definitions is field ‘s_data’ 129 | assign_type* s_data; /* assign_type equivalent of s_buffer */ | ^ ../src_c/IMB_comm_info.h:129:21: note: a field of same name but different type is defined in another translation unit 129 | assign_type* s_data; /* assign_type equivalent of s_buffer */ | ^ ../src_c/IMB_comm_info.h:99:8: note: type ‘assign_type’ should match type ‘assign_type’ 99 | struct comm_info { | ^ lto1: some warnings being treated as errors lto-wrapper: fatal error: x86_64-pc-linux-gnu-g++ returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[1]: *** [Makefile:167: IMB-IO] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-cluster/mpi-benchmarks-2021.3/work/mpi-benchmarks-IMB-v2021.3/src_cpp' make: *** [Makefile:69: IMB-IO] Error 2 make: *** Waiting for unfinished jobs....
see https://bugs.gentoo.org/860540 log https://860540.bugs.gentoo.org/attachment.cgi?id=793919
@Alessandro-Barbieri is it still actual now for you ?
@Alessandro-Barbieri if you remove flag "-Werror" from Mekafile you can build Benchmark
gentoo CI tried to build with LTO and failed
see https://bugs.gentoo.org/860540 log https://860540.bugs.gentoo.org/attachment.cgi?id=793919