Closed subhakr closed 1 month ago
https://llvm.org/docs/CMake.html#frequently-used-cmake-variables
Your machine's RAM looks not big enough for a Debug build. Try to increase swap space or enable zram.
- Try installing lld and using it in the build by passing -DLLVM_USE_LINKER=lld to CMake.
admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/llvm-project-llvmorg-19.1.0-rc2$ cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=lld
CMake Deprecation Warning at /home/admin1/llvm-project-llvmorg-19.1.0-rc2/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
The OLD behavior for policy CMP0114 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
CMake Deprecation Warning at /home/admin1/llvm-project-llvmorg-19.1.0-rc2/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.10.1
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting LoongArch
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting VE
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Failed to find LLVM FileCheck
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/admin1/llvm-project-llvmorg-19.1.0-rc2/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Configuring done (3.0s)
-- Generating done (2.0s)
-- Build files have been written to: /home/admin1/llvm-project-llvmorg-19.1.0-rc2/build
admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/llvm-project-llvmorg-19.1.0-rc2$ ninja -C build check-llvm
ninja: Entering directory `build'
[2/3] Running the LLVM regression tests
fatal: not a git repository (or any of the parent directories): .git
An error occurred retrieving the git revision: Command '['git', '-C', '/home/admin1/llvm-project-llvmorg-19.1.0-rc2/llvm', 'rev-parse', 'HEAD']' returned non-zero exit status 128.
Testing Time: 912.28s
Total Discovered Tests: 60683
Skipped : 15 (0.02%)
Unsupported : 2263 (3.73%)
Passed : 58250 (95.99%)
Expectedly Failed: 155 (0.26%)
2. If tat doesn't help, try additionally passing -DLLVM_PARALLEL_LINK_JOBS=1 to CMake.
admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/llvm-project-llvmorg-19.1.0-rc2$ cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=lld -DLLVM_PARALLEL_LINK_JOBS=1
CMake Deprecation Warning at /home/admin1/llvm-project-llvmorg-19.1.0-rc2/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
The OLD behavior for policy CMP0114 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
CMake Deprecation Warning at /home/admin1/llvm-project-llvmorg-19.1.0-rc2/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
The OLD behavior for policy CMP0116 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.10.1
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting LoongArch
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting VE
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Failed to find LLVM FileCheck
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/admin1/llvm-project-llvmorg-19.1.0-rc2/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Configuring done (2.3s)
-- Generating done (1.8s)
-- Build files have been written to: /home/admin1/llvm-project-llvmorg-19.1.0-rc2/build
admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/llvm-project-llvmorg-19.1.0-rc2$ ninja -C build check-llvm
ninja: Entering directory `build'
[2/3] Running the LLVM regression tests
fatal: not a git repository (or any of the parent directories): .git
An error occurred retrieving the git revision: Command '['git', '-C', '/home/admin1/llvm-project-llvmorg-19.1.0-rc2/llvm', 'rev-parse', 'HEAD']' returned non-zero exit status 128.
Testing Time: 915.47s
Total Discovered Tests: 60683
Skipped : 15 (0.02%)
Unsupported : 2263 (3.73%)
Passed : 58250 (95.99%)
Expectedly Failed: 155 (0.26%)
After running this command i got these errors how can i get to know those test cases except passed. is there any flags for this verification.
The tests driven by llvm-lit utility. You can configure its arguments by passing "-DLLVM_LIT_ARGS=your options"
to CMake, or you can invoke the utility directly, e.g.: build/bin/llvm-lit build/test
.
There are several options controlling verbosity of the output, you probably just need -v
or none at all.
The tests driven by llvm-lit utility. You can configure its arguments by passing
"-DLLVM_LIT_ARGS=your options"
to CMake
After running this command i got all the test case list which all are failing and unsupporting. please help to solve this issues by seeing attached files. LLVM_build_failed_test_cases.txt
can you sugget me to make proper build. and my main moto building LLVM latest version is:
i am trying to integarte sysbench benchmark source with webassembly. i am able to integrate and compiled succesfully. But when running with WAMR runtime i am fcaing issue like
admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/sysbench_main$ /home/admin1/Documents/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm src/sysbench cpu --cpu-max-prime=20000 --time=3 run
[16:32:07:108 - 70D32DA57740]: warning: failed to link import function (env, __wasm_longjmp)
[16:32:07:108 - 70D32DA57740]: warning: failed to link import function (env, saveSetjmp)
[16:32:07:108 - 70D32DA57740]: warning: failed to link import function (env, getTempRet0)
[16:32:07:108 - 70D32DA57740]: warning: failed to link import function (env, testSetjmp)
Attempting to allocate 1064960 bytes of memory...
sysbench 1.1.0-2ca9e3f (using Lua Lua 5.3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Prime numbers limit: 20000
Initializing worker threads...
[16:32:07:110 - 70D32DA57740]: warning: failed to link import function (env, __wasm_longjmp)
[16:32:07:110 - 70D32DA57740]: warning: failed to link import function (env, saveSetjmp)
[16:32:07:110 - 70D32DA57740]: warning: failed to link import function (env, getTempRet0)
[16:32:07:110 - 70D32DA57740]: warning: failed to link import function (env, testSetjmp)
Threads started!
CPU speed:
events per second: 577872.75
Throughput:
events/s (eps): 577872.7502
time elapsed: 3.0002s
total number of events: 1733710
Latency (ms):
min: 0.00
avg: 0.00
max: 0.02
95th percentile: 0.00
sum: 562.64
Threads fairness:
events (avg/stddev): 1733710.0000/0.00
execution time (avg/stddev): 0.5626/0.00
means i am getting issue with jump functions.
I thought i have issue with WAMR runtime, but they were saying like this issue can resolve with LLVM latest version 19. that is the reason i am trying to install LLVM. am i following correct path or not. please suggest me.
If you only need to build llvm, you have already done that. I guess all you need now is to install LLVM somewhere and wire it up to your runtime. That I can't help you with, I know nothing about wasm/wamr. It may make sense opening a separate issue with more specific subject / description.
I'm closing the issue now since the original problem seems to have been resolved.
Last one question, in LLVM build where can i find clang-19 version. means Executable. please tell me that info. that enough for me
It isn't built by default. You need to add -DLLVM_ENABLE_PROJECTS=clang
to CMake arguments and then ninja clang
(or just ninja
).
Hi, I trying to install LLVM-19.1.0-rc2 (https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.0-rc2)
OS: ubuntu22.04LTS CPU architectiure: x86_64 RAM and intrenal space: 8GB and 256GB
and the commands i have used to compile
but when compiling i am getting below error
could you help me to install it properly in my OS.