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

build_apple_frameworks.sh failed with error : Cell paths shim/prelude and third-party/prelude had the same alias prelude. #9312

Open
AkiSakurai opened this issue Mar 17, 2025 · 4 comments
Assignees
Labels
module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch need-user-input The issue needs more information from the reporter before moving forward triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@AkiSakurai
Copy link
Contributor

AkiSakurai commented Mar 17, 2025

🐛 Describe the bug

./build/build_apple_frameworks.sh --coreml --custom --mps --optimized --portable --quantized --xnnpack

Exporting headers
building file list ... Traceback (most recent call last):
  File "/Users/aki/Desktop/Study/executorch/build/print_exported_headers.py", line 100, in <module>
    main()
  File "/Users/aki/Desktop/Study/executorch/build/print_exported_headers.py", line 83, in main
    targets = [
              ^
  File "/Users/aki/Desktop/Study/executorch/build/print_exported_headers.py", line 86, in <listcomp>
    for target in expand_target(args.buck2, input_target)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aki/Desktop/Study/executorch/build/print_exported_headers.py", line 64, in expand_target
    output = run([buck2, "cquery", target])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aki/Desktop/Study/executorch/build/print_exported_headers.py", line 25, in run
    result = subprocess.run(command, capture_output=True, check=True, cwd=BUCK_CWD)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/aki/Desktop/Study/executorch/buck2-bin/buck2-3eb1ae97ea963086866b4d2d9ffa966d', 'cquery', '//extension/module:']' returned non-zero exit status 1.
done

Command failed: Error creating cell resolver

Caused by:
    Cell paths `shim/prelude` and `third-party/prelude` had the same alias `prelude`.

Versions

82f3381

Collecting environment information...
PyTorch version: 2.8.0a0+git790f93d
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 15.3.2 (x86_64)
GCC version: Could not collect
Clang version: 16.0.0 (clang-1600.0.26.4)
CMake version: version 3.31.1
Libc version: N/A

Python version: 3.11.1 (v3.11.1:a7a450f84a, Dec 6 2022, 15:24:06) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)
Python platform: macOS-15.3.2-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz

Versions of relevant libraries:
[pip3] executorch==0.6.0a0+6fe7edb
[pip3] flake8==6.1.0
[pip3] flake8-breakpoint==1.1.0
[pip3] flake8-bugbear==24.4.26
[pip3] flake8-comprehensions==3.14.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-plugin-utils==1.3.3
[pip3] flake8-pyi==23.5.0
[pip3] flake8-simplify==0.19.3
[pip3] mypy==1.14.1
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.23.2
[pip3] onnx==1.17.0
[pip3] onnxscript==0.1.0.dev20250107
[pip3] optree==0.13.0
[pip3] torch==2.6.0a0+gitb9fbd65
[pip3] torchaudio==2.6.0a0+b6d4675
[pip3] torchaudio==2.6.0a0+b6d4675
[pip3] torchsr==1.0.4
[pip3] torchvision==0.22.0a0+d3beb52
[pip3] torchvision==0.22.0a0+d3beb52
[conda] clip-anytorch 2.5.0 pypi_0 pypi
[conda] numpy 1.23.5 pypi_0 pypi
[conda] optree 0.10.0 pypi_0 pypi
[conda] pytorch-lightning 2.0.1 pypi_0 pypi
[conda] torch 2.4.0a0+git88fa843 pypi_0 pypi
[conda] torchaudio 2.0.0.dev20230310 pypi_0 pypi
[conda] torchdiffeq 0.2.3 pypi_0 pypi
[conda] torchmetrics 0.11.4 pypi_0 pypi
[conda] torchsde 0.2.5 pypi_0 pypi

cc @larryliu0820 @jathu @lucylq

@jathu jathu added the module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch label Mar 17, 2025
@swolchok swolchok added the need-user-input The issue needs more information from the reporter before moving forward label Mar 17, 2025
@swolchok
Copy link
Contributor

/Users/aki/Desktop/Study/executorch/buck2-bin/buck2-3eb1ae97ea963086866b4d2d9ffa966d

@AkiSakurai This is the wrong version of Buck. It appears to be the one from before the pin bump 2 months ago; the current version is 9c9a583658d43e82b41f3fc9d369a9b0 . Not sure why it hasn't been automatically updated for you, but I imagine that deleting buck2-bin should get you fixed up.

@kimishpatel kimishpatel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 17, 2025
@AkiSakurai
Copy link
Contributor Author

/Users/aki/Desktop/Study/executorch/buck2-bin/buck2-3eb1ae97ea963086866b4d2d9ffa966d

@AkiSakurai This is the wrong version of Buck. It appears to be the one from before the pin bump 2 months ago; the current version is 9c9a583658d43e82b41f3fc9d369a9b0 . Not sure why it hasn't been automatically updated for you, but I imagine that deleting buck2-bin should get you fixed up.

Confirmed that deleting the cached Buck2 resolves the issues.

BUCK2=$(find $SOURCE_ROOT_DIR -type f -path '*/buck2-bin/buck2-*' | head -n 1)

The script uses a wildcard to locate the cached Buck2 instead of utilizing resolve_buck.py.

@swolchok
Copy link
Contributor

swolchok commented Mar 18, 2025

The script uses a wildcard to locate the cached Buck2 instead of utilizing resolve_buck.py.

over to @shoumikhin for the build_apple_frameworks issue

@shoumikhin
Copy link
Contributor

@AkiSakurai ptal at #9369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch need-user-input The issue needs more information from the reporter before moving forward triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

5 participants