-
Notifications
You must be signed in to change notification settings - Fork 230
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
Fix or nix Android CI builds #216
Comments
Relevant discussion in an NDK issue: android/ndk#609 It looks like support was added fairly recently in NDK r22. |
Do you have experience with the NDK? We would greatly appreciate a PR that would fix things again. |
@d-frey Sorry for the late response... something bad happened to my relatives in August... anyways I'm surprise why the the android toolchain is using libstdc++ ... it is not anymore updated by the NDK. PEGTL should use libc++ instead. |
@ColinH @d-frey As @wravery mentioned. See also NDK issue: android/ndk/issues/1272… NDK r21 is not yet fully support C++17 features. android/ndk/issues/1265 is also still open. I'm not sure if |
@Bjoe We appreciate your help with our little project, but of course people are more important than machines, so please take all the time you need to help your family - the PEGTL can wait. I am looking forward to see you again in person in the C++ user group once the pandemic is hopefully dealt with in spring/summer next year. For now, I'll disable the CI jobs for Android. Once r22 becomes available, we can try again to create a new CI job for it. Thanks again for your support! |
@d-frey Thank you for condolence ... it's three months ago so we are getting back to normal... I found some more information about the NDK r22 release. So there exists a NDK "22.0.6917172-beta1" version. I used this version locally to build PEGTL for android and it compiles ! :-) I try now to add this beta version in travis .. see https://travis-ci.org/github/Bjoe/PEGTL/builds/744958133 It will help you to test if PEGTL is compiling for android. It won't help your "customer" as NDK r22 is not yet released. To introduce If recommended following: Use the NDK r22 "Beta" in travis, so you know that PEGTL will compile on android (I'm already on it). Add a hint for the android users that your project can compile/use on android when NDK r22 is released (or if they like use the beta NDK r22). I think it will not take a long time if NDK r22 is released. |
I agree that we should use the new r22 instead of wacky work-arounds like |
@Bjoe Thanks a lot, greatly appreciated! |
I have the same problem when using cmake on Linux Debian, it doesn't work with GCC 8.3, compiling stops with an error complaining about undefined reference to |
The dependency on |
@Bjoe, @d-frey, @ColinH, how does adding a If that sounds good I can put together a PR which switches namespaces/libraries based on a CMake config setting. That's the approach I used in the past for https://github.com/microsoft/cppgraphqlgen, and it worked pretty well. It brings in a Boost dependency, but only for users who opt in because they have an older compiler. For some reason that's not one of the language features you can query in CMake, so I just used |
Answered my own question, I've never used it before but it looks like you can use try_compile to see if a test file builds with the current toolchain. If it can't build a source file with |
I'm unsure about this. We require a feature from C++17 and it's almost 2021. It's not like we are requiring bleeding-edge stuff, but I don't want to support old stuff forever. THB, I always wonder why platforms like Android don't do a better job in supporting newer standards. Such a big platform has a scale effect on how much time and effort it can safe for all their users. For the PEGTL, currently we have the 2.x branch without Would it be OK to point Android users to the 2.x branch for the time being and only support r22 and newer for the 3.x main branch? I understand that the situation on Android is unfortunate, but I'd think that this will (hopefully) solve itself over time as newer Android versions do support |
Is there a simple way to automatically detect GCC 8 and add the required flag in CMakeLists.txt? A PR would be appreciated. |
BTW: If anyone has experience with GitHub Actions and would like to create a PR to move our existing CI tests on TravisCI and AppVeyor to GitHub Actions (and provide the same features/coverage), I would be more than happy to accept that PR 😄 |
I totally agree, I don't know why
For selfish reasons I'd also like to enable them for the pegtl vcpkg port since vcpkg maintains support for a wider range of toolchains. So even if each of these targets has a newer toolchain which works (including the pre-release r22 NDK for Android), that still cuts off support for those targets downstream in the cppgraphqlgen port.
Not as simple as I'd like, but I think so. I would use a |
So at the lowest level there would be a macro/define that switches from the default |
The real question is: Is this enough to make the new PEGTL work with GCC 7? There might be other issues, so you might want to try it first and see wether it makes sense to spend more time on a PR. Also, if possible,the PR should then include a new CI job to make sure that it works and we don't accidentally break it in the future. |
Maybe this helps: |
Currently, the Andriod builds are broken due to using std::filesystem::path. On some non-Android builds this was fixed by adding
-llibstdc++fs
, on some builds it just worked. Android, however, seems to be too old in some cases and I wouldn't know how to add the above option (in case it is required and helps). Also, the version we are using now seem to be a bit outdated.We therefore need to either fix (and possibly modernize the build) or I will have to remove them (and most likely Android is then broken).
Any help is appreciated, @Bjoe ;)
The text was updated successfully, but these errors were encountered: