Closed BartoszBartmanski closed 3 months ago
Thanks for the contribution, @BartoszBartmanski. I am surprised cmake doesn't manage to do that automatically. Could you please briefly describe what went wrong before this change? Which ar
was found? None?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 76.48%. Comparing base (
4d40911
) to head (eff9789
). Report is 95 commits behind head on master.
Hi @dweindl! I get the following error message:
Building wheels for collected packages: amici
Building wheel for amici (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for amici (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [152 lines of output]
WARNING setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
running AmiciInstall
running bdist_wheel
running build
running build_py
running AmiciBuildPy
running build_ext
------------------------------ SuiteSparse_config ------------------------------
-- Building SuiteSparse_config version: v7.6.0 (Jan 20, 2024)
-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/miniconda3/envs/ode_sim/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Source: /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/ThirdParty/SuiteSparse/SuiteSparse_config
-- Build: /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config
-- Install lib: lib
-- Install include: include/suitesparse
-- Install bin: bin
-- Install pkg-file: lib
-- Install rpath: $ORIGIN
-- Build rpath:
-- Build type: Release
-- Fortran: not enabled
-- CUDA: not enabled
-- C to Fortran calling protocol:
-- SUITESPARSE_HAS_FORTRAN : OFF
-- FortranCInterface_GLOBAL_MACRO : (name,NAME) name##_
-- FortranCInterface_GLOBAL__MACRO : (name,NAME) name##_
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: C
-- SuiteSparse_config has OpenMP: ON
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Using clock_gettime without librt
-- Found ANY 64-bit BLAS
-- Looking for fmax
-- Looking for fmax - not found
-- OpenMP C libraries: /opt/miniconda3/envs/ode_sim/x86_64-conda-linux-gnu/lib/libgomp.so;/opt/miniconda3/envs/ode_sim/x86_64-conda-linux-gnu/sysroot/usr/lib/libpthread.so
-- OpenMP C include:
-- OpenMP C flags: -fopenmp
-- ------------------------------------------------------------------------
-- SuiteSparse CMAKE report for: SuiteSparseConfig
-- ------------------------------------------------------------------------
-- inside common SuiteSparse root: OFF
-- install in SuiteSparse/lib and SuiteSparse/include: OFF
-- build type: Release
-- BUILD_SHARED_LIBS: OFF
-- BUILD_STATIC_LIBS: ON
-- C compiler: /opt/miniconda3/envs/ode_sim/bin/cc
-- C flags:
-- C++ compiler:
-- C++ flags:
-- C Flags release: -O3 -DNDEBUG
-- C++ Flags release:
-- Fortran compiler: none
-- compile definitions: BLAS_ANY;BLAS64
-- BLAS integer: int64_t
-- ------------------------------------------------------------------------
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config
Change Dir: '/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config'
Run Build Command(s): /tmp/pip-build-env-rahsqoq7/overlay/bin/ninja -v -j 1
[1/2] /opt/miniconda3/envs/ode_sim/bin/cc -DBLAS64 -DBLAS_ANY -I/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config -I/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/ThirdParty/SuiteSparse/SuiteSparse_config -O3 -DNDEBUG -std=gnu11 -fPIC -fopenmp -MD -MT CMakeFiles/SuiteSparseConfig_static.dir/SuiteSparse_config.c.o -MF CMakeFiles/SuiteSparseConfig_static.dir/SuiteSparse_config.c.o.d -o CMakeFiles/SuiteSparseConfig_static.dir/SuiteSparse_config.c.o -c /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/ThirdParty/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c
[2/2] : && /tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake -E rm -f libsuitesparseconfig.a && CMAKE_AR-NOTFOUND qc libsuitesparseconfig.a CMakeFiles/SuiteSparseConfig_static.dir/SuiteSparse_config.c.o && :
FAILED: libsuitesparseconfig.a
: && /tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake -E rm -f libsuitesparseconfig.a && CMAKE_AR-NOTFOUND qc libsuitesparseconfig.a CMakeFiles/SuiteSparseConfig_static.dir/SuiteSparse_config.c.o && :
/bin/sh: 1: CMAKE_AR-NOTFOUND: not found
ninja: build stopped: subcommand failed.
running AmiciBuildCMakeExtension
==> Configuring:
$ cmake -S /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/ThirdParty/SuiteSparse/SuiteSparse_config -B /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/lib.linux-x86_64-cpython-311/amici -DCMAKE_MAKE_PROGRAM=/tmp/pip-build-env-rahsqoq7/overlay/bin/ninja -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_MODULE_PATH=/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF -DBLAS_LIBRARIES=dummy -DSUITESPARSE_USE_64BIT_BLAS=ON -DSUITESPARSE_USE_CUDA=OFF -DSUITESPARSE_USE_FORTRAN=OFF
==> Building:
$ cmake --build /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config --config Release
==> Installing:
$ cmake --install /tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config
Traceback (most recent call last):
File "/opt/miniconda3/envs/ode_sim/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/miniconda3/envs/ode_sim/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ode_sim/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 195, in <module>
File "<string>", line 179, in main
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/custom_commands.py", line 124, in run
self.run_command("build_ext")
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/custom_commands.py", line 160, in run
result = super().run()
^^^^^^^^^^^^^
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/cmake_build_extension/build_extension.py", line 113, in run
self.build_extension(ext)
File "/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/amici/custom_commands.py", line 188, in build_extension
super().build_extension(ext)
File "/tmp/pip-build-env-rahsqoq7/overlay/lib/python3.11/site-packages/cmake_build_extension/build_extension.py", line 230, in build_extension
subprocess.check_call(build_command)
File "/opt/miniconda3/envs/ode_sim/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '/tmp/pip-install-mjhecfdx/amici_5c0a6a88de2c44729af2c8b954fd275b/build/temp.linux-x86_64-cpython-311_SuiteSparse_config', '--config', 'Release']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for amici
Failed to build amici
ERROR: Could not build wheels for amici, which is required to install pyproject.toml-based projects
However, since submitting the pull request I've found that installing binutils package within the same conda environment solves the issue as well
I've found that installing binutils package within the same conda environment solves the issue as well
Thanks for the update and sorry for the late response.
In that case, I'd rather add a comment to the installation documentation to avoid breaking things on other setups. Thanks for reporting/investigating.
Adding cmake flag to specify path to ar executable fixed errors in installation in a conda env.
Specifically in a conda env made with: