Building necessitas alpha4
Ray Donnelly
mingw.android at gmail.com
Wed Aug 29 17:00:14 UTC 2012
Oh we also use Gold 2.22.52 by default which is very up to date and much faster.
On Wed, Aug 29, 2012 at 5:57 PM, Ray Donnelly <mingw.android at gmail.com> wrote:
> As I said, using Google's NDK will not work for building android qt (
> relocations error and libgnustl_static error -
> http://code.google.com/p/android/issues/detail?id=36472 ).
>
> Rather than building your own NDK from Google's code (and thus ending
> up with the same bugs) you should either use mine (it's the one we
> supply and use with Necessitas):
>
> http://mingw-and-ndk.googlecode.com/files/android-ndk-r8b-ma-windows.7z
> http://mingw-and-ndk.googlecode.com/files/android-ndk-r8b-ma-linux-x86.7z
> http://mingw-and-ndk.googlecode.com/files/android-ndk-r8b-ma-darwin-x86.7z
>
> ...or else build mine using the script we use:
>
> git at git.kde.org:necessitas-tools.git (master branch)
>
> look at build_ndk.sh in that repo.
>
> for building android qt, look at build_sdk.sh which calls
> android/androidconfigbuild.sh
>
> On Wed, Aug 29, 2012 at 5:44 PM, Peter Saunderson <peteasa at gmail.com> wrote:
>> Hi Ray,
>>
>> Thanks for the warnings!
>>
>> I am using Googles android-ndk-r8b NDK, with the latest compilers (v4.6)
>> because I wanted to use the same NDK I used for OpenCV that I also am using
>> on the same project - in theory it should keep things simple. Thanks for
>> the answers also about using "android:" to selective configure stuff. I
>> will look out for the failures that you mention.. I might end up building
>> the Google compiler and linker at this rate..
>>
>> Peter.
>>
>>
>> On 29/08/12 17:33, Ray Donnelly wrote:
>>>
>>> Hi Peter,
>>>
>>> Which NDK are you using? Ours or Google's? Google's won't work for 2
>>> reasons, their libgnustl_static.a has it's symbols invisible and also
>>> their linker has a bug in it to do with a specific relocation type.
>>>
>>> Also are you using the unstable branch of the Qt sources?
>>>
>>> Only libQtCore4.so gets linked to libgnustl_static.a:
>>>
>>> from qt-src\src\corelib\corelib.pro
>>>
>>> android: {
>>> #add whole gnu_stl library to QtCore
>>> LIBS_PRIVATE += -Wl,--whole-archive
>>> $$ANDROID_SOURCES_CXX_STL_LIBDIR/libgnustl_static.a
>>> -Wl,--no-whole-archive
>>> }
>>>
>>> On android libstdc++ is just a few small support functions for C++.
>>>
>>> On Wed, Aug 29, 2012 at 4:14 PM, Peter Saunderson <peteasa at gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am building from source and plan to run on an android 4.1.1. I am
>>>> using
>>>> Ubuntu 64bit machine for the build and am using android-ndk-r8b.
>>>>
>>>> I find errors such as
>>>> obj/release/JSBase.o:(.ARM.extab.text.JSReportExtraMemoryCost+0x0):
>>>> undefined reference to `__gxx_personality_v0'
>>>>
>>>> that are fixed by adding to the .pro file
>>>> QMAKE_LIBS += -lgnustl_shared
>>>>
>>>> because in android the shared library file is named "libgnustl_shared.so"
>>>> instead of "libstdc++.so" as on other platforms (see
>>>> CPLUSPLUS-SUPPORT.html).
>>>>
>>>> I tried to make this change in mkspecs/android-g++/qmake.conf but had
>>>> other
>>>> errors. Is there a construct that I can use in the .pro files such as
>>>> neon:*-g++* { ... }
>>>> that will make this change for just android builds of Qt? Is there a
>>>> better
>>>> way to fix this linker problem in necessitas?
>>>>
>>>> Thanks
>>>>
>>>> Peter.
>>>> _______________________________________________
>>>> Necessitas-devel mailing list
>>>> Necessitas-devel at kde.org
>>>> https://mail.kde.org/mailman/listinfo/necessitas-devel
>>
>>
More information about the Necessitas-devel
mailing list