Using ECM 5.45 and later, GCompris build for Android fails with the error below. (very similar error to this one that was fixed before https://phabricator.kde.org/D9899 ) Using up to 5.44 it worked fine. In file included from /home/user/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:0, from /home/user/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62, from /home/user/Qt5.9.3/5.9.3/android_armv7/include/QtCore/qglobal.h:109, from /home/user/Qt5.9.3/5.9.3/android_armv7/include/QtCore/qnamespace.h:43, from /home/user/Qt5.9.3/5.9.3/android_armv7/include/QtCore/qobjectdefs.h:48, from /home/user/Qt5.9.3/5.9.3/android_armv7/include/QtCore/qobject.h:46, from /home/user/Qt5.9.3/5.9.3/android_armv7/include/QtCore/QObject:1, from /home/user/Softs/src/gcompris-qt-0.91/src/core/ActivityInfo.h:24, from /home/user/Softs/src/gcompris-qt-0.91/src/core/ActivityInfo.cpp:21: /home/user/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory #include <stdlib.h> ^ compilation terminated.
I just built it using the reference docker image. Are you sure it's a regression on the ECM side?
What/where is this reference docker image? (sorry for being a little out of context for ECM development) As for what I'm sure, is that here just re-building locally 5.44 package and replacing 5.45 with it fixed the issue. (note: on a manjaro system, that was fully updated) There is most probably some stack differences in this reference image and my system that affect the way it works, but which ones could cause it?
Here's the image: https://community.kde.org/Android/Environment_via_Container What I'm afraid is that you may have been including stdlib from the system instead of from the NDK. I've had this problem too and my conclusion was that it's an NDK limitation. Another possible difference is that the docker image uses Qt 5.10.
Right, the Qt difference might explain things, since I'm using a local 5.9 for the build and the system (for which I use everything else than Qt and android ndk/sdk) has 5.10...
Thanks for the link btw :)
The issue appeared because before we (ECM/toolchain/Android.cmake) included: "${CMAKE_SYSROOT}/usr/include" where it found the stdlib.h It has been changed in this commit: https://cgit.kde.org/extra-cmake-modules.git/commit/?id=731ba7036effcc430f98031e7f2a9826f6234cba
Standard paths should be passed anyway though, now it's upstream cmake who deals with it. Which cmake version are you using?
(In reply to Aleix Pol from comment #7) > Standard paths should be passed anyway though, now it's upstream cmake who > deals with it. Which cmake version are you using? cmake --version cmake version 3.13.2 but it was not working with previous ones too