Closed TymekBrunka closed 3 days ago
As long as you're able to compile LLVM and LLD for it so you have those libraries, it should be straightforward to compile c3c.
~/c3c/build $ cmake -DLLVM_DIR=/usr/local/opt/llvm/lib/cmake/llvm/ ..
-- The C compiler identification is Clang 18.1.8
-- The CXX compiler identification is Clang 18.1.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
C3C version: 0.6.2
-- Found CURL: /data/data/com.termux/files/usr/lib/libcurl.so (found version "8.9.1")
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /data/data/com.termux/files/usr/lib/libffi.so
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /data/data/com.termux/files/usr/lib/libtinfo.so
-- Found ZLIB: /data/data/com.termux/files/usr/lib/libz.so (found version "1.3.1")
-- Found zstd: /data/data/com.termux/files/usr/lib/libzstd.so
-- Found LibXml2: /data/data/com.termux/files/usr/lib/libxml2.so (found version "2.13.3")
CMake Error at /data/data/com.termux/files/usr/lib/cmake/llvm/LLVMExports.cmake:1834 (message):
The imported target "LLVMDemangle" references the file
"/data/data/com.termux/files/usr/lib/libLLVMDemangle.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/data/data/com.termux/files/usr/lib/cmake/llvm/LLVMExports.cmake"
but not all the files it references.
Call Stack (most recent call first):
/data/data/com.termux/files/usr/lib/cmake/llvm/LLVMConfig.cmake:364 (include)
CMakeLists.txt:133 (find_package)
-- Configuring incomplete, errors occurred!
Maybe you only have dynamically linked libraries available? If so the use -DC3_LINK_DYNAMIC=true
with CMake.
Were you able to solve this?
Should I close this?
...
there is no /usr/local on termux and the flag doesnt work both with and without -DLLVM_DIR
Did you try the -DC3_LINK_DYNAMIC=true
flag?
yes, that's the flag i was talking about
So you get the CMake error?
yes (just found out that there are libllvm and libllvm-static separetely and installed libllvm-static) and btw what is (/usr)/bin/FileCheck that it failed to find?
This is what it failed to get libLLVMDemangle
do i have to install it or what?
It is (unfortunately) not unusual that the LLVM libs are broken. So I would look for maybe earlier or later LLVM packages and see if they work. The error you see is in LLVM's own CMake script(!) which is run before any C3 compilation.
Ok, so basicly termux llvm doesnt support even setting up build directory, ok, thank you for info.
We'll try to set up LLVM builds for various linux variants later, that way we'll have everyone covered regardless of LLVM support through package managers.
Minor isssue, just wanted to try out c3 and also do c3 stuff on phone but there are no release binaries for arm.
Is is possible to compile c3c on and for aarch64?