Giter VIP home page Giter VIP logo

Comments (6)

SpaceIm avatar SpaceIm commented on June 12, 2024

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.

li-dl avatar li-dl commented on June 12, 2024

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.

uilianries avatar uilianries commented on June 12, 2024

@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.

uilianries avatar uilianries commented on June 12, 2024

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.

uilianries avatar uilianries commented on June 12, 2024

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.

uilianries avatar uilianries commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.