<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"><style>body { line-height: 1.5; }ol, ul { margin-top: 0px; margin-bottom: 0px; list-style-position: inside; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi all, </div><div><br></div><div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">I try to compile mysql with CFI enabled by LLVM. The version of the softwares are as following:</span></div><ol><li>clang-6.0</li><li>mysql-5.6.26</li><li>binutils-2.28.1</li></ol><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><b> I can compile mysal with the flowing configuration:</b></span></div></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div>CC="clang" CXX="clang++" CFLAGS="-g -flto -fvisibility=hidden -fsanitize=cfi" CXXFLAGS="-g -flto -fvisibility=hidden -fsanitize=cfi" cmake -DCMAKE_{EXE,SHARED,MODULE}_LINKER_FLAGS="-flto -fsanitize=cfi" -DCMAKE_AR=/home/zhangjun/work/llvm/llvm-3.7.1/bin/llvm-ar -DCMAKE_RANLIB=/home/zhangjun/work/llvm/llvm-3.7.1/bin/llvm-ranlib -DCMAKE_INSTALL_PREFIX=../mysql -DWITH_BOOST=./boost .</div><div><br></div><div><b>and the reported error is as following:</b></div><div><br></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">ld: /home/zhangjun/work/llvm/llvm/tools/gold/goldplugin.cpp:879: ld_plugin_status allSymbolsReadHook(): Assertion `ObjFilename.second' failed.<br>clang-6.0: error: unable to execute command: Aborted (core dumped)<br>clang-6.0: error: linker command failed due to signal (use -v to see invocation)<br>make[2]: *** [extra/comp_err] Error 254<br>make[2]: Leaving directory `/home/zhangjun/work/mysql/mysql-5.6.26'<br>make[1]: *** [extra/CMakeFiles/comp_err.dir/all] Error 2<br>make[1]: Leaving directory `/home/zhangjun/work/mysql/mysql-5.6.26'<br>make: *** [all] Error 2<br></span></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br></span></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">Please help me!</span></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'=""><br></span></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">Regards,</span></div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">Jun</span></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>zhangjun02@ict.ac.cn</div></div></span></div>
</body></html>