Comments (6)
Your build profile is incorrect, it must not be the same as host profile in case of cross compilation, otherwise conan assumes a native build obviously.
What you likely want is:
build_profile:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.version=15
compiler.libcxx=libc++
os=Macos
host_profile
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.version=15
compiler.libcxx=libc++
os=Macos
conan install -pr:b build_profile -pr:h host_profile -b missing ..
from conan-center-index.
Your build profile is incorrect, it must not be the same as host profile in case of cross compilation, otherwise conan assumes a native build obviously.
Sorry, I probably shouldn't have used the words "cross compile". Technically, I guess it's not cross compiling, but my understanding was that we could use arch=x86_64
in the build profile on an Apple Silicon Mac to force use of the x86_64 compiler via Rosetta 2. Is that not the case?
The reason we've been doing it that way is that we have a dependency on the hdf5 package, which can't be cross compiled yet. (Reported as #23803.)
from conan-center-index.
@li-dl Hello, in order to cross-compile a project, you should define different profiles. You can have a look in Conan documentation about this topic: https://docs.conan.io/2/examples/cross_build.html
we could use arch=x86_64 in the build profile on an Apple Silicon Mac to force use of the x86_64 compiler via Rosetta 2. Is that not the case?
You should be able to do that, but only in case the project in question supports cross-building, and the Conan recipe is prepared to work with cross-compilation.
The way you have explained, the ConanCenterIndex uses daily to generate Mac packages, there are M1 machines building x86_64 packages.
The reason we've been doing it that way is that we have a dependency on the hdf5 package, which can't be cross compiled yet. (Reported as #23803.)
Thank you for pointing the origin of your question. Indeed that package can not be cross built yet, but it does not mean capnproto is not working. So, let's solve hdf5 first.
from conan-center-index.
I'm closing this issue because there is no restriction under capnproto, but it comes from hdf5.
Feel free to re-open in the future in case the error persist after fixing hdf5 package.
from conan-center-index.
Re-opening the issue because capnproto does not need HDF5 to be built: https://github.com/conan-io/conan-center-index/blob/master/recipes/capnproto/all/conanfile.py
Need to check if we can cross-build from arvm8 to x86_64. Let's build was in 2023, when machines were intel by default.
Build result should be available in https://c3i.jfrog.io/c3i/misc-v2/summary.html?json=https://c3i.jfrog.io/c3i/misc-v2/logs/prod-v2/TapaholesRepo/25/summary.json
from conan-center-index.
It's possible to cross-compile CapnProto from armv8 to x86_64. It was done in the PR #22378 to generate the version 1.0.2 only few weeks ago.
Package ID for Apple Clang 13, Cppstd 17, All shared, x86_64
conan cache path capnproto/1.0.2#6c99e4ee392b0ba85eca415386d237bb:65e66c1936b1cff9ba8b5f7da71b580b519225c2
/Users/uilian/.conan2/p/capnpa51135ba3aa99/p
file /Users/uilian/.conan2/p/capnpa51135ba3aa99/p/lib/libcapnp.dylib
/Users/uilian/.conan2/p/capnpa51135ba3aa99/p/lib/libcapnp.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Since the beginning of the year, the CI only have M1 machines, and to provide x86_64, it cross-build.
Closing this issue again 😅 But feel free to re-open in case finding that's not possible to cross-build locally.
from conan-center-index.
Related Issues (20)
- [package] cpr/1.10.5: GCC minimum version is set too high HOT 3
- [package] raylib/5.0: forced dependency on x11 HOT 1
- [package] libx264/cci.2022060: Failed to build for Android
- [package] libx265/3.4: Failed to build for Android
- [package] openh264/2.3.1: Failed to build for Android
- [package] libsvtav1/1.6.0: Failed to build for Android
- [package] ffmpeg/6.1: Failed to build for Android HOT 1
- [package] ffmpeg/6.1: Failed to build for Android HOT 5
- [request] add the flipping backends to imgui in the recipe HOT 1
- [package] hdf5/*: add support for infix for custom library naming HOT 1
- [request] colmap HOT 3
- [package] libffi/3.4.4: Failed to build on OpenBSD
- [package] freetype/2.13.* provide freetype-6.dll, but consumers expect freeytpe.dll
- [question] Force package versions for "paired" recipes HOT 5
- [package] cairo/1.18.0: Fails to build with MSVC due to an upstream bug HOT 1
- [package] gettext/0.22: MSVC debug assertions when building in Debug mode HOT 2
- [package] hdf5/1.14.3: "Recipe doesn't support cross-building" HOT 5
- [package] qhull/7.3.2: can't build with visibility=hidden
- [request] recipe for LLVM components HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan-center-index.