Skip to content

Build and install failing on ubuntu 24, python 3.12 and Cuda 12.8 #26

@lerignoux

Description

@lerignoux

Hello

I had a lot of troubles isntalling CuMesh.

here is my setup:

  • Ubuntu 24.04 (docker image dua:12.8.1-cudnn-devel-ubuntu24.04)
  • python 3.12
  • Cuda 12.8
  • uv

Running uv pip install CuMesh fails on the following:

INFO: pip is looking at multiple versions of cumesh to determine which version is compatible with other requirements. This could take a while.
Will try a different candidate, due to conflict:
    cumesh 0.1.0 depends on python>=3.8
ERROR: Could not find a version that satisfies the requirement python>=3.8 (from cumesh) (from versions: none)
ERROR: No matching distribution found for python>=3.8
Exception information:
Traceback (most recent call last):
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 439, in resolve
    raise ResolutionImpossible(self.state.backtrack_causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('python>=3.8'), parent=LinkCandidate('https://files.pythonhosted.org/packages/54/bc/eb5d69ac9f7fb674e51192c7113284ee401623ec3126e42662fd83f3c5f6/cumesh-0.1.0-py3-none-any.whl (from https://pypi.org/simple/cumesh/) (requires-python:>=3.8)'))]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/usr/app/venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 104, in resolve
    raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for python>=3.8

Helped by AI this may be an issue in the project dependency. it declares python as a library dependency which does not exists. Maybe a breaking changes in latest pip versions ?

Local Build also seems to fail:

git clone https://github.com/JeffreyXiang/CuMesh.git --recursive && cd CuMesh && uv pip install CuMesh --no-build-isolation

Lead to the following issue:

root@38ffeec63f33:/usr/app/CuMesh# uv pip install . --no-build-isolation
Using Python 3.12.3 environment at: /usr/app/venv
Resolved 27 packages in 15ms
  x Failed to build `cumesh @ file:///usr/app/CuMesh`
  |-> The build backend returned an error
  `-> Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying cumesh/__init__.py -> build/lib.linux-x86_64-cpython-312/cumesh
      copying cumesh/cumesh.py -> build/lib.linux-x86_64-cpython-312/cumesh
      copying cumesh/bvh.py -> build/lib.linux-x86_64-cpython-312/cumesh
      copying cumesh/xatlas.py -> build/lib.linux-x86_64-cpython-312/cumesh
      copying cumesh/remeshing.py -> build/lib.linux-x86_64-cpython-312/cumesh
      running egg_info
      writing cumesh.egg-info/PKG-INFO
      writing dependency_links to cumesh.egg-info/dependency_links.txt
      writing requirements to cumesh.egg-info/requires.txt
      writing top-level names to cumesh.egg-info/top_level.txt
      reading manifest file 'cumesh.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'cumesh.egg-info/SOURCES.txt'
      running build_ext
      building 'cumesh._C' extension
      ninja: no work to do.
      x86_64-linux-gnu-g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -shared -Wl,-O1 -Wl,-Bsymbolic-functions /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/atlas.o
      /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/clean_up.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/connectivity.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/cumesh.o
      /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/ext.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/geometry.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/hash/hash.o
      /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/io.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/remesh/simple_dual_contour.o
      /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/remesh/svox2vert.o /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/shared.o
      /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/src/simplify.o -L/usr/app/venv/lib/python3.12/site-packages/torch/lib -L/usr/local/cuda/lib64 -L/usr/lib/x86_64-linux-gnu -lc10 -ltorch -ltorch_cpu
      -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-312/cumesh/_C.cpython-312-x86_64-linux-gnu.so
      building 'cumesh._cubvh' extension
      ninja: error: '/usr/app/CuMesh/third_party/cubvh/src/api_gpu.cu', needed by '/usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/third_party/cubvh/src/api_gpu.o', missing and no known rule to make it

      [stderr]
      /usr/app/venv/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
      !!

              ********************************************************************************
              Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

              By 2027-Feb-18, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        corresp(dist, value, root_dir)
      /usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py:490: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.8
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      /usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py:2356: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
      If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
        warnings.warn(
      Emitting ninja build file /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      /usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py:2356: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
      If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
        warnings.warn(
      Emitting ninja build file /usr/app/CuMesh/build/temp.linux-x86_64-cpython-312/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      Traceback (most recent call last):
        File "/usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2506, in _run_ninja_build
          subprocess.run(
        File "/usr/lib/python3.12/subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 11, in <module>
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 438, in build_wheel
          return _build(['bdist_wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 429, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 410, in _build_with_temp_dir
          self.run_setup()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 147, in <module>
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)  # type: ignore[return-value]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1000, in run_commands
          self.run_command(cmd)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/dist.py", line 1107, in run_command
          super().run_command(command)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1019, in run_command
          cmd_obj.run()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command("build")
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 341, in run_command
          self.distribution.run_command(command)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/dist.py", line 1107, in run_command
          super().run_command(command)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1019, in run_command
          cmd_obj.run()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 341, in run_command
          self.distribution.run_command(command)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/dist.py", line 1107, in run_command
          super().run_command(command)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1019, in run_command
          cmd_obj.run()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 97, in run
          _build_ext.run(self)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 367, in run
          self.build_extensions()
        File "/usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 1010, in build_extensions
          build_ext.build_extensions(self)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 483, in build_extensions
          self._build_extensions_serial()
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 509, in _build_extensions_serial
          self.build_extension(ext)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 262, in build_extension
          _build_ext.build_extension(self, ext)
        File "/usr/app/venv/lib/python3.12/site-packages/Cython/Distutils/build_ext.py", line 136, in build_extension
          super().build_extension(ext)
        File "/usr/app/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 564, in build_extension
          objects = self.compiler.compile(
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 815, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2159, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/usr/app/venv/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 2522, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension

      hint: This usually indicates a problem with the package or the build environment.

I didn't manage to fix this. I tried installing cubvh manually before but it didn't help.

PS: I finally managed to fix this by installing CuMesh using uv pip install CuMesh --no-deps
Dunno if it's possible to fix these issues. If not maybe this will help others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions