Skip to content

Instantly share code, notes, and snippets.

@lagru
Last active January 4, 2019 12:22
Show Gist options
  • Save lagru/c6ac16b9984492850fe1174d6418b7b5 to your computer and use it in GitHub Desktop.
Save lagru/c6ac16b9984492850fe1174d6418b7b5 to your computer and use it in GitHub Desktop.
Debugging NumPy development build in conda env
$ conda list
# packages in environment at /home/lg/.miniconda3/envs/dev-numpy:
#
# Name Version Build Channel
alabaster 0.7.12 py37_0
asn1crypto 0.24.0 py37_0
asv 0.3.1 py37hfc679d8_0 conda-forge
atomicwrites 1.2.1 py37_0
attrs 18.2.0 py37h28b3542_0
babel 2.6.0 py37_0
backcall 0.1.0 py37_0
blas 1.0 mkl
ca-certificates 2018.03.07 0
certifi 2018.11.29 py37_0
cffi 1.11.5 py37he75722e_1
chardet 3.0.4 py37_1
coverage 4.5.2 py37h7b6447c_0
cryptography 2.4.2 py37h1ba5d50_0
cython 0.29.2 py37he6710b0_0
decorator 4.3.0 py37_0
docutils 0.14 py37_0
idna 2.8 py37_0
imagesize 1.1.0 py37_0
intel-openmp 2019.1 144
ipython 7.2.0 py37h39e3cac_0
ipython_genutils 0.2.0 py37_0
jedi 0.13.2 py37_0
jinja2 2.10 py37_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libgfortran-ng 7.3.0 hdf63c60_0
libstdcxx-ng 8.2.0 hdf63c60_1
line_profiler 2.1.2 py37h14c3975_0
markupsafe 1.1.0 py37h7b6447c_0
mkl 2019.1 144
mkl_fft 1.0.6 py37hd81dba3_0
mkl_random 1.0.2 py37hd81dba3_0
more-itertools 4.3.0 py37_0
ncurses 6.1 he6710b0_1
numpydoc 0.8.0 py37_0
openssl 1.1.1a h7b6447c_0
packaging 18.0 py37_0
parso 0.3.1 py37_0
pexpect 4.6.0 py37_0
pickleshare 0.7.5 py37_0
pip 18.1 py37_0
pluggy 0.8.0 py37_0
prompt_toolkit 2.0.7 py37_0
ptyprocess 0.6.0 py37_0
py 1.7.0 py37_0
pycparser 2.19 py37_0
pygments 2.3.1 py37_0
pyopenssl 18.0.0 py37_0
pyparsing 2.3.0 py37_0
pysocks 1.6.8 py37_0
pytest 4.0.2 py37_0
python 3.7.2 h0371630_0
pytz 2018.7 py37_0
readline 7.0 h7b6447c_5
requests 2.21.0 py37_0
setuptools 40.6.3 py37_0
six 1.12.0 py37_0
snowballstemmer 1.2.1 py37_0
sphinx 1.8.2 py37_0
sphinxcontrib 1.0 py37_1
sphinxcontrib-websupport 1.1.0 py37_1
sqlite 3.26.0 h7b6447c_0
tk 8.6.8 hbc83047_0
traitlets 4.3.2 py37_0
urllib3 1.24.1 py37_0
wcwidth 0.1.7 py37_0
wheel 0.32.3 py37_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3
$ python setup.py build_ext --inplace
Running from numpy source directory.
Cythonizing sources
Processing numpy/random/mtrand/randint_helpers.pxi.in
Processing numpy/random/mtrand/mtrand.pyx
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/lg/.miniconda3/envs/dev-numpy/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/lg/.miniconda3/envs/dev-numpy/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/lg/.miniconda3/envs/dev-numpy/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/lg/.miniconda3/envs/dev-numpy/include']
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/lg/.miniconda3/envs/dev-numpy/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/lg/.miniconda3/envs/dev-numpy/include']
FOUND:
libraries = ['mkl_rt', 'pthread']
library_dirs = ['/home/lg/.miniconda3/envs/dev-numpy/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/usr/local/include', '/usr/include', '/home/lg/.miniconda3/envs/dev-numpy/include']
/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running build_ext
running build_src
build_src
building py_modules sources
building library "npymath" sources
creating build
creating build/src.linux-x86_64-3.7
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: gcc -pthread -B /home/lg/.miniconda3/envs/dev-numpy/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/home/lg/.miniconda3/envs/dev-numpy/include/python3.7m -c'
gcc: _configtest.c
gcc -pthread -B /home/lg/.miniconda3/envs/dev-numpy/compiler_compat -Wl,--sysroot=/ _configtest.o -o _configtest
/home/lg/.miniconda3/envs/dev-numpy/compiler_compat/ld: _configtest.o: unable to initialize decompress status for section .debug_info
/home/lg/.miniconda3/envs/dev-numpy/compiler_compat/ld: _configtest.o: unable to initialize decompress status for section .debug_info
/home/lg/.miniconda3/envs/dev-numpy/compiler_compat/ld: _configtest.o: unable to initialize decompress status for section .debug_info
/home/lg/.miniconda3/envs/dev-numpy/compiler_compat/ld: _configtest.o: unable to initialize decompress status for section .debug_info
_configtest.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o _configtest.o.d
Traceback (most recent call last):
File "setup.py", line 409, in <module>
setup_package()
File "setup.py", line 401, in setup_package
setup(**metadata)
File "/home/lg/Projects/numpy/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/lg/Projects/numpy/numpy/distutils/command/build_ext.py", line 79, in run
self.run_command('build_src')
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/lg/.miniconda3/envs/dev-numpy/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/lg/Projects/numpy/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/home/lg/Projects/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "/home/lg/Projects/numpy/numpy/distutils/command/build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/home/lg/Projects/numpy/numpy/distutils/command/build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 667, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment