Reputation: 310
I have done everything possible to install eo-learn but it is not working using Conda won't work closest I got to making it work was with pip but I get stuck while trying to install numba
steps taken
brew install llvm
export LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config
LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config pip install numba
LLVM_CONFIG=/opt/homebrew/opt/llvm/bin/llvm-config pip install llvmlite which is the major dependency breaking for now
brew link llvm
Warning: Refusing to link macOS provided/shadowed software: llvm
If you need to have llvm first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
I have added the flags
brew link -force llvm
Warning: Refusing to link macOS provided/shadowed software: llvm
If you need to have llvm first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
I have done everything I know someone please help me
can some tell me how I can get the installer to recognise it
Upvotes: 9
Views: 21901
Reputation: 5870
I was experiencing the pain of clangd
not handling M1 threads well:
https://github.com/clangd/clangd/issues/1119
That issue is fixed in llvm 15, which is released as an rc1, but Brew does not currently install that version. Installing via brew install --HEAD llvm
has never worked for me because the build fails and I'm not sure how to address this.
In case it's helpful to others, I was able to install llvm 15 pretty easily via the clang+llvm-15.0.0-rc1-arm64-apple-darwin21.0.tar.xz
release artifact found in the github release folder here:
https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.0-rc1
Note that you'll want to use the arm64
version if you have an M1 Mac, not the x86_64 version. The latter would be useful for people with older Intel Macs.
Here are the steps I used to install LLVM via their release artifacts on an M1 Mac:
PATH
variable to point to the resulting clang+llvm-15.0.0-rc1-arm64-apple-darwin21.0/bin
directory.clangd
works by running clangd --version
. You should see output verifyin 15.0.0
. For me, running clangd
initially failed due to the binary not being able to find a libzstd
shared object. brew install zstd
installed the dependency. You may need to install other dependencies.Once all dependencies are resolved and your PATH
is updated, you should see this (again, verify the version to make sure you are picking up the expected clangd
, not the system, Brew, or other version on your system):
$ clangd --version
clangd version 15.0.0
Features: mac+xpc
Platform: arm64-apple-darwin21.6.0
Now clang
, clangd
, etc. should be used via your PATH
. I needed this updated clangd
for my coc-nvim
plugin, for which I explicitly point to clangd
for nvim via my coc-settings.json
file:
$ cat ~/.config/nvim/coc-settings.json
{
"clangd.arguments": ["-j=4"],
"clangd.path": "/<some_path>/clang+llvm-15.0.0-rc1-arm64-apple-darwin21.0/bin/clangd"
}
Upvotes: 2
Reputation: 1
The clang+llvm-14.0.5-x86_64-apple-darwin.tar.xz build in github can work on M1
Upvotes: -1
Reputation: 10619
I was able to install llvmlite on my m1 with the following steps:
arch -arm64 brew install llvm@11
LLVM_CONFIG="/opt/homebrew/Cellar/llvm@11/11.1.0_4/bin/llvm-config" arch -arm64 pip install llvmlite
It's important to:
arm64
.**/11.1.0_4/
) you may have a newer version or even in completly different PATH.Upvotes: 17
Reputation: 31
Check out this link. https://embeddedartistry.com/blog/2017/02/24/installing-llvm-clang-on-osx/
Adding Homebrew llvm/clang to path worked for me.
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile
Upvotes: 3