Skip to content

cmake error #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Zke1ev3n opened this issue Jul 6, 2017 · 10 comments
Closed

cmake error #71

Zke1ev3n opened this issue Jul 6, 2017 · 10 comments

Comments

@Zke1ev3n
Copy link

Zke1ev3n commented Jul 6, 2017

when i use the following command:
cmake -DCMAKE_BUILD_TYPE=Release ../obfuscator/
it report an error:

CMake Error at cmake/modules/AddLLVM.cmake:1163 (add_custom_target):
add_custom_target cannot create target "check-llvm-bindings-ocaml" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/home/zke1e/Workspace/LLVM/OLLVM4/obfuscator/test". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:1226 (add_lit_target)
test/CMakeLists.txt:150 (add_lit_testsuites)

how could i solve this problem? thanks

@BiteFoo
Copy link

BiteFoo commented Jul 14, 2017

When I also used the following command : cmake -DCMAKE_BUILD_TYPE=Release ../obfuscator/ ,and I had the same error prompt ,I don't kwno how to do ?

@Zke1ev3n
Copy link
Author

it's strange,i compiled it on "bash on ubuntu on windows" and mac,it can be complied.

@BiteFoo
Copy link

BiteFoo commented Jul 14, 2017

@Zke1ev3n That's to say,using the mac os or on windows os will be worked ? I'm not sure that I can understand what U mean .

@TheCjw
Copy link

TheCjw commented Jul 17, 2017

Same issue at Ubuntu 16.04, and solved by this:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=OFF ../llvm-4.0/

@perror
Copy link

perror commented Mar 19, 2018

Same problem with a Debian unstable. Yet, I solved the problem by adding the -DLLVM_INCLUDE_TESTS=OFF flag. But, this is not really satisfactory if I want to build tests...

@Zibri
Copy link

Zibri commented Mar 21, 2018

same problem on ubuntu 17.10 mitigated using -DLLVM_INCLUDE_TESTS=OFF as suggested by perror

@skyel1u
Copy link

skyel1u commented Mar 21, 2018

Try this:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=OFF ../obfuscator

@candledragle
Copy link

I success with cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=OFF ../obfuscator/

@b4cktr4ck2
Copy link

I just came across this error and the solution @candledragle proposed worked for me as well. Can this be included in a "troubleshooting" section?

@zecode
Copy link

zecode commented May 12, 2021

The problem is in two dirs: Ocaml and OCaml
How to solve:

root@adv-s04 /tmp/obfuscator $ ls -l test/Bindings/
total 16
drwxr-xr-x 2 root root 4096 May 12 06:10 Go
drwxr-xr-x 5 root root 4096 May 12 06:10 llvm-c
drwxr-xr-x 2 root root 4096 May 12 06:10 Ocaml
drwxr-xr-x 2 root root 4096 May 12 06:10 OCaml
root@adv-s04 /tmp/obfuscator $ ls -l test/Bindings/Ocaml/
total 32
-rwxr-xr-x 1 root root 1410 May 12 06:10 analysis.ml
-rwxr-xr-x 1 root root 1972 May 12 06:10 bitreader.ml
-rwxr-xr-x 1 root root 1386 May 12 06:10 bitwriter.ml
-rwxr-xr-x 1 root root 3321 May 12 06:10 executionengine.ml
-rwxr-xr-x 1 root root  803 May 12 06:10 ext_exc.ml
-rwxr-xr-x 1 root root  170 May 12 06:10 lit.local.cfg
-rwxr-xr-x 1 root root 2904 May 12 06:10 scalar_opts.ml
-rwxr-xr-x 1 root root 3741 May 12 06:10 target.ml
root@adv-s04 /tmp/obfuscator $ ls -l test/Bindings/OCaml/
total 84
-rwxr-xr-x 1 root root 56991 May 12 06:10 core.ml
-rwxr-xr-x 1 root root  1469 May 12 06:10 diagnostic_handler.ml
-rwxr-xr-x 1 root root  2124 May 12 06:10 ipo.ml
-rwxr-xr-x 1 root root  1475 May 12 06:10 irreader.ml
-rwxr-xr-x 1 root root  1628 May 12 06:10 linker.ml
-rwxr-xr-x 1 root root  1956 May 12 06:10 passmgr_builder.ml
-rwxr-xr-x 1 root root   591 May 12 06:10 transform_utils.ml
-rwxr-xr-x 1 root root  1550 May 12 06:10 vectorize.ml
root@adv-s04 /tmp/obfuscator $ cp test/Bindings/Ocaml/* test/Bindings/OCaml/
root@adv-s04 /tmp/obfuscator $ mv test/Bindings/Ocaml test/Bindings/Ocaml-empty
root@adv-s04 /tmp/obfuscator $ ls -l test/Bindings/OCaml/
total 116
-rwxr-xr-x 1 root root  1410 May 12 06:13 analysis.ml
-rwxr-xr-x 1 root root  1972 May 12 06:13 bitreader.ml
-rwxr-xr-x 1 root root  1386 May 12 06:13 bitwriter.ml
-rwxr-xr-x 1 root root 56991 May 12 06:10 core.ml
-rwxr-xr-x 1 root root  1469 May 12 06:10 diagnostic_handler.ml
-rwxr-xr-x 1 root root  3321 May 12 06:13 executionengine.ml
-rwxr-xr-x 1 root root   803 May 12 06:13 ext_exc.ml
-rwxr-xr-x 1 root root  2124 May 12 06:10 ipo.ml
-rwxr-xr-x 1 root root  1475 May 12 06:10 irreader.ml
-rwxr-xr-x 1 root root  1628 May 12 06:10 linker.ml
-rwxr-xr-x 1 root root   170 May 12 06:13 lit.local.cfg
-rwxr-xr-x 1 root root  1956 May 12 06:10 passmgr_builder.ml
-rwxr-xr-x 1 root root  2904 May 12 06:13 scalar_opts.ml
-rwxr-xr-x 1 root root  3741 May 12 06:13 target.ml
-rwxr-xr-x 1 root root   591 May 12 06:10 transform_utils.ml
-rwxr-xr-x 1 root root  1550 May 12 06:10 vectorize.ml
root@adv-s04 /tmp/obfuscator $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants