Building Qt-6.2.3 on Windows has troubles with tiff
-
Hi everyone,
To build Qt6, I am following the instructions at here:
https://doc.qt.io/qt-6/windows-building.html- This is the configure command:
..\src\configure.bat ^
-prefix "D:\Qt\6.2.3\install" ^
-shared -release -platform win32-msvc -opensource -confirm-license -make libs ^
-nomake tools -nomake examples -nomake tests -opengl desktop -nomake manual-tests -nomake benchmarks ^
-skip webengine -skip qtandroidextras -skip qtdoc -skip qtqa -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtsql -skip qtmultimedia -skip qtpurchasing -skip qtscxml -skip qtspeech -skip qttranslations -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip tiff -skip qtquickcontrols ^
-skip qtsensors -skip qtserialbus -skip qtserialport -skip qtconnectivity -skip qtscript -skip qtwayland ^
-no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-tiff ^Here is the output related to the tiff:
Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. no -- Generating done CMake Warning: Manually-specified variables were not used by the project: BUILD_qtquickcontrols BUILD_qtscript BUILD_tiff- Then I build:
cmake --build . --parallel
After building a while, the output shown as below:
Creating library qtbase\plugins\imageformats\qtiff.lib and object qtbase\plugins\imageformats\qtiff.exp tif_pixarlog.c.obj : error LNK2019: unresolved external symbol deflate referenced in function PixarLogEncode tif_zip.c.obj : error LNK2001: unresolved external symbol deflate tif_pixarlog.c.obj : error LNK2019: unresolved external symbol deflateEnd referenced in function PixarLogCleanup tif_zip.c.obj : error LNK2001: unresolved external symbol deflateEnd tif_pixarlog.c.obj : error LNK2019: unresolved external symbol inflate referenced in function PixarLogDecode tif_zip.c.obj : error LNK2001: unresolved external symbol inflate ... tif_zip.c.obj : error LNK2001: unresolved external symbol inflateInit_ qtbase\plugins\imageformats\qtiff.dll : fatal error LNK1120: 9 unresolved externals [54/5264] Building CXX object qtdeclarative\src\qml\CMakeFiles\Qml.dir\compiler\qv4instr_moth.cpp.obj ninja: build stopped: subcommand failed.Another clue is that the "tiff" folder doesn't appears inside folder D:\Qt\6.2.3\src\qtbase\src\3rdparty, though there are libjpeg, libpng, etc in there.
For me, with or without tiff does not matter, I just want to build complete.
So, I don't know what steps were wrong. -
Hi everyone,
To build Qt6, I am following the instructions at here:
https://doc.qt.io/qt-6/windows-building.html- This is the configure command:
..\src\configure.bat ^
-prefix "D:\Qt\6.2.3\install" ^
-shared -release -platform win32-msvc -opensource -confirm-license -make libs ^
-nomake tools -nomake examples -nomake tests -opengl desktop -nomake manual-tests -nomake benchmarks ^
-skip webengine -skip qtandroidextras -skip qtdoc -skip qtqa -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtsql -skip qtmultimedia -skip qtpurchasing -skip qtscxml -skip qtspeech -skip qttranslations -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip tiff -skip qtquickcontrols ^
-skip qtsensors -skip qtserialbus -skip qtserialport -skip qtconnectivity -skip qtscript -skip qtwayland ^
-no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-tiff ^Here is the output related to the tiff:
Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... yes Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. no -- Generating done CMake Warning: Manually-specified variables were not used by the project: BUILD_qtquickcontrols BUILD_qtscript BUILD_tiff- Then I build:
cmake --build . --parallel
After building a while, the output shown as below:
Creating library qtbase\plugins\imageformats\qtiff.lib and object qtbase\plugins\imageformats\qtiff.exp tif_pixarlog.c.obj : error LNK2019: unresolved external symbol deflate referenced in function PixarLogEncode tif_zip.c.obj : error LNK2001: unresolved external symbol deflate tif_pixarlog.c.obj : error LNK2019: unresolved external symbol deflateEnd referenced in function PixarLogCleanup tif_zip.c.obj : error LNK2001: unresolved external symbol deflateEnd tif_pixarlog.c.obj : error LNK2019: unresolved external symbol inflate referenced in function PixarLogDecode tif_zip.c.obj : error LNK2001: unresolved external symbol inflate ... tif_zip.c.obj : error LNK2001: unresolved external symbol inflateInit_ qtbase\plugins\imageformats\qtiff.dll : fatal error LNK1120: 9 unresolved externals [54/5264] Building CXX object qtdeclarative\src\qml\CMakeFiles\Qml.dir\compiler\qv4instr_moth.cpp.obj ninja: build stopped: subcommand failed.Another clue is that the "tiff" folder doesn't appears inside folder D:\Qt\6.2.3\src\qtbase\src\3rdparty, though there are libjpeg, libpng, etc in there.
For me, with or without tiff does not matter, I just want to build complete.
So, I don't know what steps were wrong.I have solved the issue.
After cleaning the output cache, configure generated correct output, "tiff" is no longer detected:
Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... no Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. no -
I have solved the issue.
After cleaning the output cache, configure generated correct output, "tiff" is no longer detected:
Further Image Formats: JasPer ................................. no MNG .................................... no TIFF ................................... no Using system libtiff ................. no WEBP ................................... yes Using system libwebp ................. noI have another issue related to zlib and zstd.
When run the configure, the output shows zlib and many other libs are missing as below.
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.0.8") -- Could NOT find WrapZLIB (missing: WrapZLIB_FOUND) (Required is at least version "1.0.8") -- Could NOT find ZSTD: Found unsuitable version "", but required is at least "1.3" (found ZSTD_LIBRARY-NOTFOUND) ...My question is how can I tell the configure to search zlib and others from my custom folders for libraries's headers and libs?
Thanks.
-
I have another issue related to zlib and zstd.
When run the configure, the output shows zlib and many other libs are missing as below.
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.0.8") -- Could NOT find WrapZLIB (missing: WrapZLIB_FOUND) (Required is at least version "1.0.8") -- Could NOT find ZSTD: Found unsuitable version "", but required is at least "1.3" (found ZSTD_LIBRARY-NOTFOUND) ...My question is how can I tell the configure to search zlib and others from my custom folders for libraries's headers and libs?
Thanks.
-
@SteveHa You can pass -I INCLUDE_PATH and -L LIB_PATH to configure command.
Also, you can check what parameters it supports passing it -h parameter. -
@jsulm Thank you for your answer. I did it before posting the question here but it didn't work. I suppose the path relates to ZLIB_LIBRARY and ZLIB_INCLUDE_DIR, but I don't know what the proper way to set those variables.
@SteveHa said in Building Qt-6.2.3 on Windows has troubles with tiff:
proper way to set those variables
If those are environment variables then on Windows do this in the terminal where you build Qt:
set ZLIB_LIBRARY=PATH_TO_ZLIB_LIBS set ZLIB_INCLUDE_DIR=PATH_TO_ZLIB_INCLUDES -
@SteveHa said in Building Qt-6.2.3 on Windows has troubles with tiff:
proper way to set those variables
If those are environment variables then on Windows do this in the terminal where you build Qt:
set ZLIB_LIBRARY=PATH_TO_ZLIB_LIBS set ZLIB_INCLUDE_DIR=PATH_TO_ZLIB_INCLUDES@jsulm Unfortunately I have not configured successfully with "set ZLIB_ .." way, but I retried with your first recommendation using "-I " and "-L" (did it after cleaning all the output) I got errors as below:
ERROR: Feature "system_zlib": Forcing to "ON" breaks its condition: WrapZLIB_FOUND Condition values dump: WrapZLIB_FOUND = "FALSE"Note that I didn't specify WrapZlib in the configure's parameters.
Could you tell me the way to fix the conflict? -
@jsulm Unfortunately I have not configured successfully with "set ZLIB_ .." way, but I retried with your first recommendation using "-I " and "-L" (did it after cleaning all the output) I got errors as below:
ERROR: Feature "system_zlib": Forcing to "ON" breaks its condition: WrapZLIB_FOUND Condition values dump: WrapZLIB_FOUND = "FALSE"Note that I didn't specify WrapZlib in the configure's parameters.
Could you tell me the way to fix the conflict?