Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ObjectNotFound issue with static windows build. #20

Open
1 task
Poikilos opened this issue Nov 26, 2020 · 2 comments
Open
1 task

Fix ObjectNotFound issue with static windows build. #20

Poikilos opened this issue Nov 26, 2020 · 2 comments
Labels
deferred - C++ only Deferred since master-python branch is now default. This issue applies to old deprecated-cpp-master

Comments

@Poikilos
Copy link
Owner

Poikilos commented Nov 26, 2020

image

Not tried yet

  • mzimmers on problems creating static Qt (the thread for static building recommended by Qt here) says to add -skip qtwebengine to the cmd /c "configure.bat call, and add a second call: cmd /c "configure.bat -redo -opengl desktop"
@Poikilos
Copy link
Owner Author

Poikilos commented Nov 26, 2020

Switching to zip helps but leaves this error:
image

@Poikilos
Copy link
Owner Author

Poikilos commented Nov 26, 2020

Results:

mingw32-make[3]: Entering directory 'C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/src/corelib'
C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Release install
mingw32-make[4]: Entering directory 'C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/src/corelib'
g++ -c -include .pch\release\qt_pch.h -fno-keep-inline-dllexport -O3 -std=c++1z -ffunction-sections -fdata-sections -fexceptions -mthreads -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -I. -I..\3rdparty\zlib\src -Iglobal -I..\3rdparty\md5 -I..\3rdparty\md4 -I..\3rdparty\sha3 -I..\3rdparty -I..\3rdparty\double-conversion\include -I..\3rdparty\harfbuzz\src -I..\3rdparty\tinycbor\src -I.rcc\release -I..\..\include -I..\..\include\QtCore -I..\..\include\QtCore\5.15.2 -I..\..\include\QtCore\5.15.2\QtCore -Itmp -I.moc\release -I.tracegen\release -I..\3rdparty\pcre2\src -I..\..\mkspecs\win32-g++  -o .obj\release\qmimeprovider.o mimetypes\qmimeprovider.cpp
In file included from global\qt_pch.h:56:
mimetypes\qmimeprovider.cpp: In constructor 'QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate*, QMimeXMLProvider::InternalDatabaseEnum)':
mimetypes\qmimeprovider.cpp:638: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:121: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:30: note: suggested alternative: 'mimeTypeForName'
     Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
                              ^~~~~~~~~~~~~~~~~
global/qglobal.h:121: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:639:52: error: 'MimeTypeDatabaseOriginalSize' was not declared in this scope
     Q_STATIC_ASSERT_X(sizeof(mimetype_database) <= MimeTypeDatabaseOriginalSize,
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
global/qglobal.h:121: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:639:52: note: suggested alternative: 'QMimeDatabasePrivate'
     Q_STATIC_ASSERT_X(sizeof(mimetype_database) <= MimeTypeDatabaseOriginalSize,
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
global/qglobal.h:121:68: note: in definition of macro 'Q_STATIC_ASSERT_X'
 #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                    ^~~~~~~~~

then several targets failing followed by Target 'install' not remade because of errors.
2020-11-26_static-build-errors.txt

See https://forum.qt.io/topic/118511/static-qt-environment-error-using-qt5-15-0/5

  • The same error occurs after installing strawberryperl. Therefore, both of the following apparently fail (according to the forum, the reason for failure is that the generate script doesn't generate the mimetypes):
    • C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\src\corelib\mimetypes\mime\generate.bat (says "punt" to perl if perl is in the path)
    • C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\src\corelib\mimetypes\mime\generate.pl

@Poikilos Poikilos added the deferred - C++ only Deferred since master-python branch is now default. This issue applies to old deprecated-cpp-master label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred - C++ only Deferred since master-python branch is now default. This issue applies to old deprecated-cpp-master
Projects
None yet
Development

No branches or pull requests

1 participant