msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 1.21k forks source link

clang 7.0.1 PGO -fprofile-generate flag doesn't work #4806

Closed d3vv closed 5 years ago

d3vv commented 5 years ago
..

clang++ -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT   -c -o syzygy/tbprobe.o syzygy/tbprobe.cpp
clang++ -o stockfish.exe benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o syzygy/tbprobe.o -lgcov -static
bitboard.o:(.lprfd[__profd__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag.55839249216]+0x0): multiple definition of `__profd__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag.55839249216'

..

syzygy/tbprobe.o:(.text+0x2871): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text+0x2cba): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0x2d5f): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0x2ddb): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0x31f7): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0x32e4): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0x3367): more undefined references to `__llvm_profile_instrument_range' follow
syzygy/tbprobe.o:(.text+0xd3f4): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text+0xdc6e): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text+0xe97c): undefined reference to `__llvm_profile_register_function'
syzygy/tbprobe.o:(.text+0xe988): undefined reference to `__llvm_profile_register_function'
syzygy/tbprobe.o:(.text+0xe994): undefined reference to `__llvm_profile_register_function'
syzygy/tbprobe.o:(.text+0xe9a0): undefined reference to `__llvm_profile_register_function'
syzygy/tbprobe.o:(.text+0xe9ac): undefined reference to `__llvm_profile_register_function'
syzygy/tbprobe.o:(.text+0xe9b8): more undefined references to `__llvm_profile_register_function' follow
syzygy/tbprobe.o:(.text+0xedb1): undefined reference to `__llvm_profile_register_names_function'
syzygy/tbprobe.o:(.text$_ZNSt6vectorI6SquareSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorI6SquareSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x11c): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZNSt6vectorI6SquareSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorI6SquareSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x173): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZNSt6vectorIySaIyEE17_M_default_appendEy[_ZNSt6vectorIySaIyEE17_M_default_appendEy]+0x158): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZNSt6vectorIhSaIhEE17_M_default_appendEy[_ZNSt6vectorIhSaIhEE17_M_default_appendEy]+0xd9): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZNSt6vectorIhSaIhEE17_M_default_appendEy[_ZNSt6vectorIhSaIhEE17_M_default_appendEy]+0x123): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZNSt6vectorIhSaIhEE17_M_default_appendEy[_ZNSt6vectorIhSaIhEE17_M_default_appendEy]+0x16f): more undefined references to `__llvm_profile_instrument_range' follow
syzygy/tbprobe.o:(.text$_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_[_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_]+0xe0): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_[_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_]+0x108): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_[_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_]+0x136): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_[_ZSt16__introsort_loopIP6SquarexN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_T1_]+0x16c): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_[_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_]+0x72): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_[_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_]+0xa7): more undefined references to `__llvm_profile_instrument_target' follow
syzygy/tbprobe.o:(.text$_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_[_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_]+0xd4): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_[_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_]+0x111): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_[_ZSt16__insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_comp_iterIPFbS0_S0_EEEEvT_S8_T0_]+0x149): undefined reference to `__llvm_profile_instrument_target'
syzygy/tbprobe.o:(.text$_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S5_T0_[_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S5_T0_]+0x8d): undefined reference to `__llvm_profile_instrument_range'
syzygy/tbprobe.o:(.text$_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S5_T0_[_ZSt22__final_insertion_sortIP6SquareN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S5_T0_]+0x26b): undefined reference to `__llvm_profile_instrument_range'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:496: stockfish.exe] Error 1
make[2]: Leaving directory '/home/dew/REPOS/Stockfish/src'
make[1]: *** [Makefile:512: gcc-profile-make] Error 2
make[1]: Leaving directory '/home/dew/REPOS/Stockfish/src'
make: *** [Makefile:418: profile-build] Error 2
Alexpux commented 5 years ago

@d3vv open bugreports on LLVM bugtracker. There are nothing to do from my side