Dear all I manage to compile my code with Qt 5 but when I run the program and encountered the following error: QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 16. Aborted (core dumped) I have googled for a few days and did not find any luck. Anyone could help me with this? Thanks in advance. I am running Qt5 on ubuntu 14.04 64bit. The source code is simple from sample code of the marble library (a globe map library): #include <QtWidgets/QApplication> #include <marble/MarbleWidget.h> int main(int argc, char** argv) { QApplication app(argc, argv); // Load Marble using OpenStreetMap in Mercator projection Marble::MarbleWidget *mapWidget = new Marble::MarbleWidget; mapWidget->setProjection(Marble::Mercator); mapWidget->setMapThemeId("earth/openstreetmap/openstreetmap.dgml"); mapWidget->setWindowTitle("Hello Marble!"); mapWidget->show(); return app.exec(); } My cmake file to build is below: CMAKE_MINIMUM_REQUIRED (VERSION 2.8.11) SET (TARGET hello-marble) PROJECT (${TARGET}) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) # Find the Qt modules library find_package(Qt5Widgets REQUIRED) SET (QT_LIBRARIES ${QT_LIBRARIES} Qt5::Widgets) SET (MARBLE_LIBRARIES ${MARBLE_LIBRARIES} marblewidget) SET (LIBS ${LIBS} ${MARBLE_LIBRARIES} ${QT_LIBRARIES}) ADD_EXECUTABLE (${TARGET} marble_test.cpp) TARGET_LINK_LIBRARIES (${TARGET} ${LIBS}) My gdb traceback of my code is: Program received signal SIGABRT, Aborted. 0x00007ffff56d1cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff56d1cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff56d50d8 in __GI_abort () at abort.c:89 #2 0x00007ffff600ab76 in QMessageLogger::fatal(char const*, ...) const () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5 #3 0x00007ffff6266175 in QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void const*), void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*) () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5 #4 0x00007ffff677dc5a in ?? () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5 #5 0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb58, env=env@entry=0x7fffffffdb68) at dl-init.c:78 #6 0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36 #7 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdb58, env=0x7fffffffdb68) at dl-init.c:126 #8 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2 #9 0x0000000000000001 in ?? () #10 0x00007fffffffdf7a in ?? () #11 0x0000000000000000 in ?? () Reproducible: Always Steps to Reproduce: 1. See the details for code 2. 3.
Does it work if you change marblewidget to marblewidget-qt5 in the CMakeLists.txt (in the SET (MARBLE_LIBRAR... line)? I'm afraid you're linking to an older marblewidget library on your system, or a qt4 version of it. We changed the library name some time ago from marblewidget to marblewidget-qt5 for the qt5 version. If that is true, we possibly have to change our CMakeLists.txt.external files in the examples.
Created attachment 93426 [details] attachment-4880-0.html Hi Dennis Thanks for your reply. 1) I managed to compile and running the marblewidget (sudo apt-get install libmarble-dev) with Qt 4. So the example on marble's webpage is working for Qt4. 2) There's no libmarblewidget-qt5 in ubuntu source repositories. I guess I need to download the source and compile install manually? But I did not find the official package for ubuntu and very few docs on marble working with Qt5. Please advise. Best regards, Zhang Qun On Fri, Jun 26, 2015 at 3:58 AM, Dennis Nienhüser <earthwings@gentoo.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=349555 > > Dennis Nienhüser <earthwings@gentoo.org> changed: > > What |Removed |Added > > ---------------------------------------------------------------------------- > CC| |earthwings@gentoo.org > > --- Comment #1 from Dennis Nienhüser <earthwings@gentoo.org> --- > Does it work if you change marblewidget to marblewidget-qt5 in the > CMakeLists.txt (in the SET (MARBLE_LIBRAR... line)? I'm afraid you're > linking > to an older marblewidget library on your system, or a qt4 version of it. We > changed the library name some time ago from marblewidget to > marblewidget-qt5 > for the qt5 version. > > If that is true, we possibly have to change our CMakeLists.txt.external > files > in the examples. > > -- > You are receiving this mail because: > You reported the bug.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.