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. ‘mimetype_database’ was not declared in this scope while cross compiling qt5.15.17

‘mimetype_database’ was not declared in this scope while cross compiling qt5.15.17

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    AKannan
    wrote on last edited by AKannan
    #1

    Hi I am cross compiling qt5.15.17 using a the yocto SDK for a development board. After configuration when I ran make install i get the following error:

    In file included from global/qt_pch.h:56:
    mimetypes/qmimeprovider.cpp: In constructor ‘QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate*, QMimeXMLProvider::InternalDatabaseEnum)’:
    mimetypes/qmimeprovider.cpp:637:30: error: ‘mimetype_database’ was not declared in this scope
         Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
                                  ^~~~~~~~~~~~~~~~~
    global/qglobal.h:126:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    mimetypes/qmimeprovider.cpp:637:30: note: suggested alternative: ‘mimeTypeForName’
         Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
                                  ^~~~~~~~~~~~~~~~~
    global/qglobal.h:126:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    mimetypes/qmimeprovider.cpp:638:52: error: ‘MimeTypeDatabaseOriginalSize’ was not declared in this scope
         Q_STATIC_ASSERT_X(sizeof(mimetype_database) <= MimeTypeDatabaseOriginalSize,
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    global/qglobal.h:126:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    mimetypes/qmimeprovider.cpp:638:52: note: suggested alternative: ‘QMimeDatabasePrivate’
         Q_STATIC_ASSERT_X(sizeof(mimetype_database) <= MimeTypeDatabaseOriginalSize,
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    global/qglobal.h:126:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    

    Qt configuration command:

    ./configure -opensource -confirm-license -prefix /usr/local/qt5 -device linux-custom-device-g++ -device-option CROSS_COMPILE=$COMPILER_PATH -sysroot $TSYSROOT -nomake tests -no-kms -no-gbm -no-sse2 -no-sse3 -no-xcb -release -skip qtlocation -skip webengine -eglfs -opengl es2 -qpa wayland -shared
    

    Host machine : Ubuntu 22.04

    What should I do to fix this issue ?

    I did tried to compile qt5.14.2 with the same configuration and it works fine. I am also getting the same error when I try to compile 5.15.0 as well.

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      Qt 5.15 isn't supported anymore, just to begin with ;-)
      MimeTypeDatabaseOriginalSize is a static constexpr, the absence of which suggests that somehow configure has flipped FEATURE_mimetype to OFF. Probably a dependency has been added after 5.14. Please check the configure output for more information.
      Please also try Qt 6 (at least 6.5, better 6.9) and see if it still happens.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      1

      • Login

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