conan-io / examples2

Conan 2.x examples
MIT License
87 stars 48 forks source link

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

Open prince-chrismc opened 1 year ago

prince-chrismc commented 1 year ago

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!

https://github.com/android/ndk/issues/1581#issuecomment-920541042 Seems related but I am not sure is that's the problem here 🤔

prince-chrismc commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

Asked Julius about this, we have two options

Related issue https://github.com/conan-io/conan/issues/14197