You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C compiler
"/code/iree/third_party/llvm-project/build/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /code/iree-build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/ninja cmTC_3e84d && [1/2] Building C object CMakeFiles/cmTC_3e84d.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_3e84d
FAILED: cmTC_3e84d
: && /home/barry/code/iree/third_party/llvm-project/build/bin/clang --gcc-toolchain=/opt/riscv --sysroot=/opt/riscv/sysroot --target=riscv64 -march=rv64gc -lstdc++ -lpthread -lm -ldl CMakeFiles/cmTC_3e84d.dir/testCCompiler.c.o -o cmTC_3e84d && :
/opt/riscv/lib/gcc/riscv64-unknown-linux-gnu/13.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cannot find crt0.o: no that file or directory
clang: error: ld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:19 (project)
crt0.o only generated for riscv64-unknown-elf type, I build for riscv64-unknown-linux-gnu, how does this happen?
The text was updated successfully, but these errors were encountered:
The CMake C/C++ compiler is set to clang, but gcc flags are being passed. The "The C compiler is not able to compile a simple test program." is a generic setup error message from the build system, before getting to anything IREE-specific
That CMake command will build the IREE runtime and compiler. You might be able to build the compiler for RISCV, but we generally recommend running the compiler on a host machine (desktop Linux/macOS/Windows x86 or aarch64) and deploying the runtime on a target machine (desktop, mobile, embedded, etc. with any architecture)
What happened?
Step 1:
I compiled the RISCV-GNU-TOOLCHAIN for riscv64-unknown-linux-gnu-gcc:
Step 2:
Build the LLVM for RISCV target using command:
and compiled clang shows:
test test.c file using above compiled compiler with no problem:
Step 3:
Trying to compile the IREE using above compiler for RISCV host tools:
generate error:
crt0.o only generated for riscv64-unknown-elf type, I build for riscv64-unknown-linux-gnu, how does this happen?
The text was updated successfully, but these errors were encountered: