Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109175

SVG image format not working if statically linked - QSvgPlugin, QSvgIconPlugin get ignored

    XMLWordPrintable

Details

    • Linux/X11

    Description

      Conan is used to build Qt with static libs. The minimal example then links against Qt6::Svg and both plugins "QSvgPlugin", "QSvgIconPlugin" are enabled by calling "qt_import_plugins" like so:

      qt_import_plugins(svgbug
      INCLUDE_BY_TYPE imageformats Qt6::QSvgPlugin
      INCLUDE_BY_TYPE iconengines Qt6::QSvgIconPlugin)
      

      When the application starts "QImageReader::supportedImageFormats();" returns following image formats: "bmp", "pbm", "pgm", "png", "ppm", "xbm", "xpm" and the Button doesn't show the SVG icon.

      Here is the complete linker command

      /usr/bin/c++ -g  -Wl,--gc-sections -Wl,--enable-new-dtags CMakeFiles/svgbug.dir/main.cpp.o "CMakeFiles/svgbug.dir/cmake-build-debug/.rcc/qrc_icons.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/egldeviceintegrations/objects-Release/QEglFSEmulatorIntegrationPlugin_init/QEglFSEmulatorIntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/egldeviceintegrations/objects-Release/QEglFSKmsEglDeviceIntegrationPlugin_init/QEglFSKmsEglDeviceIntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/egldeviceintegrations/objects-Release/QEglFSKmsGbmIntegrationPlugin_init/QEglFSKmsGbmIntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/egldeviceintegrations/objects-Release/QEglFSX11IntegrationPlugin_init/QEglFSX11IntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/xcbglintegrations/objects-Release/QXcbEglIntegrationPlugin_init/QXcbEglIntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/xcbglintegrations/objects-Release/QXcbGlxIntegrationPlugin_init/QXcbGlxIntegrationPlugin_init.cpp.o" "/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/plugins/platforms/objects-Release/QXcbIntegrationPlugin_init/QXcbIntegrationPlugin_init.cpp.o" -o bin/svgbug   -L/home/bjoern/.conan/data/qtsvg/6.4.1/qt/everywhere/package/10f0c627e610d0717908f15bf74e2d3b1e8d7cd7/lib  -L/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib  -Wl,-rpath,/home/bjoern/.conan/data/qtsvg/6.4.1/qt/everywhere/package/10f0c627e610d0717908f15bf74e2d3b1e8d7cd7/lib:/home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/Gui_resources_1/.rcc/qrc_qpdf.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/Gui_resources_2/.rcc/qrc_gui_shaders.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/Widgets_resources_1/.rcc/qrc_qstyle.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/objects-Release/EglFSDeviceIntegrationPrivate_resources_1/.rcc/qrc_cursor.cpp.o /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Core.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Core.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Gui.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Widgets.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Xml.a /home/bjoern/.conan/data/qtsvg/6.4.1/qt/everywhere/package/10f0c627e610d0717908f15bf74e2d3b1e8d7cd7/lib/libQt6Svg.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/egldeviceintegrations/libqeglfs-emu-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/egldeviceintegrations/libqeglfs-kms-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/egldeviceintegrations/libqeglfs-x11-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/xcbglintegrations/libqxcb-egl-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/xcbglintegrations/libqxcb-glx-integration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/./plugins/platforms/libqxcb.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6EglFsKmsGbmSupport.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6EglFsKmsSupport.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6KmsSupport.a /usr/lib/libdrm.so /usr/lib/libgbm.so /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6EglFSDeviceIntegration.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6FbSupport.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6InputSupport.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6DeviceDiscoverySupport.a /usr/lib/libudev.so /usr/lib/libmtdev.so /usr/lib/libts.so /usr/lib/libinput.so /usr/lib/libxcb-glx.so /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6XcbQpa.a /usr/lib/libX11-xcb.so /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6OpenGL.a /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Gui.a /usr/lib/libGLX.so /usr/lib/libOpenGL.so /usr/lib/libEGL.so /usr/lib/libpng.so /usr/lib/libharfbuzz.so.0.50301.0 /usr/lib/libmd4c.so.0.4.8 /usr/lib/libfreetype.so /usr/lib/libfontconfig.so /usr/lib/libX11.so /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6DBus.a /usr/lib/libdbus-1.so /home/bjoern/.conan/data/qtbase/6.4.1/qt/everywhere/package/e2e664e236792e99b45e3956c71f699aa733c352/lib/libQt6Core.a /usr/lib/libz.so /usr/lib/libdouble-conversion.so.3.2.0 /usr/lib/libb2.so -lm /usr/lib/libicui18n.so /usr/lib/libicuuc.so /usr/lib/libicudata.so /usr/lib/libpcre2-16.so /usr/lib/libzstd.so.1.5.2 -ldl /usr/lib/libglib-2.0.so /usr/lib/libgthread-2.0.so /usr/lib/librt.a /usr/lib/libxkbcommon.so /usr/lib/libxkbcommon-x11.so /usr/lib/libxkbcommon.so /usr/lib/libxcb-icccm.so /usr/lib/libxcb-image.so /usr/lib/libxcb-keysyms.so /usr/lib/libxcb-randr.so /usr/lib/libxcb-render-util.so /usr/lib/libxcb-shm.so /usr/lib/libxcb-sync.so /usr/lib/libxcb-xfixes.so /usr/lib/libxcb-render.so /usr/lib/libxcb-shape.so /usr/lib/libxcb-xkb.so /usr/lib/libxcb.so /usr/lib/libSM.so /usr/lib/libICE.so 
      
      

      It seems like the linker is missing to link against QSvgPlugin_init.cpp.o and QSvgIconPlugin_init.cpp.o

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            tereius Bjoern S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes