--f403045c5204c18a2d05580c005f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tomaz, 2017-08-31 5:58 GMT-03:00 Tomaz Canabrava : > Pats, > > > On Mon, Aug 28, 2017 at 6:27 PM, patrick JP > wrote: > >> I am trying to compile kirigami apk. This is my command line to use >> cmake: >> >> cmake .. -DCMAKE_TOOLCHAIN_FILE=3D/usr/share/cmake-3.9/Modules/Platform/= Android.cmake >> \ >> -DQTANDROID_EXPORTED_TARGET=3Dkirigami2gallery >> -DANDROID_APK_DIR=3D../examples/galleryapp/ \ >> -DCMAKE_PREFIX_PATH=3D/opt/android-qt5/5.9.1/armeabi-v7a \ >> -DCMAKE_INSTALL_PREFIX=3Dpotato \ >> -DECM_DIR=3D/usr/share/ECM/cmake \ >> -DBUILD_EXAMPLES=3DON >> >> When running make, an error message appears saying that the binaries are >> incompatible. >> >> make >> >> [ 4%] Automatic MOC for target kirigamiplugin >> >> Generating MOC predefs moc_predefs.h >> >> [ 4%] Built target kirigamiplugin_autogen >> >> [ 9%] Linking CXX shared library libkirigamiplugin.so >> >> /opt/android-qt5/5.9.1/armeabi-v7a/lib/libQt5Quick.so: error adding symb= ols: File in wrong format >> >> collect2: error: ld returned 1 exit status >> >> make[2]: *** [src/CMakeFiles/kirigamiplugin.dir/build.make:225: src/libk= irigamiplugin.so] Error 1 >> >> make[1]: *** [CMakeFiles/Makefile2:361: src/CMakeFiles/kirigamiplugin.di= r/all] Error 2 >> >> make: *** [Makefile:163: all] Error 2 >> >> The .obj that is generated from kirigami is x86-64 and not arm v7: >> >> ./src/CMakeFiles/kirigamiplugin.dir/ECMQmLoader-libkirigami2plugin_qt.cp= p.obj: >> ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped >> >> >> I don't know what is the problem, I was just following the README.md. >> >> My best regards, >> -- >> Patrick Jos=C3=A9 Pereira >> Electronics Engineer >> Skype: patrickelectric434 >> IRC: patrickelectric >> +55 (048) 99917-4777 <(48)%2099917-4777> >> > > I have a working script to build for android on subsurface > sources/packaging/android > > take a look there and see if it helps, it's fully documented. > > Tys, I'll take a look asap. Now about my journey trying to compile the kirigami apk. Talking with Marco I changed my cmake command line to use the same path to ECM and Android.cmake. make .. -DCMAKE_TOOLCHAIN_FILE=3D/usr/share/ECM/toolchain/Android.cmake -DQTANDROID_EXPORTED_TARGET=3Dkirigami2gallery -DANDROID_APK_DIR=3D../examples/galleryapp/ \ -DCMAKE_PREFIX_PATH=3D/opt/android-qt5/5.9.1/armeabi-v7a \ -DCMAKE_INSTALL_PREFIX=3D/mnt/hd/kirigami-install \ -DECM_DIR=3D/usr/share/ECM/cmake \ -DBUILD_EXAMPLES=3DON -DCMAKE_SYSTEM_NAME=3D"Android" -DCMAKE_ANDROID_NDK=3D/opt/android-ndk -DQTANDROID_EXPORTED_TARGET=3Dgaller= yapp Than cmake was not happy, and was not possible to find Qt5CoreConfig.cmake https://paste.kde.org/ppkru7p0j Than I added a new line, -DQt5Core_DIR=3D/opt/android-qt5/5.9.1/armeabi-v7a/lib/cmake/Qt5Core/ cmake was not so much happy but no errors this time. cmake + make result https://paste.kde.org/ppkhbkmwx: Ok, now make create-apk-galleryapp appears !! And a new error too.. https://paste.kde.org/pi7szfhj9 I'll try Tomaz approach, but I'll be very happy to solve than and help Kirigami documentation. My best regards, --=20 Patrick Jos=C3=A9 Pereira Electronics Engineer Skype: patrickelectric434 IRC: patrickelectric +55 (048) 99917-4777 --f403045c5204c18a2d05580c005f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tomaz,



