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

Android and CONAN_LIBCXX do not play well together #2402

Closed
3 tasks done
theodelrieu opened this issue Jan 30, 2018 · 4 comments
Closed
3 tasks done

Android and CONAN_LIBCXX do not play well together #2402

theodelrieu opened this issue Jan 30, 2018 · 4 comments

Comments

@theodelrieu
Copy link
Contributor

theodelrieu commented Jan 30, 2018

Hello,

After #2049, I went to every recipe to use one of the following fixes:

if self.settings.os == "Android":
    cmake.definitions["CONAN_LIBCXX"] = ""

del self.settings.compiler.libcxx

It would be great if Conan could set that automatically, I believe this is an issue when using the standalone android toolchain, from what I recall from the chat on Slack I had with @memsharded

I'm using Conan 1.0.4 on macOS 10.13

To help us debug your issue please explain:

  • I've read the CONTRIBUTING guide.
  • I've specified the Conan version, operating system version and any tool that can be relevant.
  • I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
@lasote
Copy link
Contributor

lasote commented Feb 6, 2018

I'm not sure if we should remove it always, I read about it and the NDK people are changing many things lately regarding the clang/libcxx integration as the only choice. Probably in future NDK versions the libcxx flag won't error.

However, I agree we should document it. So I'm opening an issue in the docs repository.

@theodelrieu
Copy link
Contributor Author

I agree that we shall wait the r17 release, where clang will be the only choice.

In my android-toolchain recipe, I'm not setting self.cpp_info.libdirs, only the sysroot.
But it seems that having the -lc++ flag without -L breaks.

Moreover, in my case I'm linking against the static C++ libs, which have different name.
I should find a way to set CONAN_LICBXX="" in the toolchain directly.

@JamesWeir
Copy link

I added a comment to #2049, which may be of interest and is to do with what make standalone toolchain does in the android ndk package, specifically copying libc++ over libstdc++ to make it look like libstdc++ from external tools perspective and it makes everything confused.

@memsharded
Copy link
Member

the new CMakeToolchain should handle this now

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

No branches or pull requests

4 participants