<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>I have previously built LLVM and Clang 6.0.0 with Cmake, Ninja and gcc 7.1</div>
<div><br>
</div>
<div>I am using cmake 3.6.2 and binutils 2.22 with ninja 1.8.2 (updated from 1.7.2 for the 6.0.0 build).</div>
<div><br>
</div>
<div>The underlying linux is Ubuntu 12.04, with the gcc 7.1 installed in /opt</div>
<div><br>
</div>
<div>My commands for Cmake are these:</div>
<div><br>
</div>
<div>/opt/cmake/bin/cmake -GNinja \<br>
-DCMAKE_C_COMPILER=/opt/gcc-7.1/bin/gcc \<br>
-DCMAKE_CXX_COMPILER=/opt/gcc-7.1/bin/g++ \<br>
-DGCC_INSTALL_PREFIX=/opt/gcc-7.1 \<br>
-DCMAKE_INSTALL_PREFIX=/home/fletcher/LLVM/llvm-7.0.rc1/local -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_PARALLEL_LINK_JOBS=1 -DCMAKE_EXE_LINKER_FLAGS="-Xlinker -R/opt/gcc-7.1/lib64 -L/opt/gcc-7.1/lib64" ../llvm<br>
</div>
<div><br>
</div>
<div>I have had several problems.  Some with versions of cuda I have solved for now by excluding openmp from the build.</div>
<div><br>
</div>
<div>After this the build failed when linking a library as follows<br>
</div>
<div><br>
</div>
<div><font size="2" face="Tahoma" color="black"><span style="font-size:10pt;" dir="ltr">
<div>FAILED: lib/clang/7.0.0/lib/linux/libclang_rt.fuzzer_no_main-x86_64.a</div>
<div>--localize-hidden: not found</div>
<div><br>
</div>
</span></font></div>
<div>I have traced this to the fact that the file CmakeCache.txt omits the following lines when built for 7.0.0 which are in the same file for 6.0.0 and the result is that objcopy is not found.  --localize_hidden is an argument to objcopy.<br>
</div>
<div><br>
</div>
<div>//Path to a program.<br>
CMAKE_NM:FILEPATH=/usr/bin/nm<br>
<br>
//Path to a program.<br>
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy<br>
<br>
//Path to a program.<br>
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump<br>
<br>
//Path to a program.<br>
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib<br>
</div>
<div><br>
</div>
<div>When I restore these lines to CmakeCache.txt the build of 7.0.0 proceeds to completion.</div>
<div><br>
</div>
<div>Install now fails with the following message:</div>
<div><br>
</div>
<div>  file INSTALL cannot find<br>
  "/home/fletcher/LLVM/llvm-7.0.rc1/build/tools/polly/lib/CMakeFiles/CMakeRelink.dir/LLVMPolly.so".<br>
</div>
<div><br>
</div>
<div>This is because the location does not exist.  Again, comparing with 6.0.0, there the file to be installed was found from /home/fletcher/LLVM/llvm-6.0.distrib/build/lib/libPolly.a</div>
<div><br>
</div>
<div>There is a file in the corresponding location in 7.0.0.  It is not being used and instead a relinked file is looked for.</div>
<div><br>
</div>
<div>It seems that the relink process has not been organised.</div>
<div><br>
</div>
<div>I have not looked beyond LVMPolly as the install process will not go any further.</div>
<div><br>
</div>
<div>I hope that you can identify what the problem is.</div>
<div><br>
</div>
<div>Thank you</div>
<div><br>
</div>
<div>John Fletcher</div>
<div><br>
</div>
</div>
</body>
</html>