2017-08-31 5:58 GMT-03:00 Tomaz Cana= brava <tcanabrava@kde.org>:
Pats,


On Mon, Aug= 28, 2017 at 6:27 PM, patrick JP <patrickelectric@gmail.com>= ; wrote:
I am trying to compile k= irigami apk. This is my command line to use cmake:
cmake .. -DCMAKE_TOOLCHAIN_FILE=3D/usr/s= hare/cmake-3.9/Modules/Platform/Android.cmake \
= -DQTANDROID_EXPORTED_TARGET=3Dkiri= gami2gallery -DANDROID_APK_DIR=3D../examples/galleryapp/ \
<= /font> -DCMAKE_PREFIX_PATH=3D/opt/andro<= wbr>id-qt5/5.9.1/armeabi-v7a \
-DCMAKE_INSTALL_PREFIX=3Dpotato \
-DECM_DIR=3D/usr/share/ECM/cmake \
-DBUILD_EXAMPLES=3DON
When running make, an error message appears saying that the binaries are in= compatible.=20
make
[  4%] Automatic MOC for target kirigamiplugin
Gene= rating MOC predefs moc_predefs.h
[  4%] Built target kirigamiplugin_au=
togen
[  9%] Linking CXX shared library libkirigamiplugin.so
/opt= /android-qt5/5.9.1/armeabi-v7a/lib/libQt5Quick.so: error adding symbol= s: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/kirigamiplugin.dir/build.make:225: src/=
libkirigamiplugin.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:361: =
src/CMakeFiles/kirigamiplugin.dir/all] Error 2
make: *** [Makefil=
e:163: all] Error 2
The .obj that is generated from kirigami is x86-64 and not arm v7:
./src/CMakeFiles/kirigamiplugin.dir/ECMQmLoader-libkirigami2plugin_qt.cpp.obj: ELF 64-bit LSB relo= catable, x86-64, version 1 = (SYSV), not stripped

I don't know what is t= he problem, I was just following the README.md.

My best regards,--
Patrick Jos=C3=A9 Pereira
Electronics Engineer
Skype: patrickelectric434
IRC: patrickelectric
+55 (048) 99917-4777

I have a working scrip= t to build for android on subsurface sources/packaging/android=C2=A0

take a look there and see if it helps, it's ful= ly documented.

Tys, I'll take a look asap.

Now about my journey trying to= compile the kirigami apk.
Talking with Mar= co I changed my cmake command line to use the same path to ECM and Android.= cmake.

make .. -DCMAKE_TOOLCHAIN_FILE=3D/usr/share/ECM/tool= chain/Android.cmake -DQTANDROID_EXPORTED_TARGET=3Dkirigami2gallery -DANDROI= D_APK_DIR=3D../examples/galleryapp/ \
=C2=A0 =C2=A0 -DCMAKE_PREFIX_PATH=3D/opt/androi= d-qt5/5.9.1/armeabi-v7a \
=C2=A0 =C2=A0 -DCMAKE_INSTALL_PREFIX=3D/mnt/hd/kirigami-in= stall \
= =C2=A0 =C2=A0 -DECM_DIR=3D/usr/share/ECM/cmake \
=C2=A0 =C2=A0 -DBUILD_EXAMPLES=3DON = -DCMAKE_SYSTEM_NAME=3D"Android" -DCMAKE_ANDROID_NDK=3D/opt/androi= d-ndk -DQTANDROID_EXPORTED_TARGET=3Dgalleryapp

Than cmake was = not happy, and was not possible to find Qt5CoreConfig.cmake

Than I added a new line, -DQt5Core_DIR=3D/opt/android-q= t5/5.9.1/armeabi-v7a/lib/cmake/Qt5Core/
cma= ke was not so much happy but no errors this time.

=
Ok, now make create-apk-galleryapp appears !!
And a new error too..

I'll try Tomaz approach, but I'll be very happy to= solve than and help Kirigami documentation.=C2=A0

My best re= gards,

--
Patrick Jos=C3=A9 Pereira
Electronics Eng= ineer
Skype: patrickelectri= c434
IRC: patrickelectric
+55 (048) = 99917-4777
--f403045c5204c18a2d05580c005f--