Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC compilation error #250

Closed
tgy opened this Issue Feb 11, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@tgy
Copy link

tgy commented Feb 11, 2019

Description

Trying to install Surprise with pip install surprise from a Python 3.6.8 :: Anaconda, Inc. environment.

Collecting surprise
  Using cached https://files.pythonhosted.org/packages/61/de/e5cba8682201fcf9c3719a6fdda95693468ed061945493dea2dd37c5618b/surprise-0.1-py2.py3-none-any.whl
Collecting scikit-surprise (from surprise)
  Using cached https://files.pythonhosted.org/packages/4d/fc/cd4210b247d1dca421c25994740cbbf03c5e980e31881f10eaddf45fdab0/scikit-surprise-1.0.6.tar.gz
Requirement already satisfied: joblib>=0.11 in /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages (from scikit-surprise->surprise) (0.13.1)
Requirement already satisfied: numpy>=1.11.2 in /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages (from scikit-surprise->surprise) (1.16.1)
Requirement already satisfied: scipy>=1.0.0 in /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages (from scikit-surprise->surprise) (1.2.1)
Requirement already satisfied: six>=1.10.0 in /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages (from scikit-surprise->surprise) (1.12.0)
Building wheels for collected packages: scikit-surprise
  Building wheel for scikit-surprise (setup.py): started
  Building wheel for scikit-surprise (setup.py): finished with status 'error'
  Complete output from command /home/toogy/miniconda3/envs/neurolang/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-psyfis7e/scikit-surprise/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-yyl3nnzk --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/surprise
  copying surprise/reader.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/utils.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/builtin_datasets.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/accuracy.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/__init__.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/evaluate.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/dump.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/trainset.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/dataset.py -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/__main__.py -> build/lib.linux-x86_64-3.6/surprise
  creating build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/random_pred.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/knns.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/__init__.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/algo_base.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/baseline_only.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/predictions.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  creating build/lib.linux-x86_64-3.6/surprise/model_selection
  copying surprise/model_selection/search.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
  copying surprise/model_selection/__init__.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
  copying surprise/model_selection/validation.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
  copying surprise/model_selection/split.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
  running egg_info
  writing scikit_surprise.egg-info/PKG-INFO
  writing dependency_links to scikit_surprise.egg-info/dependency_links.txt
  writing entry points to scikit_surprise.egg-info/entry_points.txt
  writing requirements to scikit_surprise.egg-info/requires.txt
  writing top-level names to scikit_surprise.egg-info/top_level.txt
  reading manifest file 'scikit_surprise.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'scikit_surprise.egg-info/SOURCES.txt'
  copying surprise/similarities.c -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/similarities.pyx -> build/lib.linux-x86_64-3.6/surprise
  copying surprise/prediction_algorithms/co_clustering.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/co_clustering.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/matrix_factorization.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/matrix_factorization.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/optimize_baselines.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/optimize_baselines.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/slope_one.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  copying surprise/prediction_algorithms/slope_one.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
  running build_ext
  building 'surprise.similarities' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/surprise
  gcc -pthread -B /home/toogy/miniconda3/envs/neurolang/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include -I/home/toogy/miniconda3/envs/neurolang/include/python3.6m -c surprise/similarities.c -o build/temp.linux-x86_64-3.6/surprise/similarities.o
  In file included from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                   from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from surprise/similarities.c:585:
  /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  gcc -pthread -shared -B /home/toogy/miniconda3/envs/neurolang/compiler_compat -L/home/toogy/miniconda3/envs/neurolang/lib -Wl,-rpath=/home/toogy/miniconda3/envs/neurolang/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/surprise/similarities.o -o build/lib.linux-x86_64-3.6/surprise/similarities.cpython-36m-x86_64-linux-gnu.so
  /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
  /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
  /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
  /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
  build/temp.linux-x86_64-3.6/surprise/similarities.o: file not recognized: file format not recognized
  collect2: error: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Running setup.py clean for scikit-surprise
Failed to build scikit-surprise
Installing collected packages: scikit-surprise, surprise
  Running setup.py install for scikit-surprise: started
    Running setup.py install for scikit-surprise: finished with status 'error'
    Complete output from command /home/toogy/miniconda3/envs/neurolang/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-psyfis7e/scikit-surprise/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-record-9t4b6wa6/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/surprise
    copying surprise/reader.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/utils.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/builtin_datasets.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/accuracy.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/__init__.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/evaluate.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/dump.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/trainset.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/dataset.py -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/__main__.py -> build/lib.linux-x86_64-3.6/surprise
    creating build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/random_pred.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/knns.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/__init__.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/algo_base.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/baseline_only.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/predictions.py -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    creating build/lib.linux-x86_64-3.6/surprise/model_selection
    copying surprise/model_selection/search.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
    copying surprise/model_selection/__init__.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
    copying surprise/model_selection/validation.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
    copying surprise/model_selection/split.py -> build/lib.linux-x86_64-3.6/surprise/model_selection
    running egg_info
    writing scikit_surprise.egg-info/PKG-INFO
    writing dependency_links to scikit_surprise.egg-info/dependency_links.txt
    writing entry points to scikit_surprise.egg-info/entry_points.txt
    writing requirements to scikit_surprise.egg-info/requires.txt
    writing top-level names to scikit_surprise.egg-info/top_level.txt
    reading manifest file 'scikit_surprise.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'scikit_surprise.egg-info/SOURCES.txt'
    copying surprise/similarities.c -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/similarities.pyx -> build/lib.linux-x86_64-3.6/surprise
    copying surprise/prediction_algorithms/co_clustering.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/co_clustering.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/matrix_factorization.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/matrix_factorization.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/optimize_baselines.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/optimize_baselines.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/slope_one.c -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    copying surprise/prediction_algorithms/slope_one.pyx -> build/lib.linux-x86_64-3.6/surprise/prediction_algorithms
    running build_ext
    building 'surprise.similarities' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/surprise
    gcc -pthread -B /home/toogy/miniconda3/envs/neurolang/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include -I/home/toogy/miniconda3/envs/neurolang/include/python3.6m -c surprise/similarities.c -o build/temp.linux-x86_64-3.6/surprise/similarities.o
    In file included from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                     from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from surprise/similarities.c:585:
    /home/toogy/miniconda3/envs/neurolang/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    gcc -pthread -shared -B /home/toogy/miniconda3/envs/neurolang/compiler_compat -L/home/toogy/miniconda3/envs/neurolang/lib -Wl,-rpath=/home/toogy/miniconda3/envs/neurolang/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/surprise/similarities.o -o build/lib.linux-x86_64-3.6/surprise/similarities.cpython-36m-x86_64-linux-gnu.so
    /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
    /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
    /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
    /home/toogy/miniconda3/envs/neurolang/compiler_compat/ld: build/temp.linux-x86_64-3.6/surprise/similarities.o: unable to initialize decompress status for section .debug_info
    build/temp.linux-x86_64-3.6/surprise/similarities.o: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

Steps/Code to Reproduce

  1. Install miniconda3 with the installation script
  2. Create a python=3.6 environment with conda create -n myenv python=3.6
  3. Install Surprise with pip install surprise

Versions

import platform; print(platform.platform())
# Linux-4.20.7-arch1-1-ARCH-x86_64-with-arch
import sys; print("Python", sys.version)
# Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
import surprise; print("surprise", surprise.__version__)
# Obviously could not import
@tgy

This comment has been minimized.

Copy link
Author

tgy commented Feb 11, 2019

This was an Arch Linux issue (see here for more info).

@tgy tgy closed this Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.