Bug 394042 - Android regression in 5.45
Summary: Android regression in 5.45
Status: REPORTED
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: AndroidToolchain (other bugs)
Version First Reported In: 5.45.0
Platform: Android Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-09 15:36 UTC by animtim
Modified: 2019-01-15 18:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description animtim 2018-05-09 15:36:03 UTC
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.
Comment 1 Aleix Pol 2018-05-14 22:04:03 UTC
I just built it using the reference docker image. Are you sure it's a regression on the ECM side?
Comment 2 animtim 2018-05-15 10:38:39 UTC
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?
Comment 3 Aleix Pol 2018-05-16 12:51:35 UTC
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.
Comment 4 animtim 2018-05-16 13:01:56 UTC
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...
Comment 5 animtim 2018-05-16 13:02:27 UTC
Thanks for the link btw :)
Comment 6 Jazeix Johnny 2018-12-28 19:58:47 UTC
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
Comment 7 Aleix Pol 2019-01-15 15:38:28 UTC
Standard paths should be passed anyway though, now it's upstream cmake who deals with it. Which cmake version are you using?
Comment 8 Jazeix Johnny 2019-01-15 18:01:21 UTC
(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