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

docker image fails to build with lima (docker alternative) on apple M2: scipy missing BLAS #192

Open
kidmose opened this issue Apr 21, 2023 · 2 comments · May be fixed by #193
Open

docker image fails to build with lima (docker alternative) on apple M2: scipy missing BLAS #192

kidmose opened this issue Apr 21, 2023 · 2 comments · May be fixed by #193

Comments

@kidmose
Copy link

kidmose commented Apr 21, 2023

I'm trying to build the docker image on a MBP with an M2 Pro processor, using lima and nerdctl as docker replacements. This means I'm using nerdctl instead of docker, inside a VM running an 64bit arm ubuntu 22.10 on my mac.

Installation of pandas=1.2.3 as pinned in requirements/requirements.txt fails when installing numpy==1.17.3 (dependency), apparently because a lot of libraries are missing (BLAS among others). I suspect this could be due to the version of numpy (Released Oct. 17 2019) doesn't play well with 64 bit arm.

The error log is as follows:

egk@egk:~/git-reps/tram$ lima nerdctl build .
[+] Building 8.2s (6/6) FINISHED                                                                                                         
 => [internal] load .dockerignore                                                                                                   0.0s
 => => transferring context: 117B                                                                                                   0.0s
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 400B                                                                                                0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                     0.8s
 => [1/3] FROM docker.io/library/ubuntu:20.04@sha256:db8bf6f4fb351aa7a26e27ba2686cf35a6a409f65603e59d4c203e58387dc6b3               0.0s
 => => resolve docker.io/library/ubuntu:20.04@sha256:db8bf6f4fb351aa7a26e27ba2686cf35a6a409f65603e59d4c203e58387dc6b3               0.0s
 => CACHED [2/3] RUN apt-get update &&     apt-get -y upgrade &&     apt-get -y install --no-install-recommends     ca-certificate  0.0s
 => ERROR [3/3] RUN python3 -m pip install pandas==1.2.3                                                                            7.4s
------                                                                                                                                   
 > [3/3] RUN python3 -m pip install pandas==1.2.3:                                                                                       
#0 0.791 Collecting pandas==1.2.3                                                                                                        
#0 0.925   Downloading pandas-1.2.3.tar.gz (5.5 MB)                                                                                      
#0 2.754   Installing build dependencies: started                                                                                        
#0 7.308   Installing build dependencies: finished with status 'error'                                                                   
#0 7.308   ERROR: Command errored out with exit status 1:
#0 7.308    command: /usr/bin/python3 /usr/lib/python3/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9i_hfnvd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"''
#0 7.308        cwd: None
#0 7.308   Complete output (581 lines):
#0 7.308   Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
#0 7.308   Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
#0 7.308   Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment
#0 7.308   Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
#0 7.308   Collecting setuptools
#0 7.308     Downloading setuptools-67.7.1-py3-none-any.whl (1.1 MB)
#0 7.308   Collecting wheel
#0 7.308     Downloading wheel-0.40.0-py3-none-any.whl (64 kB)
#0 7.308   Collecting Cython<3,>=0.29.21
#0 7.308     Downloading Cython-0.29.34-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (1.8 MB)
#0 7.308   Collecting numpy==1.17.3
#0 7.308     Downloading numpy-1.17.3.zip (6.4 MB)
#0 7.308   Building wheels for collected packages: numpy
#0 7.308     Building wheel for numpy (setup.py): started
#0 7.308     Building wheel for numpy (setup.py): finished with status 'error'
#0 7.308     ERROR: Command errored out with exit status 1:
#0 7.308      command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-46pmyfff/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-46pmyfff/numpy/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-ldbsuhua
#0 7.308          cwd: /tmp/pip-install-46pmyfff/numpy/
#0 7.308     Complete output (262 lines):
#0 7.308     Running from numpy source directory.
#0 7.308     blas_opt_info:
#0 7.308     blas_mkl_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     blis_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries blis not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     openblas_info:
#0 7.308     customize UnixCCompiler
#0 7.308     customize UnixCCompiler
#0 7.308       libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_3_10_blas_threads_info:
#0 7.308     Setting PTATLAS=ATLAS
#0 7.308     customize UnixCCompiler
#0 7.308       libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_3_10_blas_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries satlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_blas_threads_info:
#0 7.308     Setting PTATLAS=ATLAS
#0 7.308     customize UnixCCompiler
#0 7.308       libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_blas_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     accelerate_info:
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308         Optimized (vendor) Blas libraries are not found.
#0 7.308         Falls back to netlib Blas library which has worse performance.
#0 7.308         A better performance should be easily gained by switching
#0 7.308         Blas library.
#0 7.308       self.calc_info()
#0 7.308     blas_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries blas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308         Blas (http://www.netlib.org/blas/) libraries not found.
#0 7.308         Directories to search for the libraries can be specified in the
#0 7.308         numpy/distutils/site.cfg file (section [blas]) or by setting
#0 7.308         the BLAS environment variable.
#0 7.308       self.calc_info()
#0 7.308     blas_src_info:
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308         Blas (http://www.netlib.org/blas/) sources not found.
#0 7.308         Directories to search for the sources can be specified in the
#0 7.308         numpy/distutils/site.cfg file (section [blas_src]) or by setting
#0 7.308         the BLAS_SRC environment variable.
#0 7.308       self.calc_info()
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /bin/sh: 1: svnversion: not found
#0 7.308     non-existing path in 'numpy/distutils': 'site.cfg'
#0 7.308     lapack_opt_info:
#0 7.308     lapack_mkl_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     openblas_lapack_info:
#0 7.308     customize UnixCCompiler
#0 7.308     customize UnixCCompiler
#0 7.308       libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     openblas_clapack_info:
#0 7.308     customize UnixCCompiler
#0 7.308     customize UnixCCompiler
#0 7.308       libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     flame_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries flame not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_3_10_threads_info:
#0 7.308     Setting PTATLAS=ATLAS
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries tatlas,tatlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries tatlas,tatlas not found in /usr/lib
#0 7.308     <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_3_10_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries satlas,satlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries satlas,satlas not found in /usr/lib
#0 7.308     <class 'numpy.distutils.system_info.atlas_3_10_info'>
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_threads_info:
#0 7.308     Setting PTATLAS=ATLAS
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries ptf77blas,ptcblas,atlas not found in /usr/lib
#0 7.308     <class 'numpy.distutils.system_info.atlas_threads_info'>
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     atlas_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries f77blas,cblas,atlas not found in /usr/local/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack_atlas not found in /usr/lib
#0 7.308     customize UnixCCompiler
#0 7.308       libraries f77blas,cblas,atlas not found in /usr/lib
#0 7.308     <class 'numpy.distutils.system_info.atlas_info'>
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     lapack_info:
#0 7.308     customize UnixCCompiler
#0 7.308       libraries lapack not found in ['/usr/local/lib', '/usr/lib']
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:1712: UserWarning:
#0 7.308         Lapack (http://www.netlib.org/lapack/) libraries not found.
#0 7.308         Directories to search for the libraries can be specified in the
#0 7.308         numpy/distutils/site.cfg file (section [lapack]) or by setting
#0 7.308         the LAPACK environment variable.
#0 7.308       if getattr(self, '_calc_info_{}'.format(lapack))():
#0 7.308     lapack_src_info:
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:1712: UserWarning:
#0 7.308         Lapack (http://www.netlib.org/lapack/) sources not found.
#0 7.308         Directories to search for the sources can be specified in the
#0 7.308         numpy/distutils/site.cfg file (section [lapack_src]) or by setting
#0 7.308         the LAPACK_SRC environment variable.
#0 7.308       if getattr(self, '_calc_info_{}'.format(lapack))():
#0 7.308       NOT AVAILABLE
#0 7.308   
#0 7.308     /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
#0 7.308       warnings.warn(msg)
#0 7.308     running bdist_wheel
#0 7.308     running build
#0 7.308     running config_cc
#0 7.308     unifing config_cc, config, build_clib, build_ext, build commands --compiler options
#0 7.308     running config_fc
#0 7.308     unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
#0 7.308     running build_src
#0 7.308     build_src
#0 7.308     building py_modules sources
#0 7.308     creating build
#0 7.308     creating build/src.linux-aarch64-3.8
#0 7.308     creating build/src.linux-aarch64-3.8/numpy
#0 7.308     creating build/src.linux-aarch64-3.8/numpy/distutils
#0 7.308     building library "npymath" sources
#0 7.308     get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
#0 7.308     customize Gnu95FCompiler
#0 7.308     Could not locate executable gfortran
#0 7.308     Could not locate executable f95
#0 7.308     customize IntelFCompiler
#0 7.308     Could not locate executable ifort
#0 7.308     Could not locate executable ifc
#0 7.308     customize LaheyFCompiler
#0 7.308     Could not locate executable lf95
#0 7.308     customize PGroupFCompiler
#0 7.308     Could not locate executable pgfortran
#0 7.308     customize AbsoftFCompiler
#0 7.308     Could not locate executable f90
#0 7.308     Could not locate executable f77
#0 7.308     customize NAGFCompiler
#0 7.308     customize VastFCompiler
#0 7.308     customize CompaqFCompiler
#0 7.308     Could not locate executable fort
#0 7.308     customize IntelItaniumFCompiler
#0 7.308     Could not locate executable efort
#0 7.308     Could not locate executable efc
#0 7.308     customize IntelEM64TFCompiler
#0 7.308     customize GnuFCompiler
#0 7.308     Could not locate executable g77
#0 7.308     customize G95FCompiler
#0 7.308     Could not locate executable g95
#0 7.308     customize PathScaleFCompiler
#0 7.308     Could not locate executable pathf95
#0 7.308     customize NAGFORCompiler
#0 7.308     Could not locate executable nagfor
#0 7.308     don't know how to compile Fortran code on platform 'posix'
#0 7.308     C compiler: aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
#0 7.308   
#0 7.308     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/usr/include/python3.8 -c'
#0 7.308     aarch64-linux-gnu-gcc: _configtest.c
#0 7.308     failure.
#0 7.308     removing: _configtest.c _configtest.o
#0 7.308     Traceback (most recent call last):
#0 7.308       File "<string>", line 1, in <module>
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/setup.py", line 443, in <module>
#0 7.308         setup_package()
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/setup.py", line 435, in setup_package
#0 7.308         setup(**metadata)
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/core.py", line 171, in setup
#0 7.308         return old_setup(**new_attr)
#0 7.308       File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
#0 7.308         return distutils.core.setup(**attrs)
#0 7.308       File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
#0 7.308         dist.run_commands()
#0 7.308       File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
#0 7.308         self.run_command(cmd)
#0 7.308       File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308         cmd_obj.run()
#0 7.308       File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
#0 7.308         self.run_command('build')
#0 7.308       File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
#0 7.308         self.distribution.run_command(command)
#0 7.308       File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308         cmd_obj.run()
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build.py", line 47, in run
#0 7.308         old_build.run(self)
#0 7.308       File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
#0 7.308         self.run_command(cmd_name)
#0 7.308       File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
#0 7.308         self.distribution.run_command(command)
#0 7.308       File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308         cmd_obj.run()
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 142, in run
#0 7.308         self.build_sources()
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 153, in build_sources
#0 7.308         self.build_library_sources(*libname_info)
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 286, in build_library_sources
#0 7.308         sources = self.generate_sources(sources, (lib_name, build_info))
#0 7.308       File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 369, in generate_sources
#0 7.308         source = func(extension, build_dir)
#0 7.308       File "numpy/core/setup.py", line 669, in get_mathlib_info
#0 7.308         raise RuntimeError("Broken toolchain: cannot link a simple C program")
#0 7.308     RuntimeError: Broken toolchain: cannot link a simple C program
#0 7.308     ----------------------------------------
#0 7.308     ERROR: Failed building wheel for numpy
#0 7.308     Running setup.py clean for numpy
#0 7.308     ERROR: Command errored out with exit status 1:
#0 7.308      command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-46pmyfff/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-46pmyfff/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
#0 7.308          cwd: /tmp/pip-install-46pmyfff/numpy
#0 7.308     Complete output (10 lines):
#0 7.308     Running from numpy source directory.
#0 7.308   
#0 7.308     `setup.py clean` is not supported, use one of the following instead:
#0 7.308   
#0 7.308       - `git clean -xdf` (cleans all files)
#0 7.308       - `git clean -Xdf` (cleans all versioned files, doesn't touch
#0 7.308                           files that aren't checked into the git repo)
#0 7.308   
#0 7.308     Add `--force` to your command to use it anyway if you must (unsupported).
#0 7.308   
#0 7.308     ----------------------------------------
#0 7.308     ERROR: Failed cleaning build dir for numpy
#0 7.308   Failed to build numpy
#0 7.308   Installing collected packages: setuptools, wheel, Cython, numpy
#0 7.308       Running setup.py install for numpy: started
#0 7.308       Running setup.py install for numpy: finished with status 'error'
#0 7.308       ERROR: Command errored out with exit status 1:
#0 7.308        command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-46pmyfff/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-46pmyfff/numpy/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-he1dm7ma/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-9i_hfnvd/overlay --compile --install-headers /tmp/pip-build-env-9i_hfnvd/overlay/include/python3.8/numpy
#0 7.308            cwd: /tmp/pip-install-46pmyfff/numpy/
#0 7.308       Complete output (271 lines):
#0 7.308       Running from numpy source directory.
#0 7.308   
#0 7.308       Note: if you need reliable uninstall behavior, then install
#0 7.308       with pip instead of using `setup.py install`:
#0 7.308   
#0 7.308         - `pip install .`       (from a git repo or downloaded source
#0 7.308                                  release)
#0 7.308         - `pip install numpy`   (last NumPy release on PyPi)
#0 7.308   
#0 7.308   
#0 7.308       blas_opt_info:
#0 7.308       blas_mkl_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       blis_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries blis not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       openblas_info:
#0 7.308       customize UnixCCompiler
#0 7.308       customize UnixCCompiler
#0 7.308         libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_3_10_blas_threads_info:
#0 7.308       Setting PTATLAS=ATLAS
#0 7.308       customize UnixCCompiler
#0 7.308         libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_3_10_blas_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries satlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_blas_threads_info:
#0 7.308       Setting PTATLAS=ATLAS
#0 7.308       customize UnixCCompiler
#0 7.308         libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_blas_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       accelerate_info:
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308           Optimized (vendor) Blas libraries are not found.
#0 7.308           Falls back to netlib Blas library which has worse performance.
#0 7.308           A better performance should be easily gained by switching
#0 7.308           Blas library.
#0 7.308         self.calc_info()
#0 7.308       blas_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries blas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308           Blas (http://www.netlib.org/blas/) libraries not found.
#0 7.308           Directories to search for the libraries can be specified in the
#0 7.308           numpy/distutils/site.cfg file (section [blas]) or by setting
#0 7.308           the BLAS environment variable.
#0 7.308         self.calc_info()
#0 7.308       blas_src_info:
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:690: UserWarning:
#0 7.308           Blas (http://www.netlib.org/blas/) sources not found.
#0 7.308           Directories to search for the sources can be specified in the
#0 7.308           numpy/distutils/site.cfg file (section [blas_src]) or by setting
#0 7.308           the BLAS_SRC environment variable.
#0 7.308         self.calc_info()
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /bin/sh: 1: svnversion: not found
#0 7.308       non-existing path in 'numpy/distutils': 'site.cfg'
#0 7.308       lapack_opt_info:
#0 7.308       lapack_mkl_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       openblas_lapack_info:
#0 7.308       customize UnixCCompiler
#0 7.308       customize UnixCCompiler
#0 7.308         libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       openblas_clapack_info:
#0 7.308       customize UnixCCompiler
#0 7.308       customize UnixCCompiler
#0 7.308         libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       flame_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries flame not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_3_10_threads_info:
#0 7.308       Setting PTATLAS=ATLAS
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries tatlas,tatlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries tatlas,tatlas not found in /usr/lib
#0 7.308       <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_3_10_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries satlas,satlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries satlas,satlas not found in /usr/lib
#0 7.308       <class 'numpy.distutils.system_info.atlas_3_10_info'>
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_threads_info:
#0 7.308       Setting PTATLAS=ATLAS
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries ptf77blas,ptcblas,atlas not found in /usr/lib
#0 7.308       <class 'numpy.distutils.system_info.atlas_threads_info'>
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       atlas_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries f77blas,cblas,atlas not found in /usr/local/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack_atlas not found in /usr/lib
#0 7.308       customize UnixCCompiler
#0 7.308         libraries f77blas,cblas,atlas not found in /usr/lib
#0 7.308       <class 'numpy.distutils.system_info.atlas_info'>
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       lapack_info:
#0 7.308       customize UnixCCompiler
#0 7.308         libraries lapack not found in ['/usr/local/lib', '/usr/lib']
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:1712: UserWarning:
#0 7.308           Lapack (http://www.netlib.org/lapack/) libraries not found.
#0 7.308           Directories to search for the libraries can be specified in the
#0 7.308           numpy/distutils/site.cfg file (section [lapack]) or by setting
#0 7.308           the LAPACK environment variable.
#0 7.308         if getattr(self, '_calc_info_{}'.format(lapack))():
#0 7.308       lapack_src_info:
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /tmp/pip-install-46pmyfff/numpy/numpy/distutils/system_info.py:1712: UserWarning:
#0 7.308           Lapack (http://www.netlib.org/lapack/) sources not found.
#0 7.308           Directories to search for the sources can be specified in the
#0 7.308           numpy/distutils/site.cfg file (section [lapack_src]) or by setting
#0 7.308           the LAPACK_SRC environment variable.
#0 7.308         if getattr(self, '_calc_info_{}'.format(lapack))():
#0 7.308         NOT AVAILABLE
#0 7.308   
#0 7.308       /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
#0 7.308         warnings.warn(msg)
#0 7.308       running install
#0 7.308       running build
#0 7.308       running config_cc
#0 7.308       unifing config_cc, config, build_clib, build_ext, build commands --compiler options
#0 7.308       running config_fc
#0 7.308       unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
#0 7.308       running build_src
#0 7.308       build_src
#0 7.308       building py_modules sources
#0 7.308       building library "npymath" sources
#0 7.308       get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
#0 7.308       customize Gnu95FCompiler
#0 7.308       Could not locate executable gfortran
#0 7.308       Could not locate executable f95
#0 7.308       customize IntelFCompiler
#0 7.308       Could not locate executable ifort
#0 7.308       Could not locate executable ifc
#0 7.308       customize LaheyFCompiler
#0 7.308       Could not locate executable lf95
#0 7.308       customize PGroupFCompiler
#0 7.308       Could not locate executable pgfortran
#0 7.308       customize AbsoftFCompiler
#0 7.308       Could not locate executable f90
#0 7.308       Could not locate executable f77
#0 7.308       customize NAGFCompiler
#0 7.308       customize VastFCompiler
#0 7.308       customize CompaqFCompiler
#0 7.308       Could not locate executable fort
#0 7.308       customize IntelItaniumFCompiler
#0 7.308       Could not locate executable efort
#0 7.308       Could not locate executable efc
#0 7.308       customize IntelEM64TFCompiler
#0 7.308       customize GnuFCompiler
#0 7.308       Could not locate executable g77
#0 7.308       customize G95FCompiler
#0 7.308       Could not locate executable g95
#0 7.308       customize PathScaleFCompiler
#0 7.308       Could not locate executable pathf95
#0 7.308       customize NAGFORCompiler
#0 7.308       Could not locate executable nagfor
#0 7.308       don't know how to compile Fortran code on platform 'posix'
#0 7.308       C compiler: aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
#0 7.308   
#0 7.308       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/usr/include/python3.8 -c'
#0 7.308       aarch64-linux-gnu-gcc: _configtest.c
#0 7.308       failure.
#0 7.308       removing: _configtest.c _configtest.o
#0 7.308       Traceback (most recent call last):
#0 7.308         File "<string>", line 1, in <module>
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/setup.py", line 443, in <module>
#0 7.308           setup_package()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/setup.py", line 435, in setup_package
#0 7.308           setup(**metadata)
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/core.py", line 171, in setup
#0 7.308           return old_setup(**new_attr)
#0 7.308         File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
#0 7.308           return distutils.core.setup(**attrs)
#0 7.308         File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
#0 7.308           dist.run_commands()
#0 7.308         File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
#0 7.308           self.run_command(cmd)
#0 7.308         File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308           cmd_obj.run()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/install.py", line 62, in run
#0 7.308           r = self.setuptools_run()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run
#0 7.308           return distutils_install.run(self)
#0 7.308         File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
#0 7.308           self.run_command('build')
#0 7.308         File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
#0 7.308           self.distribution.run_command(command)
#0 7.308         File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308           cmd_obj.run()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build.py", line 47, in run
#0 7.308           old_build.run(self)
#0 7.308         File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
#0 7.308           self.run_command(cmd_name)
#0 7.308         File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
#0 7.308           self.distribution.run_command(command)
#0 7.308         File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
#0 7.308           cmd_obj.run()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 142, in run
#0 7.308           self.build_sources()
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 153, in build_sources
#0 7.308           self.build_library_sources(*libname_info)
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 286, in build_library_sources
#0 7.308           sources = self.generate_sources(sources, (lib_name, build_info))
#0 7.308         File "/tmp/pip-install-46pmyfff/numpy/numpy/distutils/command/build_src.py", line 369, in generate_sources
#0 7.308           source = func(extension, build_dir)
#0 7.308         File "numpy/core/setup.py", line 669, in get_mathlib_info
#0 7.308           raise RuntimeError("Broken toolchain: cannot link a simple C program")
#0 7.308       RuntimeError: Broken toolchain: cannot link a simple C program
#0 7.308       ----------------------------------------
#0 7.308   ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-46pmyfff/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-46pmyfff/numpy/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-he1dm7ma/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-9i_hfnvd/overlay --compile --install-headers /tmp/pip-build-env-9i_hfnvd/overlay/include/python3.8/numpy Check the logs for full command output.
#0 7.308   ----------------------------------------
#0 7.332 ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9i_hfnvd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
------
Dockerfile:16
--------------------
  14 |         rm -fr /var/lib/apt/lists/*
  15 |     
  16 | >>> RUN python3 -m pip install pandas==1.2.3
  17 |     
--------------------
error: failed to solve: process "/bin/sh -c python3 -m pip install pandas==1.2.3" did not complete successfully: exit code: 1
@kidmose
Copy link
Author

kidmose commented Apr 21, 2023

I can reproduce the error with a simpler Dockerfile and lima/nerdctl in the same setup:

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get -y upgrade && \
    apt-get -y install --no-install-recommends \
    ca-certificates \
    curl \
    python3 \
    python3-pip \
    python3-setuptools \
    python3-venv \
    python3-wheel && \
    rm -fr /var/lib/apt/lists/*

RUN python3 -m pip install pandas==1.2.3

@kidmose
Copy link
Author

kidmose commented Apr 21, 2023

I tested various version of pandas on my setup (major=1, minor>=2, patch=latest, and then patch+1 compared to the currently pinned). It seems that the one closest to the current pinned version which installs without failure is pandas==1.2.5, so I'll play arround some more and do a PR if i get that to work.

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get -y upgrade && \
    apt-get -y install --no-install-recommends \
    ca-certificates \
    curl \
    python3 \
    python3-pip \
    python3-setuptools \
    python3-venv \
    python3-wheel && \
    rm -fr /var/lib/apt/lists/*

# RUN python3 -m pip install pandas==1.5.3 # OK
# RUN python3 -m pip install pandas==1.4.4 # OK
# RUN python3 -m pip install pandas==1.3.5 # OK
RUN python3 -m pip install pandas==1.2.5 # OK
# RUN python3 -m pip install pandas==1.2.4 # NOT OK
# RUN python3 -m pip install pandas==1.2.3 # NOT OK

kidmose pushed a commit to kidmose/tram that referenced this issue Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant