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

[feature] Deploy generator for iOS/OSX universal binaries #9926

Open
1 task done
gmeeker opened this issue Nov 2, 2021 · 3 comments
Open
1 task done

[feature] Deploy generator for iOS/OSX universal binaries #9926

gmeeker opened this issue Nov 2, 2021 · 3 comments

Comments

@gmeeker
Copy link

gmeeker commented Nov 2, 2021

Based on earlier feedback, the idea of multi-architecture packages in conan is too complex. For such an attempt see the combination of #9636 and #9904 to alter every recipe in a dependency graph. It works but is very complicated.

Instead, run lipo during deploy. In that pull @memsharded said "I'd say... leveraging the Conan 2.0 new custom modular commands, start working on a deploy-aggregator with lipo command."

I don't see anything like than in 2.0 but maybe you mean adding a command like:

conan lipo openssl/1.0.2u@ -g lipo -b missing -pr x86_64 -pr armv8

which is similar to:

conan install openssl/1.0.2u@ -b missing -pr x86_64
conan install openssl/1.0.2u@ -b missing -pr armv8
conan install openssl/1.0.2u@ -g deploy -if install_folder

The deploy generator only has access to one arch, hence the new command to pass multiple archs to one. Is the -g flag useful for other lipo generators, like maybe Android?

I have a working directory copier with lipo in this repo. (It's more complicated than it seems. For example, recognizing what files are binaries, and consolidating different sets of files between the archs.)

https://github.com/gmeeker/conan-lipo-middleware

I believe this obsoletes #9636 and #9904 as well as conan-io/conan-extensions#59 and #6384

I believe this issue is waiting on finished Conan 2.0 documentation for custom commands:
https://docs.conan.io/en/latest/migrating_to_2.0/commands.html#custom-commands

I have a custom wrapper that might be useful to others. I'm using in production but I don't know if it's clean enough for others to use. The idea is to lipo all the locally installed package and patch the generated files to point to the fat library paths instead. Then your application's conanfile can build universal in Xcode or whatever, but packages still don't contain universal binaries. I'm not currently working on porting this to 2.0's custom commands, but it could be a starting point for someone else.

https://github.com/gmeeker/BuildConan.git

@gegles
Copy link

gegles commented Feb 24, 2023

Now that Conan v2 is officially out, what's the status on this? Is anybody actively building a v2 custom deployer?

@memsharded
Copy link
Member

We are opening now a new repo for kind of auxiliary, incubator, integrations commands in https://github.com/conan-io/command-extensions. I think we could use this repo to incubate these kind of deployers, as they can be easily installed with conan config install. This will allow for faster iteration, easier customizations for user cases in forks than if it is built-in.

What do you think? Anyone wants to contribute an initial PR with some proposal that gets the ball rolling?

@gmeeker
Copy link
Author

gmeeker commented Feb 27, 2023

The new repo is a great idea.
I'm not available for at least a couple months, but I'll take a look in May or so if no one has tried. The BuildConan repo above could be useful if someone else wants to look sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants