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

Add example for cross-build to android with CCI recipe #113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

prince-chrismc
Copy link
Contributor

No description provided.

@prince-chrismc prince-chrismc self-assigned this Aug 27, 2023
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just the Windows tests is not passing yet, please check it

@prince-chrismc
Copy link
Contributor Author

Hmmm, 🧐 I need to do some research on what the expected behavior is, i've never used this on Windows

foo/1.0: RUN: cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:/J/w/Examples2.0_PR-113/21a5/535f/.conan/p/b/foofc270d89a49a2/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/J/w/Examples2.0_PR-113/21a5/535f/.conan/p/b/foofc270d89a49a2/p" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "C:\J\w\Examples2.0_PR-113\21a5\535f\.conan\p\b\foofc270d89a49a2\b"


CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

-- Configuring incomplete, errors occurred!

android/ndk#1581 (comment) Seems related but I am not sure is that's the problem here 🤔

Testing: "The Conan default is to pick mingw on windows when not using msvc which is not what we want wen targeting android"

https://cpplang.slack.com/archives/C41CWV9HA/p1693160641849589?thread_ts=1693156865.039739&cid=C41CWV9HA
@prince-chrismc
Copy link
Contributor Author

@memsharded It seems the default CMake generator Conan is picking might not make sense for the cross-building to android scenario on windows.

I forced it to use ninja for all of them which seems to be passing now.
I also noticed current example is untested on windows which is another option

@prince-chrismc
Copy link
Contributor Author

The failure on linux seems unrelated

wayland/1.21.0: Calling source() in /home/jenkins/w/Examples2.0_PR-113/2edd/48f5/.conan/p/wayla8232599998fb6/s/src
wayland/1.21.0: ERROR: Error downloading file https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.21.0/downloads/wayland-1.21.0.tar.xz: 'HTTPSConnectionPool(host='gitlab.freedesktop.org', port=443): Read timed out. (read timeout=60)'
wayland/1.21.0: Waiting 5 seconds to retry...
wayland/1.21.0: ERROR: Error downloading file https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.21.0/downloads/wayland-1.21.0.tar.xz: 'HTTPSConnectionPool(host='gitlab.freedesktop.org', port=443): Read timed out. (read timeout=60)'
wayland/1.21.0: Waiting 5 seconds to retry...
ERROR: wayland/1.21.0: Error in source() method, line 68
	get(self, **self.conan_data["sources"][self.version], strip_root=True)
	ConanException: Error downloading file https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.21.0/downloads/wayland-1.21.0.tar.xz: 'HTTPSConnectionPool(host='gitlab.freedesktop.org', port=443): Read timed out. (read timeout=60)'

script returned exit code 1

@prince-chrismc
Copy link
Contributor Author

prince-chrismc commented Aug 30, 2023

Asked Julius about this, we have two options

  • Update the Client CMake generator to return Ninja (which is the recommendation from google) for the windows to android case
  • Update the CCI recipe to expose the ninja (might be windows only)

Related issue conan-io/conan#14197

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

Successfully merging this pull request may close these issues.

2 participants