[cfe-dev] Relink problem building LLVM 7.0.0 rc1 with Cmake, Ninja and gcc 7.1

Fletcher, John P via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 16 04:48:11 PDT 2018


Michael

Thank you for this.  I reran the task with these commands added.  This time the install ran much further and failed with a similar failure for readline.so

  file INSTALL cannot find
  "/home/fletcher/LLVM/llvm-7.0.rc1/build/tools/lldb/scripts/Python/modules/readline/CMakeFiles/CMakeRelink.dir/readline.so".

Fortunately this is near the end of the install process and I have a working system for clang, which is what I was looking for.

I think this means that this is an issue for llvm-dev, which I am not subscribed too.

Would someone please forward this to llvm-dev.

It seems to me that there are issues from changes in configuration from 6.0.0 to 7.0.0 which are causing these problems.

Thanks

John

________________________________________
From: Michael Kruse [cfe-dev at meinersbur.de]
Sent: 15 August 2018 20:40
To: Fletcher, John P
Cc: clang developer list
Subject: Re: [cfe-dev] Relink problem building LLVM 7.0.0 rc1 with Cmake, Ninja and gcc 7.1

I have never seen a CMakeRelink.dir in my build directory. You might
try disabling Polly if it is the only cause if the error:
`-DLLVM_POLLY_BUILD=OFF -DLLVM_POLLY_LINK_INTO_TOOLS=OFF
-DLLVM_TOOL_POLLY_BUILD=OFF`

Michael


Am Mi., 15. Aug. 2018 um 10:57 Uhr schrieb Fletcher, John P via
cfe-dev <cfe-dev at lists.llvm.org>:
>
> I have previously built LLVM and Clang 6.0.0 with Cmake, Ninja and gcc 7.1
>
> 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).
>
> The underlying linux is Ubuntu 12.04, with the gcc 7.1 installed in /opt
>
> My commands for Cmake are these:
>
> /opt/cmake/bin/cmake -GNinja \
> -DCMAKE_C_COMPILER=/opt/gcc-7.1/bin/gcc \
> -DCMAKE_CXX_COMPILER=/opt/gcc-7.1/bin/g++ \
> -DGCC_INSTALL_PREFIX=/opt/gcc-7.1 \
> -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
>
> I have had several problems.  Some with versions of cuda I have solved for now by excluding openmp from the build.
>
> After this the build failed when linking a library as follows
>
> FAILED: lib/clang/7.0.0/lib/linux/libclang_rt.fuzzer_no_main-x86_64.a
> --localize-hidden: not found
>
> 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.
>
> //Path to a program.
> CMAKE_NM:FILEPATH=/usr/bin/nm
>
> //Path to a program.
> CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
>
> //Path to a program.
> CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
>
> //Path to a program.
> CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
>
> When I restore these lines to CmakeCache.txt the build of 7.0.0 proceeds to completion.
>
> Install now fails with the following message:
>
>   file INSTALL cannot find
>   "/home/fletcher/LLVM/llvm-7.0.rc1/build/tools/polly/lib/CMakeFiles/CMakeRelink.dir/LLVMPolly.so".
>
> 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
>
> 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.
>
> It seems that the relink process has not been organised.
>
> I have not looked beyond LVMPolly as the install process will not go any further.
>
> I hope that you can identify what the problem is.
>
> Thank you
>
> John Fletcher
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fcfe-dev&data=02%7C01%7Cj.p.fletcher%40aston.ac.uk%7Cad37c3eb4bc0406ea20e08d602e701e3%7Ca085950c4c2544d5945ab852fa44a221%7C0%7C1%7C636699588530561679&sdata=ovAI1%2Biuj9itZsebfgB%2F1No47i5h%2FtH47JSOvIe%2Fcvk%3D&reserved=0



More information about the cfe-dev mailing list