hainm/notes

pythran install

Opened this issue · 3 comments

hainm commented
$ conda --version
conda 3.18.4
  • make fresh env conda create -n pythran python=2.7 numpy
  • activate new env source activate pythran
  • try pythran new's branch git checkout feature/less-dependencies
  • install some packages conda install decorator ply networkx
  • install colorlog pip install colorlog (seems that conda does not have colorlog)
  • go back to pythran folder and python setup.py install
  • update more packages for compiling.
    • gcc_499 conda install -c serge-sans-paille gcc_49 gmp gmpxx
hainm commented

try application one one of my old machine:

pythran/pythran/tests/cases (feature/less-dependencies) $ pythran fft.py

got
AttributeError: /usr/lib64/libgomp.so.1: undefined symbol: omp_in_final

seem related to serge-sans-paille/pythran#350

hainm commented

try example in newer machine

got

pythran/pythran/tests/cases (feature/less-dependencies) $ pythran fft.py
/mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/range.py:115: RuntimeWarning: invalid value encountered in double_scalars
  res = [v1 * v2 for v1, v2 in itertools.product(range1, range2)]
In file included from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/str.hpp:5:0,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/exceptions.hpp:4,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/__builtin__/ValueError.hpp:4,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/numpy/transpose.hpp:9,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/ndarray.hpp:466,
                 from /tmp/tmp4ZWz2K.cpp:10:
/mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/long.hpp:8:19: fatal error: gmpxx.h: No such file or directory
 #include <gmpxx.h>
                   ^
compilation terminated.
In file included from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/str.hpp:5:0,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/exceptions.hpp:4,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/__builtin__/ValueError.hpp:4,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/numpy/transpose.hpp:9,
                 from /mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/ndarray.hpp:466,
                 from /tmp/tmp4ZWz2K.cpp:10:
/mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran/pythonic/include/types/long.hpp:8:19: fatal error: gmpxx.h: No such file or directory
 #include <gmpxx.h>
                   ^
compilation terminated.
CRITICAL Cover me Jack. Jack? Jaaaaack!!!!
E: ('error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DUSE_GMP -DENABLE_PYTHON_MODULE -I/mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/pythran-0.7.3-py2.7.egg/pythran -I/mnt/raidc2/haichit/anaconda3/envs/pythran/lib/python2.7/site-packages/numpy/core/include -I/mnt/raidc2/haichit/anaconda3/envs/pythran/include/python2.7 -c /tmp/tmp4ZWz2K.cpp -o /tmp/tmpRpOxpE/tmp/tmp4ZWz2K.o -std=c++11 -fno-math-errno -w" failed with exit status 1',)
  • try another example
$ pythran matmul.py
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: cannot find -lgmpxx
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: cannot find -lgmpxx
collect2: error: ld returned 1 exit status
CRITICAL Cover me Jack. Jack? Jaaaaack!!!!
E: ('error: Command "g++ -pthread -shared -L/mnt/raidc2/haichit/anaconda3/envs/pythran/lib -Wl,-rpath=/mnt/raidc2/haichit/anaconda3/envs/pythran/lib,--no-as-needed /tmp/tmpIlSbXS/tmp/tmp3tiACd.o -L/mnt/raidc2/haichit/anaconda3/envs/pythran/lib -lgmp -lgmpxx -lpython2.7 -o /tmp/tmpJquDMQ/matmul.so" failed with exit status 1',)
  • try update gcc_49
    conda install -c https://conda.binstar.org/serge-sans-paille gcc_49
  • try again
 $ pythran matmul.py
/usr/bin/ld: cannot find -lgmpxx
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lgmpxx
collect2: error: ld returned 1 exit status
CRITICAL Cover me Jack. Jack? Jaaaaack!!!!
E: ('error: Command "g++ -pthread -shared -L/mnt/raidc2/haichit/anaconda3/envs/pythran/lib -Wl,-rpath=/mnt/raidc2/haichit/anaconda3/envs/pythran/lib,--no-as-needed /tmp/tmpXaFYpl/tmp/tmpjxSGqc.o -L/mnt/raidc2/haichit/anaconda3/envs/pythran/lib -lgmp -lgmpxx -lpython2.7 -o /tmp/tmpj9XJtc/matmul.so" failed with exit status 1',)
  • try to install gmcxx
    $ conda install -c serge-sans-paille gmpxx
  • try again pythran matmul.py and
$ ls matmul.so
matmul.so

ok, seems like I could detect if gmp is available or not, as it's only used for big number support...