Comments (8)
An update: killed all previous llvm installations, reinstalled from brew with --HEAD
, now libc++/libstdc++ seems to be resolve but there's this:
$ make -f Makefile.osx
MACOSX_DEPLOYMENT_TARGET=10.7 clang++ -std=c++11 -stdlib=libc++ -dynamiclib `/usr/local/opt/llvm/bin/llvm-config --cxxflags` assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.dylib `/usr/local/opt/llvm/bin/llvm-config --ldflags` `/usr/local/opt/llvm/bin/llvm-config --system-libs --libs all`
targets.cpp:7:10: fatal error: 'llvm/Target/TargetLibraryInfo.h' file not found
#include "llvm/Target/TargetLibraryInfo.h"
^
1 error generated.
make: *** [all] Error 1
Apparently, according to http://reviews.llvm.org/rL226078, TargetLibraryInfo.h
has been moved over to llvm/Analysis
(iiuc, that's for all LLVM versions past 3.6).
from llvmlite.
You definitely need LLVM 3.6.x, a later version won't do. As for the first error you've got, I can't comment on it, as I don't use OS X. This seems similar but I don't understand what the fix should look like: http://stackoverflow.com/questions/31152499/undefined-symbols-for-architecture-x86-64-stdterminate-when-building-kal
from llvmlite.
Same issue. And adding -stdlib=libc++
doesn't work.
from llvmlite.
Same error in Archlinux with llvm==3.7.0
from llvmlite.
@avances123: See above comments. Because of constant API changes in LLVM, we only support one minor release of LLVM at a time. Currently, that is 3.6.x. The linking issue on some platforms is still a mystery, though.
from llvmlite.
same problem on Centos 7.1.1503
installed LLVM 3.6.2 from source with cmake,
installed llvmlite with pip, also tried fresh version from git (0.9.0.dev+4.g133746e) with setup.py
import llvmlite works,
import llvmlite.binding produces :
/home/blackbird/opt/lib/python3.5/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error)
346 if handle is None:
--> 347 self._handle = _dlopen(self._name, mode)
348 else:
OSError: /home/blackbird/opt/lib/python3.5/site-packages/llvmlite/binding/libllvmlite.so: undefined symbol: _ZNKSt14error_category23default_error_conditionEi
from llvmlite.
To this point, I have no idea how to build it on OS X. Has anyone succeeded with the homebrew's llvm?
Also, MACOSX_DEPLOYMENT_TARGET=10.7
hardcoded in the OSX makefile doesn't seem to be right since it causes warnings like this (with llvm 3.6.2
from homebrew)
ld: warning: object file (/usr/local/Cellar/llvm/3.6.2/lib/libLLVMSupport.a(regstrlcpy.c.o))
was built for newer OSX version (10.11) than being linked (10.7)
TL;DR:
not buildable with -stdlib=libc++
due to
Undefined symbols for architecture x86_64:
"std::terminate()", referenced from:
___clang_call_terminate in assembly-8801e6.o
___clang_call_terminate in module-17dbf6.o
___clang_call_terminate in executionengine-cf11f9.o
___clang_call_terminate in targets-ab69e9.o
___clang_call_terminate in dylib-c450e0.o
___clang_call_terminate in linker-ddf752.o
ld: symbol(s) not found for architecture x86_64
and not buildable with -stdlib=libstdc++
quite obviously because llvm won't build with it.
from llvmlite.
I had exactly same issue just now on arm machine running CentOS 7.6.1810, with numba 0.40.1, llvmlite 0.27.1 and llvm 7.0.1. My llvm was built using system gcc 4.8.5, however I installed gcc 7.4.0 and used that to build Python 3.7.2 and lots of packages for it. So, my first choice was to also build numba with gcc7. I got the
libllvmlite.so: undefined symbol: _ZNKSt14error_category23default_error_conditionEi
error. Then, I tried to build numba with llvm 7.0.1. Also the same error. Finally, I followed advice from issue #8 i.e.
I would recommend against using two different compilers -- one for LLVM, one for llvmlite.
And when I built numba with gcc4 (the same which I used to build llvm), the error is gone.
from llvmlite.
Related Issues (20)
- Another suspiciously prunable nrt refcount pattern HOT 1
- Use Alias Analysis for pruning NRT-related refct calls HOT 4
- Force static linking for libLLVM HOT 3
- llvmlite 0.42.0 Checklist
- Symbol not found when building on arm64 platform macOSX HOT 1
- Add flag to IRBuilder.if_else to control whether an "endif" block should be created
- Add `numba` and `llvmlite` `musl` wheels for `alpine` support HOT 8
- RuntimeError: No available targets are compatible with triple "arm-unknown-linux-gnu" HOT 4
- Add "align" option for `IRBuilder.alloca` HOT 1
- llvmlite 0.43.0rc1 Checklist HOT 4
- Upload wheels and sdist to PyPI. (upload from `ci_artifacts`). HOT 1
- A concrete case for potential ref-pruning chances
- LLVM update plan? HOT 3
- llvmlite.binding.TargetMachine.emit_object() emits unknown object format on Windows HOT 2
- Enable `interleave` for Loop Optimization HOT 4
- Expose module simplification pipeline and extension points with new pass manager
- llvmlite 0.43.0 Checklist HOT 1
- How to solve: Issue with `llvmlite` installation in Termux due to LLVM version mismatch HOT 6
- llvmlite do not work with llvm 18.1.7 on MacOS Sonoma (Apple M1) HOT 6
- macOS CI needs updating: macOS builds browning out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvmlite.