help with android compilation

Johnny Jazeix jazeix at gmail.com
Mon Nov 8 21:24:54 GMT 2021


Hi,

on my computer:
find /opt/android-*/ -name new
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/7.0.2/include/cuda_wrappers/new
/opt/android-ndk/sources/cxx-stl/system/include/new
/opt/android-ndk/sources/cxx-stl/llvm-libc++/include/new

In the ./qml_box2d-prefix/src/qml_box2d-build/Makefile file, do you have
"-isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++/include" in you
CXXFLAGS?

Johnny

Le lun. 8 nov. 2021 à 17:07, Aleksander Kamenik <
aleksander.kamenik at gmail.com> a écrit :

> The ndk is as instructed 18, sdk is at API 25.
>
> I made a Dockerfile where I reproduce the problem, here it is:
>
> https://github.com/kilx/gcompris-docker
>
> It's a bit messy with some extra packages I think, I'll clean up once
> I get it working.
>
> Thanks for looking into this.
>
> This isn't really a GCompris problem but some basic setup thing with
> clang not finding the required libstdc++ libraries, I think.
>
> But I'm not familiar with C++ so not sure where to look for this <new>
> include.
>
> On Mon, Nov 8, 2021 at 2:54 PM Johnny Jazeix <jazeix at gmail.com> wrote:
> >
> > Hi,
> >
> > QmlModels have been added recently and Xml/XmlPatterns have been removed
> a few weeks ago, we haven't updated the doc yet.
> >
> > I don't have access to my dev environment for a few hours so I can only
> give you a few tracks to explore until then.
> > Here it fails when compiling the submodule box2d. Which ndk/sdk versions
> have you installed? In one of them (I think sdk but not sure), is there a
> "new" file in the include?
> >
> > Johnny
> >
> > Le lun. 8 nov. 2021 à 13:36, Aleksander Kamenik <
> aleksander.kamenik at gmail.com> a écrit :
> >>
> >> Hi!
> >>
> >> Yes, of couse. Without that I wouldn't have gotten this far.
> >>
> >> Had to add -DQt5QmlModels_DIR as well to the cmake command and I think
> >> a couple of the -D switches are not actually needed:
> >>
> >> CMake Warning:
> >>   Manually-specified variables were not used by the project:
> >>
> >>     Qt5XmlPatterns_DIR
> >>     Qt5Xml_DIR
> >>
> >> But everything else is in place. Used the same page to get it to
> >> successfully compile the Linux version.
> >>
> >> Regards,
> >> Alex
> >>
> >> On Mon, Nov 8, 2021 at 2:20 PM Johnny Jazeix <jazeix at gmail.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > have you followed
> https://gcompris.net/wiki/Qt_Quick_development_process#Compiling_GCompris_for_Android
> ?
> >> >
> >> > Johnny
> >> >
> >> > Le lun. 8 nov. 2021 à 12:39, Aleksander Kamenik <
> aleksander.kamenik at gmail.com> a écrit :
> >> >>
> >> >> Hi!
> >> >>
> >> >> I have been playing around with GCompris on Linux and now want to
> >> >> build the Android version as well for use on a tablet.
> >> >>
> >> >> However I've been stuck with clang not finding libstdc++ (or at least
> >> >> that's what I guess is the problem). The error is this:
> >> >>
> >> >>
> /opt/android/ndk/18.1.5063045/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
> >> >> -c -target armv7a-linux-androideabi21 -fno-limit-debug-info -fPIC
> >> >> -fstack-protector-strong -DANDROID -O2 -mthumb -Oz
> -fvisibility=hidden
> >> >> -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG
> >> >> -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB
> >> >> -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
> >> >> -I../../../../external/qml-box2d -I. -I../../../../external/qml-box2d
> >> >> -I../../../../external/qml-box2d/Box2D
> >> >> -I/opt/qt/5.15.2/android/include
> >> >> -I/opt/qt/5.15.2/android/include/QtQuick
> >> >> -I/opt/qt/5.15.2/android/include/QtGui
> >> >> -I/opt/qt/5.15.2/android/include/QtQmlModels
> >> >> -I/opt/qt/5.15.2/android/include/QtQml
> >> >> -I/opt/qt/5.15.2/android/include/QtNetwork
> >> >> -I/opt/qt/5.15.2/android/include/QtCore -I.moc
> >> >> -I/opt/qt/5.15.2/android/mkspecs/android-clang -o
> >> >> .obj/b2PolygonShape.o
> >> >>
> ../../../../external/qml-box2d/Box2D/Collision/Shapes/b2PolygonShape.cpp
> >> >>
> ../../../../external/qml-box2d/Box2D/Collision/Shapes/b2PolygonShape.cpp:20:10:
> >> >> fatal error: 'new' file not found
> >> >> #include <new>
> >> >>          ^~~~~
> >> >> 1 error generated.
> >> >>
> >> >> I'm on Ubuntu 21.10 and just can't figure out what package I'm
> >> >> missing. Here's what's installed atm (many of these are obviously not
> >> >> needed):
> >> >>
> >> >> # dpkg --list | grep ++
> >> >>
> +++-=============================-==================================-============-===============================================================================
> >> >> ii  g++                           4:11.2.0-1ubuntu1
> >> >> amd64        GNU C++ compiler
> >> >> ii  g++-11                        11.2.0-7ubuntu2
> >> >> amd64        GNU C++ compiler
> >> >> ii  g++-11-multilib               11.2.0-7ubuntu2
> >> >> amd64        GNU C++ compiler (multilib support)
> >> >> ii  g++-multilib                  4:11.2.0-1ubuntu1
> >> >> amd64        GNU C++ compiler (multilib files)
> >> >> ii  lib32stdc++-11-dev            11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3 (development files)
> >> >> ii  lib32stdc++6                  11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3 (32 bit Version)
> >> >> ii  libjsoncpp24:amd64            1.9.4-4build1
> >> >> amd64        library for reading and writing JSON for C++
> >> >> ii  libpcrecpp0v5:amd64           2:8.39-13build3
> >> >> amd64        Old Perl 5 Compatible Regular Expression Library - C++
> >> >> runtime files
> >> >> ii  libstdc++-11-dev:amd64        11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3 (development files)
> >> >> ii  libstdc++-11-dev-arm64-cross  11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (development files) (arm64)
> >> >> ii  libstdc++-11-dev-armhf-cross  11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (development files) (armhf)
> >> >> ii  libstdc++-11-dev-i386-cross   11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (development files) (i386)
> >> >> ii  libstdc++-11-pic-armhf-cross  11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (shared library subset kit)
> >> >> (armhf)
> >> >> ii  libstdc++6:amd64              11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3
> >> >> ii  libstdc++6-arm64-cross        11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (arm64)
> >> >> ii  libstdc++6-armhf-cross        11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (armhf)
> >> >> ii  libstdc++6-i386-cross         11.2.0-5ubuntu1cross1
> >> >> all          GNU Standard C++ Library v3 (i386)
> >> >> ii  libx32stdc++-11-dev           11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3 (development files)
> >> >> ii  libx32stdc++6                 11.2.0-7ubuntu2
> >> >> amd64        GNU Standard C++ Library v3 (x32)
> >> >>
> >> >> Can anybody give a hint on what is missing?
> >> >>
> >> >> Thanks!
> >> >> --
> >> >> Aleksander Kamenik
> >>
> >>
> >>
> >> --
> >> Aleksander Kamenik
>
>
>
> --
> Aleksander Kamenik
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gcompris-devel/attachments/20211108/e6acbbc3/attachment-0001.htm>


More information about the GCompris-devel mailing list