Open Haiz14 opened 2 years ago
Try to check out the commit of LLVM 11 in this repo and cross-compile it on a x86_64 Linux rather than compile it on device. Seems that main repo will not provide multiple versions of LLVM. See #9605.
The same reason as why we won't package lfortran
with LLVM backend (#8884) or emojicode
(#9723).
A possible workaround (for our packaging policy) would be that a package should bundle a required version of LLVM, just like ldc
is doing.
Reference to upstream issue: https://github.com/numba/llvmlite/issues/772.
Built v-11 of llvm using cmake --build . -j1
, gonna try to make a wheel for llvm lite now after installation, if successful i will post the wheels so anyone can install llvmlite on termux without installing llvm-11
More info
Contrary to what might be expected,
the llvmlite packages built by the
Numba maintainers do not use any LLVM shared libraries that may be present on the system,
and/or in the Conda environment.
The parts of LLVM required by llvmlite are statically linked at build time.
As a result, installing llvmlite from a binary package from the Numba channel does not also require the end user to install LLVM.
(For more details on the reasoning behind this,
see: Why Static Linking to LLVM?).
Note however also that llvmlite packages compiled by other parties,
e.g. conda-forge may split this into and llvmlite and llvm package and link dynamically.
So, if u guys just package the wheel in termux-packages and install the wheels using python like here, https://github.com/termux/termux-packages/issues/10065#issuecomment-1106359781 in the build script
There wouldn't be any need to package llvm with llvm-lite.
To package this we need to build libllvm-static-11
internally because it is not available in our official repo and no binary distribution is available upstream either (IIRC). I meant this situation by "should bundle a required version of LLVM".
any updates? I was trying to pip install numba, but was getting an error about building llvmlite, is there a way of installing it? it was saying
RuntimeError: Building llvmlite requires LLVM 14, got '18.1.3'. Be sure to set LLVM_CONFIG to the right executable path.
Yeah, llvmlite needs llvm-14 but maintaining two versions of llvm (now 18.1.3) would be a huge task.
Fwiw, there is a LLVM 14 package in the TUR, it probably makes sense to move the request there. https://github.com/termux-user-repository/tur/tree/master/tur%2Flibllvm-14
Package description
llvmlite provides a Python binding to LLVM for use in Numba. Numba previously relied on llvmpy.
The problematic part of installing installing this package is that it requires llvm v 11.x.x and the current version of llvm on termux is 14.
Home page URL
https://llvmlite.readthedocs.io/en/latest/
Source code URL
https://github.com/numba/llvmlite
Packaging policy acknowledgement
Additional information
I tried building llvm 11.0.0 on termux using
cmake --build . -j1 -j2
but termux crashed at when the build reached around 60 %. Now, i am trying to build it usingcmake --build . -j1
but it's taking too much time.