Error: Failed building wheel for executorch

I am getting the following error, looking to set up executorch on my local Ubuntu Workstation.
System Information:
Ubuntu: 22.04
g++ : 11.4.0

I am directly following instructions as mentioned at I get the following error after executing the command: ./


-- Using python executable '/home/n.bansal1/anaconda3/envs/executorch/bin/python'
  -- Resolved buck2 as /home/n.bansal1/projects/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/buck2-bin/buck2-071372cfde6e9936c62eb92823742392af4a945570df5c5b34d3eed1b03813c3.
  -- Killing buck2 daemon
  -- executorch: Generating source lists
  -- executorch: Generating source file list /home/n.bansal1/projects/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/executorch_srcs.cmake
  Error while generating /home/n.bansal1/projects/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/executorch_srcs.cmake. Exit code: 1

  Traceback (most recent call last):
    File "/home/n.bansal1/projects/executorch/build/", line 26, in run
      cp: subprocess.CompletedProcess =
    File "/home/n.bansal1/anaconda3/envs/executorch/lib/python3.10/", line 524, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['/home/n.bansal1/projects/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/buck2-bin/buck2-071372cfde6e9936c62eb92823742392af4a945570df5c5b34d3eed1b03813c3', 'cquery', "inputs(deps('//runtime/executor:program'))"]' returned non-zero exit status 1.

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

  Traceback (most recent call last):
    File "/home/n.bansal1/projects/executorch/build/", line 218, in <module>
    File "/home/n.bansal1/projects/executorch/build/", line 203, in main
      target_to_srcs[name] = sorted(target.get_sources(graph, runner))
    File "/home/n.bansal1/projects/executorch/build/", line 116, in get_sources
      sources: set[str] = set(["cquery", query]))
    File "/home/n.bansal1/projects/executorch/build/", line 31, in run
      raise RuntimeError(ex.stderr.decode("utf-8")) from ex
  RuntimeError: Command failed: Error creating cell resolver

  Caused by:
      Expected a HOME directory to be available

  CMake Error at build/Utils.cmake:161 (message):
    executorch: source list generation failed
  Call Stack (most recent call first):
    CMakeLists.txt:261 (extract_sources)

  -- Configuring incomplete, errors occurred!
  error: command '/home/n.bansal1/anaconda3/envs/executorch/bin/cmake' failed with exit code 1
  error: subprocess-exited-with-error
Building wheel for executorch (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/n.bansal1/anaconda3/envs/executorch/bin/python /home/n.bansal1/anaconda3/envs/executorch/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/ build_wheel /tmp/tmpxqgivese
  cwd: /home/n.bansal1/projects/executorch
  Building wheel for executorch (pyproject.toml) ... error
  ERROR: Failed building wheel for executorch
Failed to build executorch
ERROR: Could not build wheels for executorch, which is required to install pyproject.toml-based projects

Any help would be appreciated!
Thank you.

Able to resolve this issue with the fix on this link : Patch

1 Like