[llvmlinux] Problem in Sync and fetch needed external projects
zhanglf
zhanglf at morningtec.cn
Wed Jun 18 13:43:30 UTC 2014
Hi,
Thank you very much, it helps to narrow down the scope of possible causes.
And I did as you told me, try to build toolchain first, but got the same problems :(
$ cd toolchain/clang
$ make
CMake Error at cmake/modules/AddLLVM.cmake:83 (add_executable):
add_executable cannot create target "llvm-symbolizer" because another
target with the same name already exists. The existing target is an
executable created in source directory
"/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/src/llvm/projects/compiler-rt/utils/llvm-symbolizer".
See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:99 (add_llvm_executable)
tools/llvm-symbolizer/CMakeLists.txt:11 (add_llvm_tool)
CMake Error at cmake/modules/LLVM-Config.cmake:58 (target_link_libraries):
Attempt to add link library "LLVMDebugInfo" to target "llvm-symbolizer"
which is not built in this directory.
Call Stack (most recent call first):
cmake/modules/LLVM-Config.cmake:50 (explicit_llvm_config)
cmake/modules/AddLLVM.cmake:86 (llvm_config)
cmake/modules/AddLLVM.cmake:99 (add_llvm_executable)
tools/llvm-symbolizer/CMakeLists.txt:11 (add_llvm_tool)
CMake Error at cmake/modules/LLVM-Config.cmake:58 (target_link_libraries):
Attempt to add link library "LLVMObject" to target "llvm-symbolizer" which
is not built in this directory.
Call Stack (most recent call first):
cmake/modules/LLVM-Config.cmake:50 (explicit_llvm_config)
cmake/modules/AddLLVM.cmake:86 (llvm_config)
cmake/modules/AddLLVM.cmake:99 (add_llvm_executable)
tools/llvm-symbolizer/CMakeLists.txt:11 (add_llvm_tool)
CMake Error at cmake/modules/LLVM-Config.cmake:58 (target_link_libraries):
Attempt to add link library "LLVMSupport" to target "llvm-symbolizer" which
is not built in this directory.
Call Stack (most recent call first):
cmake/modules/LLVM-Config.cmake:50 (explicit_llvm_config)
cmake/modules/AddLLVM.cmake:86 (llvm_config)
cmake/modules/AddLLVM.cmake:99 (add_llvm_executable)
tools/llvm-symbolizer/CMakeLists.txt:11 (add_llvm_tool)
-- Configuring incomplete, errors occurred!
See also "/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/build/llvm/CMakeFiles/CMakeOutput.log".
See also "/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/build/llvm/CMakeFiles/CMakeError.log".
make: *** [/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/state/llvm-configure] Error 1
So I think the problem is CMake. It seems that I have the latest version, I just installed it two days ago with home-brew:
$ cmake --version
cmake version 2.8.12.2
And I tried to find out how many llvm-symbolizers there are and where are them,
$ find . -name llvm-symbolizer
./toolchain/clang/build/llvm/projects/compiler-rt/utils/llvm-symbolizer
./toolchain/clang/build/llvm/tools/llvm-symbolizer
./toolchain/clang/src/llvm/projects/compiler-rt/utils/llvm-symbolizer
./toolchain/clang/src/llvm/tools/llvm-symbolizer
Is there any problem with it? Should it be in both build and src directory?
Thanks in advance :)
------------------
Thanks and best regards,
Lifang Zhang
E: zhanglf at morningtec.cn
W: www.morningtec.cn
A: Office 915, Hongyi Building, 2158 Wanyuan Road Minhang Direction, Shanghai, China
------------------ Original ------------------
From: "Tinti"<viniciustinti at gmail.com>;
Date: Wed, Jun 18, 2014 08:21 PM
To: "Behan Webster"<behanw at converseincode.com>;
Cc: "zhanglf"<zhanglf at morningtec.cn>; "岑鹏浩"<cenph at morningtec.cn>; "陈文琦"<chenwq at morningtec.cn>; "llvmlinux"<llvmlinux at lists.linuxfoundation.org>;
Subject: Re: [llvmlinux] Problem in Sync and fetch needed external projects
Hi,
On Wed, Jun 18, 2014 at 12:14 AM, Behan Webster <behanw at converseincode.com> wrote:
On 06/16/14 22:43, zhanglf wrote:
$ make all
...
CMake Error at cmake/modules/AddLLVM.cmake:83 (add_executable): add_executable cannot create target "llvm-symbolizer" because another
target with the same name already exists. The existing target is an
executable created in source directory
"/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/src/llvm/projects/compiler-rt/utils/llvm-symbolizer".
See documentation for policy CMP0002 for more details.
...
-- Configuring incomplete, errors occurred!
See also "/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/build/llvm/CMakeFiles/CMakeOutput.log".
See also "/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/build/llvm/CMakeFiles/CMakeError.log".
make: *** [/Volumes/macdat/scratch/LLVMLinux/llvmlinux/toolchain/clang/state/llvm-configure] Error 1
Never seen this error. No idea.
And if I remove the llvm-symbolizer directory and build again:
You should never need to do that. Probably a bad idea.
$ make all
CMake Error at projects/compiler-rt/utils/CMakeLists.txt:1 (add_subdirectory):
add_subdirectory given source "llvm-symbolizer" which is not an existing
directory.
Yup. Bad idea. :)
So what is the problem there? What should I do to fix it?
Good question. If you figure it out let us know.
I am not sure but I would guess that this is related to your CMake version. Try to get the lasted one.
Just to get things working you might want to just concentrate on the toolchain. For the moment it means no need for a config file either if you do this and that makes it less effort for now.
$ cd toolchain/clang
$ make
You'll see the following warning, but it's fine:
---------------------------------------------------------------------
I: Convenience Makefile. Normally this is run from one of the target directories
---------------------------------------------------------------------
And if I ran $ make CONFIG=config.mk sync-all again, following information was displayed: …
Unpacking objects: 100% (6/6), done.
From git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
7171511..68986c9 master -> master
make[2]: arm-linux-androideabi-gcc: Command not found
This isn't an issue. The cross android toolchain just hasn't been downloaded yet. It tends to happen after building clang.
You can force all things to download with a:
$ make CONFIG=config.mk fetch-all
But this "Command not found" isn't an issue for now. It would be if you were in the middle of compiling the kernel when it happened.
Behan
-- Behan Webster behanw at converseincode.com
--
Simplicity is the ultimate sophistication
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20140618/d31f5fed/attachment-0001.html>
More information about the LLVMLinux
mailing list