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

Find libtool when run tools.XCRun #3514

Closed
zhuhaow opened this issue Sep 10, 2018 · 3 comments
Closed

Find libtool when run tools.XCRun #3514

zhuhaow opened this issue Sep 10, 2018 · 3 comments

Comments

@zhuhaow
Copy link
Contributor

zhuhaow commented Sep 10, 2018

libtool on Mac (which has nothing to do with GNU libtool) is used to replace ar and ranlib for creating fat binaries on OS X and iOS.

Some packages, e.g., boost, expecting libtool as the archiver instead of ar when building for iOS.

In cross compiling profile, such as https://github.com/theodelrieu/conan-darwin-toolchain/blob/release/1.0/conanfile.py, the env variable AR is set to ar and later the boost package will pick that up https://github.com/conan-community/conan-boost/blob/6b6a3c9bc8f07824ec3932422c9ba14311707c48/conanfile.py#L252 which will set the archiver to ar where the build will fail as the building script expect libtool.

We also need libtool for creating fat binary (which I think is under discussion).

@lasote
Copy link
Contributor

lasote commented Sep 12, 2018

So, in addition to #3515, Which changes would be necessary to the @theodelrieu darwin toolchain and the conan-community boost recipe?

@zhuhaow
Copy link
Contributor Author

zhuhaow commented Sep 12, 2018

Hard to say, since there is no common env variable to hold the path to libtool (there is no POSIX standard for it), it would be a little strange if Darwin-toolchain define that without consensus from conan maintainers.

As for conan-boost, the logic of boost jam default build script on Darwin for iOS uses libtool as default archiver, but conan-boost wants to set the archiver for boost build if AR is defined which leads to build failure.

A reasonable workaround is simply do not use AR/RANLIB env if we are building boost for iOS, which is odd but should always work. Other way is to use some env variable defining the libtool to use, this requires conan defines a new env variable for libtool at least in conan community I think.

@lasote
Copy link
Contributor

lasote commented Sep 12, 2018

Sounds good, could you open an issue at the boost recipe repository? I think we should close this.

@zhuhaow zhuhaow closed this as completed Sep 12, 2018
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

2 participants