[llvm-dev] Linker Error when building test-suite with PGO

Liqiang Tao via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 25 08:25:22 PDT 2021


Dear All,

When I build test-suite with following option,
-DTEST_SUITE_PROFILE_GENERATE=ON

I got some errors.
[ 83%] Building C object
SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8e.dir/fp-cmp-8e.c.o
[ 83%] Building C object
SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-3.dir/fp-cmp-3.c.o
CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In
function `test2':
compare-fp-3.c:(.text+0x4d): undefined reference to `link_error0'
CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In
function `test3':
compare-fp-3.c:(.text+0x8d): undefined reference to `link_error0'
CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In
function `test5':
compare-fp-3.c:(.text+0x113): undefined reference to `link_error1'
CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In
function `test6':
compare-fp-3.c:(.text+0x163): undefined reference to `link_error1'
CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In
function `all_tests':
compare-fp-3.c:(.text+0x1f0): undefined reference to `link_error0'
compare-fp-3.c:(.text+0x223): undefined reference to `link_error0'
compare-fp-3.c:(.text+0x2f6): undefined reference to `link_error1'
compare-fp-3.c:(.text+0x344): undefined reference to `link_error1'
[ 83%] Linking C executable GCC-C-execute-ieee-fp-cmp-1
clang-12: error: linker command failed with exit code 1 (use -v to see
invocation)
[ 83%] Building C object
SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8l.dir/fp-cmp-8l.c.o

There errors won't appear if -DTEST_SUITE_PROFILE_GENERATE=OFF.

I got no idea from these error messages. Please allow me to ask for help
here.
Has anyone met errors like these before? I appreciate for your help.

Best Wishes,
Liqiang Tao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210326/019c98a0/attachment.html>


More information about the llvm-dev mailing list