Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Fail to build with cython & pip install . #169

Open
artemisart opened this issue Nov 9, 2019 · 1 comment
Open

Fail to build with cython & pip install . #169

artemisart opened this issue Nov 9, 2019 · 1 comment

Comments

@artemisart
Copy link

Hello, I tried the solutions from the other issues but I still cannot get it to build:

$ gcc --version
gcc (Solus) 9.2.0

$ cython --version
Cython version 0.29.13

$ cython _line_profiler.pyx
/home/me/anaconda3/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/me/Documents/line_profiler/_line_profiler.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

$ pip install . --user
Processing /home/me/Documents/line_profiler
Requirement already satisfied: IPython>=0.13 in /home/me/anaconda3/lib/python3.7/site-packages (from line-profiler==2.1.1) (7.8.0)
Requirement already satisfied: traitlets>=4.2 in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (4.3.2)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (2.0.9)
Requirement already satisfied: pexpect; sys_platform != "win32" in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (4.7.0)
Requirement already satisfied: pickleshare in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (0.7.5)
Requirement already satisfied: setuptools>=18.5 in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (41.0.1)
Requirement already satisfied: backcall in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (0.1.0)
Requirement already satisfied: jedi>=0.10 in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (0.14.1)
Requirement already satisfied: pygments in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (2.4.2)
Requirement already satisfied: decorator in /home/me/anaconda3/lib/python3.7/site-packages (from IPython>=0.13->line-profiler==2.1.1) (4.4.0)
Requirement already satisfied: ipython-genutils in /home/me/anaconda3/lib/python3.7/site-packages (from traitlets>=4.2->IPython>=0.13->line-profiler==2.1.1) (0.2.0)
Requirement already satisfied: six in /home/me/anaconda3/lib/python3.7/site-packages (from traitlets>=4.2->IPython>=0.13->line-profiler==2.1.1) (1.12.0)
Requirement already satisfied: wcwidth in /home/me/anaconda3/lib/python3.7/site-packages (from prompt-toolkit<2.1.0,>=2.0.0->IPython>=0.13->line-profiler==2.1.1) (0.1.7)
Requirement already satisfied: ptyprocess>=0.5 in /home/me/anaconda3/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->IPython>=0.13->line-profiler==2.1.1) (0.6.0)
Requirement already satisfied: parso>=0.5.0 in /home/me/anaconda3/lib/python3.7/site-packages (from jedi>=0.10->IPython>=0.13->line-profiler==2.1.1) (0.5.1)
Building wheels for collected packages: line-profiler
  Building wheel for line-profiler (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/me/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f3qw9z7v/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-f3qw9z7v/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-qon2rqj_ --python-tag cp37
       cwd: /tmp/pip-req-build-f3qw9z7v/
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  copying line_profiler.py -> build/lib.linux-x86_64-3.7
  copying kernprof.py -> build/lib.linux-x86_64-3.7
  copying line_profiler_py35.py -> build/lib.linux-x86_64-3.7
  running build_ext
  skipping '_line_profiler.c' Cython extension (up-to-date)
  building '_line_profiler' extension
  creating build/temp.linux-x86_64-3.7
  gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c _line_profiler.c -o build/temp.linux-x86_64-3.7/_line_profiler.o
  gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c timers.c -o build/temp.linux-x86_64-3.7/timers.o
  gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c unset_trace.c -o build/temp.linux-x86_64-3.7/unset_trace.o
  gcc -pthread -shared -B /home/me/anaconda3/compiler_compat -L/home/me/anaconda3/lib -Wl,-rpath=/home/me/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/_line_profiler.o build/temp.linux-x86_64-3.7/timers.o build/temp.linux-x86_64-3.7/unset_trace.o -o build/lib.linux-x86_64-3.7/_line_profiler.cpython-37m-x86_64-linux-gnu.so
  /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
  /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
  /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
  /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
  /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: file not recognized: file format not recognized
  collect2: erreur: ld a retourné le statut de sortie 1
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for line-profiler
  Running setup.py clean for line-profiler
Failed to build line-profiler
Installing collected packages: line-profiler
  Running setup.py install for line-profiler ... error
    ERROR: Command errored out with exit status 1:
     command: /home/me/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f3qw9z7v/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-f3qw9z7v/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-rbqif95b/install-record.txt --single-version-externally-managed --compile --user --prefix=
         cwd: /tmp/pip-req-build-f3qw9z7v/
    Complete output (23 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    copying line_profiler.py -> build/lib.linux-x86_64-3.7
    copying kernprof.py -> build/lib.linux-x86_64-3.7
    copying line_profiler_py35.py -> build/lib.linux-x86_64-3.7
    running build_ext
    skipping '_line_profiler.c' Cython extension (up-to-date)
    building '_line_profiler' extension
    creating build/temp.linux-x86_64-3.7
    gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c _line_profiler.c -o build/temp.linux-x86_64-3.7/_line_profiler.o
    gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c timers.c -o build/temp.linux-x86_64-3.7/timers.o
    gcc -pthread -B /home/me/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/me/anaconda3/include/python3.7m -c unset_trace.c -o build/temp.linux-x86_64-3.7/unset_trace.o
    gcc -pthread -shared -B /home/me/anaconda3/compiler_compat -L/home/me/anaconda3/lib -Wl,-rpath=/home/me/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/_line_profiler.o build/temp.linux-x86_64-3.7/timers.o build/temp.linux-x86_64-3.7/unset_trace.o -o build/lib.linux-x86_64-3.7/_line_profiler.cpython-37m-x86_64-linux-gnu.so
    /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
    /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
    /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
    /home/me/anaconda3/compiler_compat/ld: /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: unable to initialize decompress status for section .debug_aranges
    /usr/lib64/gcc/x86_64-solus-linux/9/../../../../lib64/crti.o: file not recognized: file format not recognized
    collect2: erreur: ld a retourné le statut de sortie 1
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/me/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-f3qw9z7v/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-f3qw9z7v/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-rbqif95b/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

Any idea? Thanks

@syockit
Copy link

syockit commented Feb 21, 2020

This seems to be anaconda-related. Can you try the solution here? AtomDB/pyatomdb#18 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants