cog icon indicating copy to clipboard operation
cog copied to clipboard

cmake need to update before python package install !

Open Runist opened this issue 7 months ago • 0 comments

When I install dlib==19.24.9, The error occur:

ⅹ  => [internal] load build definition from Dockerfile                       0.0s
ⅹ  => => transferring dockerfile: 1.06kB                                     0.0s
ⅹ  => resolve image config for docker-image://docker.io/docker/dockerfile:1  0.8s
ⅹ  => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531b  0.0s
ⅹ  => [internal] load .dockerignore                                          0.0s
ⅹ  => => transferring context: 2B                                            0.0s
ⅹ  => [internal] load metadata for r8.im/cog-base:cuda12.4-python3.10        0.3s
ⅹ  => [stage-0  1/10] FROM r8.im/cog-base:cuda12.4-python3.10@sha256:e923a7  0.0s
ⅹ  => [internal] load build context                                          0.0s
ⅹ  => => transferring context: 78.27kB                                       0.0s
ⅹ  => CACHED [stage-0  2/10] RUN --mount=type=cache,target=/var/cache/apt,s  0.0s
ⅹ  => CACHED [stage-0  3/10] COPY .cog/tmp/build20250526181837.238643/cog-0  0.0s
ⅹ  => CACHED [stage-0  4/10] RUN --mount=type=cache,target=/root/.cache/pip  0.0s
ⅹ  => CACHED [stage-0  5/10] COPY .cog/tmp/build20250526181837.238643/requi  0.0s
ⅹ  => ERROR [stage-0  6/10] RUN --mount=type=cache,target=/root/.cache/pip   2.3s
ⅹ ------
ⅹ  > [stage-0  6/10] RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/requirements.txt:
ⅹ 0.723 Collecting cmake==3.27.5
ⅹ 0.769   Using cached cmake-3.27.5-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (26.1 MB)
ⅹ 0.876 Collecting dlib==19.24.9
ⅹ 0.883   Using cached dlib-19.24.9.tar.gz (3.4 MB)
ⅹ 1.131   Preparing metadata (setup.py): started
ⅹ 1.512   Preparing metadata (setup.py): finished with status 'done'
ⅹ 1.520 Building wheels for collected packages: dlib
ⅹ 1.520   Building wheel for dlib (setup.py): started
ⅹ 1.767   Building wheel for dlib (setup.py): finished with status 'error'
ⅹ 1.771   error: subprocess-exited-with-error
ⅹ 1.771   
ⅹ 1.771   × python setup.py bdist_wheel did not run successfully.
ⅹ 1.771   │ exit code: 1
ⅹ 1.771   ╰─> [58 lines of output]
ⅹ 1.771       running bdist_wheel
ⅹ 1.771       running build
ⅹ 1.771       running build_ext
ⅹ 1.771       Building extension for Python 3.10.15 (main, Sep  9 2024, 23:47:27) [GCC 11.4.0]
ⅹ 1.771       Invoking CMake setup: 'cmake /tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/lib.linux-x86_64-cpython-310 -DPYTHON_EXECUTABLE=/root/.pyenv/versions/3.10.15/bin/python3.10 -DDLIB_USE_FFMPEG=OFF -DCMAKE_BUILD_TYPE=Release'
ⅹ 1.771       -- The C compiler identification is GNU 11.40
ⅹ 1.771       -- The CXX compiler identification is GNU 11.4.0
ⅹ 1.771       CMake Error at /usr/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake:42 (message):
ⅹ 1.771         CMAKE_C_STANDARD_COMPUTED_DEFAULT and CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT
ⅹ 1.771         should be set for GNU (/usr/bin/cc) version 11.40
ⅹ 1.771       Call Stack (most recent call first):
ⅹ 1.771         /usr/share/cmake-3.22/Modules/Compiler/GNU-C.cmake:49 (__compiler_check_default_language_standard)
ⅹ 1.771         /usr/share/cmake-3.22/Modules/CMakeCInformation.cmake:25 (include)
ⅹ 1.771         CMakeLists.txt:14 (project)
ⅹ 1.771       
ⅹ 1.771       
ⅹ 1.771       -- Configuring incomplete, errors occurred!
ⅹ 1.771       See also "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/temp.linux-x86_64-cpython-310/CMakeFiles/CMakeOutput.log".
ⅹ 1.771       Traceback (most recent call last):
ⅹ 1.771         File "<string>", line 2, in <module>
ⅹ 1.771         File "<pip-setuptools-caller>", line 34, in <module>
ⅹ 1.771         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 243, in <module>
ⅹ 1.771           setup(
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
ⅹ 1.771           return distutils.core.setup(**attrs)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
ⅹ 1.771           return run_commands(dist)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
ⅹ 1.771           dist.run_commands()
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
ⅹ 1.771           self.run_command(cmd)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 1.771           super().run_command(command)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 1.771           cmd_obj.run()
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/wheel/_bdist_wheel.py", line 378, in run
ⅹ 1.771           self.run_command("build")
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
ⅹ 1.771           self.distribution.run_command(command)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 1.771           super().run_command(command)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 1.771           cmd_obj.run()
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
ⅹ 1.771           self.run_command(cmd_name)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
ⅹ 1.771           self.distribution.run_command(command)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 1.771           super().run_command(command)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 1.771           cmd_obj.run()
ⅹ 1.771         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 168, in run
ⅹ 1.771           self.build_extension(ext)
ⅹ 1.771         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 206, in build_extension
ⅹ 1.771           subprocess.check_call(cmake_setup, cwd=build_folder)
ⅹ 1.771         File "/root/.pyenv/versions/3.10.15/lib/python3.10/subprocess.py", line 369, in check_call
ⅹ 1.771           raise CalledProcessError(retcode, cmd)
ⅹ 1.771       subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/lib.linux-x86_64-cpython-310', '-DPYTHON_EXECUTABLE=/root/.pyenv/versions/3.10.15/bin/python3.10', '-DDLIB_USE_FFMPEG=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
ⅹ 1.771       [end of output]
ⅹ 1.771   
ⅹ 1.771   note: This error originates from a subprocess, and is likely not a problem with pip.
ⅹ 1.771   ERROR: Failed building wheel for dlib
ⅹ 1.772   Running setup.py clean for dlib
ⅹ 1.898 Failed to build dlib
ⅹ 2.007 Installing collected packages: dlib, cmake
ⅹ 2.007   Running setup.py install for dlib: started
ⅹ 2.212   Running setup.py install for dlib: finished with status 'error'
ⅹ 2.215   error: subprocess-exited-with-error
ⅹ 2.215   
ⅹ 2.215   × Running setup.py install for dlib did not run successfully.
ⅹ 2.215   │ exit code: 1
ⅹ 2.215   ╰─> [62 lines of output]
ⅹ 2.215       running install
ⅹ 2.215       /root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
ⅹ 2.215         warnings.warn(
ⅹ 2.215       running build
ⅹ 2.215       running build_ext
ⅹ 2.215       Building extension for Python 3.10.15 (main, Sep  9 2024, 23:47:27) [GCC 11.4.0]
ⅹ 2.215       Invoking CMake setup: 'cmake /tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/lib.linux-x86_64-cpython-310 -DPYTHON_EXECUTABLE=/root/.pyenv/versions/3.10.15/bin/python3.10 -DDLIB_USE_FFMPEG=OFF -DCMAKE_BUILD_TYPE=Release'
ⅹ 2.215       -- The C compiler identification is GNU 11.40
ⅹ 2.215       -- The CXX compiler identification is GNU 11.4.0
ⅹ 2.215       CMake Error at /usr/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake:42 (message):
ⅹ 2.215         CMAKE_C_STANDARD_COMPUTED_DEFAULT and CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT
ⅹ 2.215         should be set for GNU (/usr/bin/cc) version 11.40
ⅹ 2.215       Call Stack (most recent call first):
ⅹ 2.215         /usr/share/cmake-3.22/Modules/Compiler/GNU-C.cmake:49 (__compiler_check_default_language_standard)
ⅹ 2.215         /usr/share/cmake-3.22/Modules/CMakeCInformation.cmake:25 (include)
ⅹ 2.215         CMakeLists.txt:14 (project)
ⅹ 2.215       
ⅹ 2.215       
ⅹ 2.215       -- Configuring incomplete, errors occurred!
ⅹ 2.215       See also "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/temp.linux-x86_64-cpython-310/CMakeFiles/CMakeOutput.log".
ⅹ 2.215       Traceback (most recent call last):
ⅹ 2.215         File "<string>", line 2, in <module>
ⅹ 2.215         File "<pip-setuptools-caller>", line 34, in <module>
ⅹ 2.215         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 243, in <module>
ⅹ 2.215           setup(
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
ⅹ 2.215           return distutils.core.setup(**attrs)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
ⅹ 2.215           return run_commands(dist)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
ⅹ 2.215           dist.run_commands()
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
ⅹ 2.215           self.run_command(cmd)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 2.215           super().run_command(command)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 2.215           cmd_obj.run()
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
ⅹ 2.215           return orig.install.run(self)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 698, in run
ⅹ 2.215           self.run_command('build')
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
ⅹ 2.215           self.distribution.run_command(command)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 2.215           super().run_command(command)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 2.215           cmd_obj.run()
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
ⅹ 2.215           self.run_command(cmd_name)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
ⅹ 2.215           self.distribution.run_command(command)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
ⅹ 2.215           super().run_command(command)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
ⅹ 2.215           cmd_obj.run()
ⅹ 2.215         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 168, in run
ⅹ 2.215           self.build_extension(ext)
ⅹ 2.215         File "/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/setup.py", line 206, in build_extension
ⅹ 2.215           subprocess.check_call(cmake_setup, cwd=build_folder)
ⅹ 2.215         File "/root/.pyenv/versions/3.10.15/lib/python3.10/subprocess.py", line 369, in check_call
ⅹ 2.215           raise CalledProcessError(retcode, cmd)
ⅹ 2.215       subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-trl4lovc/dlib_3d48b84be96440678fd638d56122815d/build/lib.linux-x86_64-cpython-310', '-DPYTHON_EXECUTABLE=/root/.pyenv/versions/3.10.15/bin/python3.10', '-DDLIB_USE_FFMPEG=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
ⅹ 2.215       [end of output]
ⅹ 2.215   
ⅹ 2.215   note: This error originates from a subprocess, and is likely not a problem with pip.
ⅹ 2.216 error: legacy-install-failure
ⅹ 2.216 
ⅹ 2.216 × Encountered error while trying to install package.
ⅹ 2.216 ╰─> dlib
ⅹ 2.216 
ⅹ 2.216 note: This is an issue with the package mentioned above, not pip.
ⅹ 2.216 hint: See above for output from the failure.
ⅹ 2.220 
ⅹ 2.220 [notice] A new release of pip is available: 23.0.1 -> 25.1.1
ⅹ 2.220 [notice] To update, run: pip install --upgrade pip
ⅹ ------
ⅹ ERROR: failed to solve: process "/bin/sh -c pip install -r /tmp/requirements.txt" did not complete successfully: exit code: 1
ⅹ : exit status 1

So I need to update cmake to 3.26+.But the install order is python package is ahead of run. How to solve this problem?

Runist avatar May 26 '25 10:05 Runist