[Marble-devel] Using Marble library with Qt Embedded

Jeremie Scheer jeremie.scheer at armadeus.com
Fri Jun 1 16:09:15 UTC 2012


Hi,

I've tried to install Qt libraries and fonts on my embedded system at 
the same path as on my host PC (paths that are in CMakeCache.txt), but 
it doesn't work neither.

I'm really asking myself if Marble is well configured with CMake for my 
system and if toolchainfile.cmake environment parameters are correct. 
The problem here is that my build environment is not the same as in the 
system where Marble is executed. So paths in toolchainfile.cmake are not 
the right ones for the embedded system.
And my build environment is also different from the standard Linux 
environment, as I must cross-compile libraries and applications for ARM 
platforms.

I made further investigations in Qt sources and it seemed to be crashing 
into the *processEvents* method of *QEventLoop* on this line exactly :
return d->threadData->eventDispatcher->processEvents(flags);

The event dispatcher is correctly instanciated, but it doesn't even 
enter its processEvents() method.

This bug really desperates me now, as I don't even find the beginning of 
a solution... Maybe someone has the slightest idea ? Or could explain me 
the correct way to cross-compile Marble for ARM system, if there is a way...

Thanks,
-- 
Jérémie Scheer
Software Engineer
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
Armadeus Systems - A new vision of the embedded world
http://www.armadeus.com


On 05/31/2012 06:20 PM, Jeremie Scheer wrote:
> Hi,
>
> I've put traces in Qt sources to see where it crashes. And it seemed 
> to be crashing after the mapWidget->show() when I call qApp->exec and 
> when it is launching the *eventLoop* in Qt.
>
> So is there an element in Marble that is related to the eventLoop that 
> could block its execution ?
>
> Regards,
> -- 
> Jérémie Scheer
> Software Engineer
> Tel: +33 (0)9 72 29 41 44
> Fax: +33 (0)9 72 28 79 26
> Armadeus Systems - A new vision of the embedded world
> http://www.armadeus.com
>
>
> On 05/31/2012 02:57 PM, Jeremie Scheer wrote:
>> Hi Dennis,
>>
>> In fact I compile Marble and my application with Buildroot, that is a 
>> package compiler for embedded system. So all packages are compiled on 
>> my host PC and then run on the embedded system.
>>
>> This is why Qt headers and libraries paths are not the same in 
>> CMakeCache.txt (paths where Qt embedded is intalled on my PC) and on 
>> my system. But Qt libraries can be load on it with LD_LIBRARY_PATH, 
>> that is correctly set.
>>
>> On my PC, Marble is configured with CMake like this:
>>
>>     cmake marble \
>>             -DCMAKE_TOOLCHAIN_FILE="toolchainfile.cmake" \
>>             -DCMAKE_INSTALL_PREFIX="/usr"
>>
>>
>> /toolchainfile.cmake/ initializes all necessary CMake environment 
>> variables:
>>
>>     set(CMAKE_SYSTEM_NAME Linux)
>>     set(CMAKE_C_COMPILER
>>     /srv/developpements/BEF2012/software/bsp/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc)
>>     set(CMAKE_CXX_COMPILER
>>     /srv/developpements/BEF2012/software/bsp/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-g++)
>>     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -Os -pipe -Os 
>>     -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
>>     CACHE STRING "Buildroot CFLAGS" FORCE)
>>     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -Os -pipe -Os 
>>     -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
>>     CACHE STRING "Buildroot CXXFLAGS" FORCE)
>>     set(CMAKE_INSTALL_SO_NO_EXE 0)
>>     set(CMAKE_PROGRAM_PATH
>>     "/srv/developpements/BEF2012/software/bsp/buildroot/output/host/usr/bin")
>>     set(CMAKE_FIND_ROOT_PATH
>>     "/srv/developpements/BEF2012/software/bsp/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot")
>>     set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
>>     set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
>>     set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
>>     set(ENV{PKG_CONFIG_SYSROOT_DIR}
>>     "/srv/developpements/BEF2012/software/bsp/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot")
>>
>>
>> And then Marble is compiled with arm-linux-g++ compiler.
>>
>> If the problem is related to static functions, it is strange that the 
>> QSettings bug made my app crash on both x86 and ARM system whereas 
>> this bug (planetList) only affects ARM system.
>>
>> Regards,
>> -- 
>> Jérémie Scheer
>> Software Engineer
>> Tel: +33 (0)9 72 29 41 44
>> Fax: +33 (0)9 72 28 79 26
>> Armadeus Systems - A new vision of the embedded world
>> http://www.armadeus.com
>>
>>
>> On 05/31/2012 01:52 PM, Dennis Nienhüser wrote:
>>> Hi Jeremie,
>>>
>>> interesting - note that Planet::planetList is a static function again.
>>>
>>> I'm wondering if there's some more serious problem in the way how 
>>> Marble was compiled wrt to Qt embedded, or how the environment looks 
>>> like when running Marble. Are there any traces to the Qt version 
>>> installed on the system maybe? The following checks (in the build 
>>> dir) might be useful to determine that:
>>>
>>> grep '^QT_.*_INCLUDE_DIR:PATH=' CMakeCache.txt
>>> grep '^QT_.*_LIBRARY.*FILEPATH=' CMakeCache.txt
>>> ldd src/marble | grep libQt
>>>
>>> Regards,
>>> Dennis
>>>
>>> Am 31.05.2012 12:09, schrieb Jeremie Scheer:
>>>> Hi,
>>>>
>>>> I've identified what caused the segfault on ARM : it was crashing 
>>>> during the initialization of the QStringList in Planet.cpp - 
>>>> planetList().
>>>>
>>>> I don't know why but the following code l.364 made the app crash, 
>>>> but only on embedded ARM system:
>>>>
>>>>     planets << "mercury"
>>>>     << "venus"
>>>>     << "earth"
>>>>     << "mars"
>>>>     << "jupiter"
>>>>     << "saturn"
>>>>     << "uranus"
>>>>     << "neptune"
>>>>     << "pluto"
>>>>     << "sun"
>>>>     << "moon"
>>>>     << "sky";
>>>>
>>>> So I replaced it by :
>>>>
>>>>     QString planetsStringList =
>>>>     "mercury,venus,earth,mars,jupiter,saturn,uranus,neptune,pluto,sun,moon,sky";
>>>>         planets = planetsStringList.split(",");
>>>>
>>>>
>>>> Now MarbleWidget is correctly instanciated but my app crashes on 
>>>> another *Segmentation fault* after the instruction 
>>>> mapWidget->show();, only on ARM.
>>>>
>>>> Regards,
>>>> -- 
>>>> Jérémie Scheer
>>>> Software Engineer
>>>> Tel: +33 (0)9 72 29 41 44
>>>> Fax: +33 (0)9 72 28 79 26
>>>> Armadeus Systems - A new vision of the embedded world
>>>> http://www.armadeus.com
>>>>
>>>>
>>>> On 05/30/2012 10:50 AM, Jeremie Scheer wrote:
>>>>> Hi Dennis,
>>>>>
>>>>> I tried to compile Marble with the latest master where you have 
>>>>> commited the fix for static QSettings and I tested it with my 
>>>>> application.
>>>>>
>>>>> The good news is that it doesn't crash anymore on a QMutex 
>>>>> deadlock on QVFB or ARM platforms. And without the little trick 
>>>>> I'd done in Qt to fix it (I commented a QMutex lock).
>>>>>
>>>>> For the Segmentation Fault crash, I've no more bitmaps loading 
>>>>> warnings with your commit but it still crashes on my ARM embedded 
>>>>> system.
>>>>> The crash happens just when the MarbleWidget object is initialized 
>>>>> as it tries to get profiles for the MarbleWidgetPrivate object 
>>>>> (MarbleWidget.cpp : l.95).
>>>>>
>>>>> Regards,
>>>>
>>>>
>>>> _______________________________________________
>>>> Marble-devel mailing list
>>>> Marble-devel at kde.org
>>>> https://mail.kde.org/mailman/listinfo/marble-devel
>>
>>
>> _______________________________________________
>> Marble-devel mailing list
>> Marble-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/marble-devel
>
>
>
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120601/50107a53/attachment.html>


More information about the Marble-devel mailing list