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

compile error #5535

Open
JaneConan opened this issue Jan 6, 2025 · 2 comments
Open

compile error #5535

JaneConan opened this issue Jan 6, 2025 · 2 comments
Labels

Comments

@JaneConan
Copy link

JaneConan commented Jan 6, 2025

Describe the bug

  [56/249] Linking CXX shared library /home/ma-user/work/triton/python/triton/_C/libproton.so
  FAILED: /home/ma-user/work/triton/python/triton/_C/libproton.so
  : && /usr/bin/c++ -fPIC -D__STDC_FORMAT_MACROS  -fPIC -std=gnu++17 -Werror -Wno-covered-switch-default -fvisibility=hidden -O2 -g   -shared -Wl,-soname,libproton.so -o /home/ma-user/work/triton/python/triton/_C/libproton.so third_party/proton/CMakeFiles/proton.dir/csrc/lib/Context/Context.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Context/Python.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Context/Shadow.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Data/Data.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Data/TraceData.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Data/TreeData.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/Device.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/GPU/CudaApi.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/GPU/CuptiApi.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/GPU/HipApi.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/GPU/HsaApi.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Driver/GPU/RoctracerApi.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Profiler/Cupti/CuptiPCSampling.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Profiler/Cupti/CuptiProfiler.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Profiler/RocTracer/RoctracerProfiler.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/lib/Session/Session.cpp.o third_party/proton/CMakeFiles/proton.dir/csrc/Proton.cpp.o  -lstdc++fs && :
  /usr/bin/ld: cannot find -lstdc++fs
  collect2: error: ld returned 1 exit status
  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 139, in run
      self._create_wheel_file(bdist_wheel)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 340, in _create_wheel_file
      files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 263, in _run_build_commands
      self._run_build_subcommands()
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 290, in _run_build_subcommands
      self.run_command(name)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 993, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
      cmd_obj.run()
    File "<string>", line 395, in run
    File "<string>", line 507, in build_extension
    File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'TritonRelBuildWithAsserts', '-j384']' returned non-zero exit status 1.
  /tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:1002: _DebuggingTips: Problem in editable installation.
  !!

          ********************************************************************************
          An error happened while installing `triton` in editable mode.

          The following steps are recommended to help debug this problem:

          - Try to install the project normally, without using the editable mode.
            Does the error still persist?
            (If it does, try fixing the problem before attempting the editable mode).
          - If you are using binary extensions, make sure you have all OS-level
            dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
          - Try the latest version of setuptools (maybe the error was already fixed).
          - If you (or your project dependencies) are using any setuptools extension
            or customization, make sure they support the editable mode.

          After following the steps above, if the problem still persists and
          you think this is related to how setuptools handles editable installations,
          please submit a reproducible example
          (see https://stackoverflow.com/help/minimal-reproducible-example) to:

              https://github.com/pypa/setuptools/issues

          See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
          ********************************************************************************

  !!
    cmd_obj.run()
  Traceback (most recent call last):
    File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
      return hook(wheel_directory, config_settings, metadata_directory)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 476, in build_editable
      return self._build_with_temp_dir(
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 720, in <module>
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 186, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 993, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 139, in run
      self._create_wheel_file(bdist_wheel)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 340, in _create_wheel_file
      files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 263, in _run_build_commands
      self._run_build_subcommands()
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 290, in _run_build_subcommands
      self.run_command(name)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 993, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-7weiczjw/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
      cmd_obj.run()
    File "<string>", line 395, in run
    File "<string>", line 507, in build_extension
    File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'TritonRelBuildWithAsserts', '-j384']' returned non-zero exit status 1.
  error: subprocess-exited-with-error
  
  × Building editable for triton (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/ma-user/anaconda3/envs/myenv/bin/python3.10 /home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_editable /tmp/tmpdbypz7sp
  cwd: /home/ma-user/work/triton/python
  Building editable for triton (pyproject.toml) ... error
  ERROR: Failed building editable for triton
Failed to build triton
Remote version of pip: 24.3.1
Local version of pip:  24.3.1
Was pip installed by pip? False
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (triton)
Exception information:
Traceback (most recent call last):
  File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
  File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
  File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
  File "/home/ma-user/anaconda3/envs/myenv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 434, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: ERROR: Failed to build installable wheels for some pyproject.toml based projects (triton)
Removed build tracker: '/tmp/pip-build-tracker-mbec2g4h'
(myenv) [ma-user python]$cmake --version
cmake version 3.31.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Environment details

triton main
GPU Ascend910B

@JaneConan JaneConan added the bug label Jan 6, 2025
@peterbell10
Copy link
Contributor

/usr/bin/ld: cannot find -lstdc++fs

Your compiler/stdlib might be missing C++17 features.

@peterbell10 peterbell10 added build and removed bug labels Jan 6, 2025
@MonolithFoundation
Copy link

same build error:

Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
error: Multiple top-level packages discovered in a flat-layout: ['lib', 'cmake', 'include', 'unittest', 'third_party'].

  To avoid accidental inclusion of unwanted files or directories,
  setuptools will not proceed with this build.
  
  If you are trying to create a single distribution with multiple packages
  on purpose, you should not rely on automatic discovery.
  Instead, consider the following options:
  
  1. set up custom discovery (`find` directive with `include` or `exclude`)
  2. use a `src-layout`
  3. explicitly set `py_modules` or `packages` with a list of names
  
  To find more information, look for "package discovery" on setuptools docs.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants