CartoDB / crankshaft

CARTO Spatial Analysis extension for PostgreSQL
BSD 3-Clause "New" or "Revised" License
54 stars 20 forks source link

Make fails on Sierra OS #180

Closed inigomedina closed 7 years ago

inigomedina commented 7 years ago

In order to get a full CARTO installation as a development instance, I wanted to get crankshat working on my laptop. It runs a Sierra OS (10.12.6).

I've cloned the repo, moved to the directory and runned make. And it fails.

Trace. make.log

rafatower commented 7 years ago

This is a problem while grabbging and building dependencies:

/Library/Developer/CommandLineTools/usr/bin/make -C src/py install
pip install --upgrade ./crankshaft
Processing ./crankshaft
Requirement already up-to-date: joblib==0.8.3 in /Library/Python/2.7/site-packages (from crankshaft==0.0.0)
Requirement already up-to-date: numpy==1.6.1 in /Library/Python/2.7/site-packages (from crankshaft==0.0.0)
Requirement already up-to-date: scipy==0.14.0 in /Library/Python/2.7/site-packages (from crankshaft==0.0.0)
Requirement already up-to-date: pysal==1.11.2 in /Library/Python/2.7/site-packages (from crankshaft==0.0.0)
Collecting scikit-learn==0.14.1 (from crankshaft==0.0.0)
  Downloading scikit-learn-0.14.1.tar.gz (6.8MB)
Installing collected packages: scikit-learn, crankshaft
  Running setup.py install for scikit-learn: started
    Running setup.py install for scikit-learn: finished with status 'error'
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-o8X23p/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-OFG7d1-record/install-record.txt --single-version-externally-managed --compile:
    Partial import of sklearn during the build process.
    blas_opt_info:
...

As you can see above some dependencies are already met, whereas others have to be compiled from source.In particular scikit-learn.

This is the compiler error:

    compile options: '-DNO_ATLAS_INFO=3 -Isklearn/svm/src -I/Library/Python/2.7/site-packages/numpy/core/include -I/Library/Python/2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
    extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers'
    cc: sklearn/svm/liblinear.c
    clang: error: invalid argument '-faltivec' only allowed with 'ppc/ppc64/ppc64le'
    clang: error: invalid argument '-faltivec' only allowed with 'ppc/ppc64/ppc64le'
    clang: error: invalid argument '-faltivec' only allowed with 'ppc/ppc64/ppc64le'
    clang: error: invalid argument '-faltivec' only allowed with 'ppc/ppc64/ppc64le'
    error: Command "cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DNO_ATLAS_INFO=3 -Isklearn/svm/src -I/Library/Python/2.7/site-packages/numpy/core/include -I/Library/Python/2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c sklearn/svm/liblinear.c -o build/temp.macosx-10.12-intel-2.7/sklearn/svm/liblinear.o -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1

which basically tells you that it is using a wrong compiler option for your compiler (clang in this case).

Why it is doing so is beyond my knowledge on the package. Probably something to be reported upstream.

Possible solutions: try to build it with another compiler or try to satisfy the dependency in some other way.

Mind that we have limited resources and we cannot support every possible platform. Our code runs on ubuntu so another possibility is to install it in one ubuntu VM of the flavors we do support in production (precise or xenial).

HTH.