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] "error: package directory 'onnxruntime/backend' does not exist" on MacOS/arm64 #22942

Open
bluejack opened this issue Nov 25, 2024 · 2 comments
Labels
build build issues; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@bluejack
Copy link

bluejack commented Nov 25, 2024

Describe the issue

Using the documentation here:

https://onnxruntime.ai/docs/build/inferencing.html

I want to build a python wheel with custom code.

I run the macos build process without problem; all tests succeed.

I install protobufs, as directed.

I execute:

export ONNX_ML=1
python3 setup.py bdist_wheel

And then it fails with:

error: package directory 'onnxruntime/backend' does not exist

Which it does not.

That directory structure:

ReformatSource.ps1         lora
ReformatSourcePython.bat   python
VSCodeCoverage.runsettings test
__init__.py                tool
contrib_ops                wasm
core

Urgency

No response

Target platform

MacOs ARM

Build script

./build.sh --config RelWithDebInfo --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --cmake_extra_defines CMAKE_OSX_ARCHITECTURES=arm64

Followed by:

export ONNX_ML=1
python3 setup.py bdist_wheel

Error / output

running bdist_wheel
running build
running build_py
copying onnxruntime/__init__.py -> build/lib/onnxruntime
error: package directory 'onnxruntime/backend' does not exist

Visual Studio Version

No response

GCC / Compiler Version

Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@bluejack bluejack added the build build issues; typically submitted using template label Nov 25, 2024
@github-actions github-actions bot added the platform:web issues related to ONNX Runtime web; typically submitted using template label Nov 25, 2024
@bluejack
Copy link
Author

I am trying a similar build on linux to see if the problem is me being stupid or osmething about the macos build process.

@fs-eire fs-eire removed the platform:web issues related to ONNX Runtime web; typically submitted using template label Nov 26, 2024
@fs-eire fs-eire changed the title [Build] [Build] "error: package directory 'onnxruntime/backend' does not exist" on MacOS/arm64 Nov 26, 2024
@github-actions github-actions bot added the platform:web issues related to ONNX Runtime web; typically submitted using template label Nov 26, 2024
@skottmckay
Copy link
Contributor

--build_wheel will build the wheel. It will be in the dist directory under the build output directory.

I'd also suggest using --arm64 instead of doing that via CMAKE_OSX_ARCHITECTURES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants