Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross compiling Qt5.5 gives compiling errors
QtWS25 Last Chance

Cross compiling Qt5.5 gives compiling errors

Scheduled Pinned Locked Moved Installation and Deployment
embedded linuxcross compileqt5.5syntaxs errors
2 Posts 2 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kafanti
    wrote on last edited by
    #1

    Hello,

    I am trying to cross compile Qt5.4.2 for my Olimex A10 Lime board. I have managed to pass ./configure phase wtih these options,

    ./configure -v -debug -opensource -confirm-license -no-use-gold-linker
    -nomake examples -nomake tests -nomake tools -no-cups -no-pch -no-linuxfb
    -skip qtquick1 -skip declarative -skip multimedia -opengl es2 -no-eglfs
    -system-xcb -sysroot /mnt/lime-rootfs -device linux-sunxi-g++
    -device-option CROSS_COMPILE=arm-linux-gnueabihf- -prefix /opt/qt/sunxi

    And everything succeeded, architectures founded and qmake file created etc. But after this step I have just used "make" to compile. I don't know why but it failed to compile a particular file. Here is the logs where it fails,

    arm-linux-gnueabihf-g++ -c -pipe -I /mnt/lime-rootfs/usr/include -I /mnt/lime-rootfs/usr/include/arm-linux-gnueabihf -marm -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard --sysroot=/mnt/lime-rootfs -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_XKB -DQT_NO_CAST_FROM_ASCII -DMESA_EGL_NO_X11_HEADERS -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DQT_BUILD_PLATFORMSUPPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../3rdparty/freetype/builds/unix -I../3rdparty/freetype/src -I../3rdparty/freetype/include -Iaccessibility -I../3rdparty/atspi2 -Ilinuxaccessibility -I../../include -I../../include/QtPlatformSupport -I../../include/QtPlatformSupport/5.4.2 -I../../include/QtPlatformSupport/5.4.2/QtPlatformSupport -I../../include/QtCore/5.4.2 -I../../include/QtCore/5.4.2/QtCore -I../../include/QtGui/5.4.2 -I../../include/QtGui/5.4.2/QtGui -I../../include/QtGui -I../../include/QtDBus -I../../include/QtCore -I.moc -I../../mkspecs/devices/linux-sunxi-g++ -o .obj/qeglplatformcursor.o eglconvenience/qeglplatformcursor.cpp
    eglconvenience/qeglplatformcursor.cpp: In member function ‘bool QEGLPlatformCursor::setCurrentCursor(QCursor*)’:
    eglconvenience/qeglplatformcursor.cpp:234:15: error: expected unqualified-id before numeric constant
    eglconvenience/qeglplatformcursor.cpp:235:27: error: ‘newShape’ was not declared in this scope
    eglconvenience/qeglplatformcursor.cpp:242:22: error: ‘newShape’ was not declared in this scope
    Makefile:4370: recipe for target '.obj/qeglplatformcursor.o' failed
    make[3]: *** [.obj/qeglplatformcursor.o] Error 1
    make[3]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase/src/platformsupport'
    Makefile:473: recipe for target 'sub-platformsupport-make_first' failed
    make[2]: *** [sub-platformsupport-make_first] Error 2
    make[2]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase/src'
    Makefile:45: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase'
    Makefile:60: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    Can someone please help me to find out what is exactly the problem? is that a bug or is it about the configurations? It seems like a bug atleast compiler says that :S

    here is the function,

    bool QEGLPlatformCursor::setCurrentCursor(QCursor *cursor)
    {
        if (!m_visible)
            return false;
    
        const Qt::CursorShape newShape = cursor ? cursor->shape() : Qt::ArrowCursor; /* line 234 */
        if (m_cursor.shape == newShape && newShape != Qt::BitmapCursor)
            return false;
    
        if (m_cursor.shape == Qt::BitmapCursor) {
            m_cursor.customCursorImage = QImage();
            m_cursor.customCursorPending = false;
        }
        m_cursor.shape = newShape; /* line 242 */
        if (newShape != Qt::BitmapCursor) { // standard cursor
            const float ws = (float)m_cursorAtlas.cursorWidth / m_cursorAtlas.width,
                        hs = (float)m_cursorAtlas.cursorHeight / m_cursorAtlas.height;
            m_cursor.textureRect = QRectF(ws * (m_cursor.shape % m_cursorAtlas.cursorsPerRow),
                                          hs * (m_cursor.shape / m_cursorAtlas.cursorsPerRow),
                                          ws, hs);
            m_cursor.hotSpot = m_cursorAtlas.hotSpots[m_cursor.shape];
            m_cursor.texture = m_cursorAtlas.texture;
            m_cursor.size = QSize(m_cursorAtlas.cursorWidth, m_cursorAtlas.cursorHeight);
        } else {
            QImage image = cursor->pixmap().toImage();
            m_cursor.textureRect = QRectF(0, 0, 1, 1);
            m_cursor.hotSpot = cursor->hotSpot();
            m_cursor.texture = 0; // will get updated in the next render()
            m_cursor.size = image.size();
            m_cursor.customCursorImage = image;
            m_cursor.customCursorPending = true;
        }
        return true;
    }
    

    Thank you,
    Sina

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lis82
      wrote on last edited by
      #2

      Its ugly workaround, but can helps.

      Open your <EGL/eglplatform.h> in text editor and after strings:
      #include <X11/Xlib.h>
      #include <X11/Xutil.h>

      add following strings:
      #undef None
      #undef CursorShape

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved