Skip to content

[Build] cross-compile for iOS with conan failed #25121

Closed as not planned
Closed as not planned
@Egorka1

Description

@Egorka1

Describe the issue

I try to cross-compile onnxruntime lib for iOS 16+ using MacOS 15.5 M1 and conan 2.17.0.

Command:
conan install . --build=missing --output-folder=build --profile:host=ios_release --profile:build=default
conanfile.txt:

[requires]
onnxruntime/1.18.1
[options]
*:shared=False
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout

Build profile:

[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu23
compiler.libcxx=libc++
compiler.version=17
os=Macos

Host profile:

[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu23
compiler.version=17
compiler.libcxx=libc++
os=iOS
os.sdk=iphoneos
os.version = 16.0

Running this I get the errors:

.conan2/p/b/nsync44ee4e2010962/b/src/internal/common.c:22:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/debug.c:26:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/counter.c:20:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/cv.c:24:10: fatal error: 'atomic.h' file not found

Urgency

No response

Target platform

iOS

Build script

conan install . --build=missing --output-folder=build --profile:host=ios_release --profile:build=default

Error / output

.conan2/p/b/nsync44ee4e2010962/b/src/internal/common.c:22:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/debug.c:26:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/counter.c:20:10: fatal error: 'atomic.h' file not found
.conan2/p/b/nsync44ee4e2010962/b/src/internal/cv.c:24:10: fatal error: 'atomic.h' file not found

Visual Studio Version

No response

GCC / Compiler Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateplatform:mobileissues related to ONNX Runtime mobile; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions