Discussion:
Having a bit of trouble building APK on Ubuntu
Lubomir I. Ivanov
2018-05-11 10:42:04 UTC
Permalink
CC-ing the developer mailing list

On 11 May 2018 at 13:08, 'Stephen Goodall' via Subsurface Divelog
Hi all,
[ 68%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qmlmanager.cpp.o
[ 68%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qmlprofile.cpp.o
[ 69%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/kirigamiplugin.cpp.o
[ 70%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/settings.cpp.o
[ 70%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/enums.cpp.o
[ 71%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/formlayoutattached.cpp.o
[ 71%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/mnemonicattached.cpp.o
[ 72%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/delegaterecycler.cpp.o
[ 73%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/desktopicon.cpp.o
/home/stephen/src/subsurface/mobile-widgets/qml/kirigami/src/desktopicon.cpp:307:47: warning: conversion to 'int' from 'qreal {aka double}' may alter its value [-Wfloat-conversion]
const QSize itemSize(width(), height());
^
/home/stephen/src/subsurface/mobile-widgets/qml/kirigami/src/desktopicon.cpp:307:47: warning: conversion to 'int' from 'qreal {aka double}' may alter its value [-Wfloat-conversion]
/home/stephen/src/subsurface/mobile-widgets/qml/kirigami/src/desktopicon.cpp:421:55: warning: conversion to 'int' from 'qreal {aka double}' may alter its value [-Wfloat-conversion]
const QSize size = QSize(width(), height()) * (window() ? window()->devicePixelRatio() : qApp->devicePixelRatio());
^
/home/stephen/src/subsurface/mobile-widgets/qml/kirigami/src/desktopicon.cpp:421:55: warning: conversion to 'int' from 'qreal {aka double}' may alter its value [-Wfloat-conversion]
[ 73%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/libkirigami/basictheme.cpp.o
[ 74%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/libkirigami/kirigamipluginfactory.cpp.o
[ 75%] Building CXX object CMakeFiles/subsurface-mobile.dir/mobile-widgets/qml/kirigami/src/libkirigami/platformtheme.cpp.o
[ 75%] Building CXX object CMakeFiles/subsurface-mobile.dir/subsurface-mobile-main.cpp.o
[ 76%] Building CXX object CMakeFiles/subsurface-mobile.dir/subsurface-mobile-helper.cpp.o
[ 77%] Building CXX object CMakeFiles/subsurface-mobile.dir/qrc_mobile-resources.cpp.o
[ 77%] Building CXX object CMakeFiles/subsurface-mobile.dir/qrc_kirigami.cpp.o
[ 78%] Building CXX object CMakeFiles/subsurface-mobile.dir/subsurface-mobile_autogen/mocs_compilation.cpp.o
[ 79%] Linking CXX shared library libsubsurface-mobile.so
/home/stephen/src/libgit2-0.26.0/src/diff_print.c:739: error: undefined reference to 'stdout'
/home/stephen/src/libgit2-0.26.0/src/unix/map.c:52: error: undefined reference to 'mmap64'
collect2: error: ld returned 1 exit status
make[2]: *** [libsubsurface-mobile.so] Error 1
make[1]: *** [CMakeFiles/subsurface-mobile.dir/all] Error 2
make: *** [all] Error 2
I made a slight change to the script, is it worth raising a pull request to get that put in? Just a simple addition to the wget so it follows the GitHub redirect from API
AFAIK you are experiencing the problem of using GCC from the NDK
without defining some crazy pre-processor macros that the Android
developers though make sense to "enable" standard library symbols like
stdout, rand() mmap64. you could try Clang as from my experience these
types of errors were gone with Clang (but other things started
breaking).

here are my recent attempts to get it building on the latest NDK with Clang:
https://github.com/Subsurface-divelog/subsurface/pull/1225

i gave up and we went to the old NDK and BTW we reverted away from
Ubuntu Bionic as that was part of the problem.

lubomir
--
Lubomir I. Ivanov
2018-05-11 10:55:29 UTC
Permalink
On 11 May 2018 at 13:49, 'Stephen Goodall' via Subsurface Divelog
I'm glad it's not just me then!
I made a VM for this hence the new Ubuntu version, will see if I can just make a new one using the older iso.
Does the android wrapper script install the dependencies for you?
it installs the Android SDK/NDK and Qt.
you could look at our travis.yml file to trace the path of how our CI
builds the Android version on each Git change / commit:
https://travis-ci.org/Subsurface-divelog/subsurface/jobs/377591892

the Github PR i've mentioned earlier also can help with that.


lubomir
--

Loading...