c++ - Pythran“未定义对‘ATL_caxpby’的引用”错误
问题描述
我已经按照说明安装了 pythran :
sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev python-ply python-networkx python-numpy
pip install pythran
我有 pythran==0.9.7,gast==0.4.0,g++==5.5.0,ubuntu 16.04
尝试运行pythran dprod.py
(与他们的教程中的文件相同)会引发一个错误,其结尾如下:
/home/viktoriya/anaconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /usr/lib/libblas.so: undefined reference to `ATL_caxpby'
collect2: error: ld returned 1 exit status
WARNING: Compilation error, trying hard to find its origin...
WARNING: Nop, I'm going to flood you with C++ errors!
CRITICAL: Cover me Jack. Jack? Jaaaaack!!!!
E: error: Command "/home/viktoriya/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++ -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/viktoriya/anaconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/viktoriya/anaconda3/include -fPIC -DENABLE_PYTHON_MODULE -D__PYTHRAN__=3 -DPYTHRAN_BLAS_BLAS -I/home/viktoriya/anaconda3/lib/python3.8/site-packages/pythran -I/home/viktoriya/anaconda3/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/home/viktoriya/anaconda3/include -I/home/viktoriya/anaconda3/include/python3.8 -c /tmp/tmpvkyb90vr.cpp -o /tmp/tmpidzc_k4l/tmp/tmpvkyb90vr.o -std=c++11 -fno-math-errno -w -fvisibility=hidden -fno-wrapv" failed with exit status 1
UPD:我还安装了 libblas-dev。
我该如何解决?
解决方案
CFLAGS="-lblas" pythran dprod.py
工作。
推荐阅读
- java - 不兼容的类型:将整数流转换为字符串流时 lambda 表达式中的返回类型错误?
- c# - 如何在 c# wfp 中垂直移动图像
- .net-core - System.InvalidOperationException:不能在 OnConfiguring 内部使用 DbContext 实例,因为此时它仍在配置中
- reactjs - 当我点击extraIcon并且面板处于活动状态时如何获得面板键是Antd Collapse组件?
- java - 尝试运行 PGDSpider 时出现 java.lang.NoClassDefFoundError
- python - Alembic 不生成表格
- android - 当我在可绘制对象中有 850 个 png 文件时,如何减小 Play 控制台的应用程序大小?
- python - 为多维数据生成具有窗口大小和步幅的子序列
- c# - Xpath 点击 Eye Icon
- r - 将多个列表列表的长度放入R中的数据框中