Search code examples
c++compiler-errorspythran

Pythran "undefined reference to `ATL_caxpby'" error


I've installed pythran as per instruction:

sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev python-ply python-networkx python-numpy
pip install pythran

I have pythran==0.9.7, gast==0.4.0, g++==5.5.0, ubuntu 16.04

Trying to run pythran dprod.py (same file as in their tutorial) throws an error which ends like this:

/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: I've also installed libblas-dev.

How do I fix this?


Solution

  • CFLAGS="-lblas" pythran dprod.py worked.