exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
15.01k stars 517 forks source link

codon can not be build in arm53 xilinx -k26 #493

Closed mlopezpalma closed 8 months ago

mlopezpalma commented 11 months ago

the previous packets LLVM and Ninja are built but when try to build codon nex error appears . So any suggestion will be wellcome

xilinx-k26-kv:~/codon$ cmake -S . -B build -G Ninja \

-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DIR=$(llvm-config --cmakedir) \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++

-- The C compiler identification is Clang 15.0.1 -- The CXX compiler identification is Clang 15.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /home/petalinux/codon/llvm-project-codon/build/bin/clang -- Check for working C compiler: /home/petalinux/codon/llvm-project-codon/build/bin/clang - broken CMake Error at /usr/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler

"/home/petalinux/codon/llvm-project-codon/build/bin/clang"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/petalinux/codon/build/CMakeFiles/CMakeTmp

Run Build Command(s):/home/petalinux/codon/ninja-master/ninja cmTC_505f5 && [1/2] Building C object CMakeFiles/cmTC_505f5.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_505f5
FAILED: cmTC_505f5 
: && /home/petalinux/codon/llvm-project-codon/build/bin/clang   CMakeFiles/cmTC_505f5.dir/testCCompiler.c.o -o cmTC_505f5   && :
/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc
clang-15: error: linker 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:2 (project)

-- Configuring incomplete, errors occurred! See also "/home/petalinux/codon/build/CMakeFiles/CMakeOutput.log". See also "/home/petalinux/codon/build/CMakeFiles/CMakeError.log".

inumanag commented 8 months ago

You will need gcc to make this work.

Alternatively: run Codon as CODON_DEBUG=lt codon ...; the last line will give you the final gcc/clang command that Codon invokes and you might be able to tweak to get it running on your platform.