Problem building Kirigami example.
patrick JP
patrickelectric at gmail.com
Thu Aug 31 12:43:38 UTC 2017
Hi Tomaz,
2017-08-31 5:58 GMT-03:00 Tomaz Canabrava <tcanabrava at kde.org>:
> Pats,
>
>
> On Mon, Aug 28, 2017 at 6:27 PM, patrick JP <patrickelectric at gmail.com>
> wrote:
>
>> I am trying to compile kirigami apk. This is my command line to use
>> cmake:
>>
>> cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/cmake-3.9/Modules/Platform/Android.cmake
>> \
>> -DQTANDROID_EXPORTED_TARGET=kirigami2gallery
>> -DANDROID_APK_DIR=../examples/galleryapp/ \
>> -DCMAKE_PREFIX_PATH=/opt/android-qt5/5.9.1/armeabi-v7a \
>> -DCMAKE_INSTALL_PREFIX=potato \
>> -DECM_DIR=/usr/share/ECM/cmake \
>> -DBUILD_EXAMPLES=ON
>>
>> 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 symbols: 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: *** [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.cpp.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é 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=/usr/share/ECM/toolchain/Android.cmake
-DQTANDROID_EXPORTED_TARGET=kirigami2gallery
-DANDROID_APK_DIR=../examples/galleryapp/ \
-DCMAKE_PREFIX_PATH=/opt/android-qt5/5.9.1/armeabi-v7a \
-DCMAKE_INSTALL_PREFIX=/mnt/hd/kirigami-install \
-DECM_DIR=/usr/share/ECM/cmake \
-DBUILD_EXAMPLES=ON -DCMAKE_SYSTEM_NAME="Android"
-DCMAKE_ANDROID_NDK=/opt/android-ndk -DQTANDROID_EXPORTED_TARGET=galleryapp
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=/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,
--
Patrick José Pereira
Electronics Engineer
Skype: patrickelectric434
IRC: patrickelectric
+55 (048) 99917-4777
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170831/bfb775e5/attachment-0001.html>
More information about the Plasma-devel
mailing list