Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Linux: build QtWebKit against a specific version of ICU?
Forum Updated to NodeBB v4.3 + New Features

Linux: build QtWebKit against a specific version of ICU?

Scheduled Pinned Locked Moved Solved Qt WebKit
7 Posts 2 Posters 2.7k Views 2 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
    agarny
    wrote on last edited by
    #1

    Hi,

    I build my project using Qt 5.9.5 LTS. I need QtWebKit, so I build it myself using the latest commit from https://github.com/qt/qtwebkit.

    It all works fine on Windows and macOS, but I am having problems on Linux. Basically, I am using Ubuntu 16.04 LTS to build QtWebKit. That version of Ubuntu comes with version 55.1 of the ICU library while I need to use version 56.1 (i.e. the same version as the one shipped with Qt).

    So, I decided to build ICU myself and modified Source/cmake/OptionsQt.cmake so that ICU_INCLUDE_DIRS, ICU_I18N_LIBRARIES and ICU_LIBRARIES point to my copy of ICU, i.e. version 56.1. Sure enough, QtWebKit gets built against version 56.1 of ICU. However, it also gets linked against version 55.1:

    $ ldd libQt5WebKit.so | grep libicu
    	libicuuc.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicuuc.so.56 (0x00007f8b24615000)
    	libicui18n.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicui18n.so.56 (0x00007f8b23f16000)
    	libicudata.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicudata.so.56 (0x00007f8b1e2fd000)
    	libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f8b1df69000)
    	libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8b19711000)
    

    So, what can be done to prevent QtWebKit from linking against version 55.1 of ICU (or whatever version is available on one's Ubuntu system) and just link against my copy of ICU?

    FWIW, I checked the Linux binaries for QtWebKit 5.212.0 Alpha 2 and an ldd on it shows that it is also built against (or needs, rather) both versions 55.1 and 56.1 of ICU...?!

    So, any help on this would be much appreciated as I am clearly missing something. @Konstantin-Tokarev?

    Cheers, Alan.

    K 1 Reply Last reply
    0
    • A Offline
      A Offline
      agarny
      wrote on last edited by
      #2

      Ok, it's actually working. A colleague and I had a closer look at the "problem" and he suggested checking the dependencies of the other libraries needed by QtWebKit. As it happens, QtWebKit depends on several system libraries, some of which depending on the system version of ICU, i.e. 55.1 on Ubuntu 16.04 LTS while 60.2 on Ubuntu 18.04 LTS. Fair enough. Problem solved. Yeah! :)

      K 1 Reply Last reply
      0
      • A agarny

        Hi,

        I build my project using Qt 5.9.5 LTS. I need QtWebKit, so I build it myself using the latest commit from https://github.com/qt/qtwebkit.

        It all works fine on Windows and macOS, but I am having problems on Linux. Basically, I am using Ubuntu 16.04 LTS to build QtWebKit. That version of Ubuntu comes with version 55.1 of the ICU library while I need to use version 56.1 (i.e. the same version as the one shipped with Qt).

        So, I decided to build ICU myself and modified Source/cmake/OptionsQt.cmake so that ICU_INCLUDE_DIRS, ICU_I18N_LIBRARIES and ICU_LIBRARIES point to my copy of ICU, i.e. version 56.1. Sure enough, QtWebKit gets built against version 56.1 of ICU. However, it also gets linked against version 55.1:

        $ ldd libQt5WebKit.so | grep libicu
        	libicuuc.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicuuc.so.56 (0x00007f8b24615000)
        	libicui18n.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicui18n.so.56 (0x00007f8b23f16000)
        	libicudata.so.56 => /home/alan/OpenCOR/distrib/linux/icu/ext/lib/libicudata.so.56 (0x00007f8b1e2fd000)
        	libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f8b1df69000)
        	libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8b19711000)
        

        So, what can be done to prevent QtWebKit from linking against version 55.1 of ICU (or whatever version is available on one's Ubuntu system) and just link against my copy of ICU?

        FWIW, I checked the Linux binaries for QtWebKit 5.212.0 Alpha 2 and an ldd on it shows that it is also built against (or needs, rather) both versions 55.1 and 56.1 of ICU...?!

        So, any help on this would be much appreciated as I am clearly missing something. @Konstantin-Tokarev?

        Cheers, Alan.

        K Offline
        K Offline
        Konstantin Tokarev
        wrote on last edited by
        #3

        @agarny said in Linux: build QtWebKit against a specific version of ICU?:

        So, I decided to build ICU myself and modified Source/cmake/OptionsQt.cmake so that ICU_INCLUDE_DIRS, ICU_I18N_LIBRARIES and ICU_LIBRARIES point to my copy of ICU, i.e. version 56.1

        FWIW, you could just pass this variables to cmake command line without modifying sources, or even point PKG_CONFIG_PATH environment variable to pkgconfig directory of your ICU

        A 1 Reply Last reply
        0
        • A agarny

          Ok, it's actually working. A colleague and I had a closer look at the "problem" and he suggested checking the dependencies of the other libraries needed by QtWebKit. As it happens, QtWebKit depends on several system libraries, some of which depending on the system version of ICU, i.e. 55.1 on Ubuntu 16.04 LTS while 60.2 on Ubuntu 18.04 LTS. Fair enough. Problem solved. Yeah! :)

          K Offline
          K Offline
          Konstantin Tokarev
          wrote on last edited by
          #4

          @agarny said in Linux: build QtWebKit against a specific version of ICU?:

          QtWebKit depends on several system libraries, some of which depending on the system version of ICU

          Out of curiosity, which library depends on system ICU in your case?

          1 Reply Last reply
          0
          • K Konstantin Tokarev

            @agarny said in Linux: build QtWebKit against a specific version of ICU?:

            So, I decided to build ICU myself and modified Source/cmake/OptionsQt.cmake so that ICU_INCLUDE_DIRS, ICU_I18N_LIBRARIES and ICU_LIBRARIES point to my copy of ICU, i.e. version 56.1

            FWIW, you could just pass this variables to cmake command line without modifying sources, or even point PKG_CONFIG_PATH environment variable to pkgconfig directory of your ICU

            A Offline
            A Offline
            agarny
            wrote on last edited by
            #5

            @Konstantin-Tokarev said in Linux: build QtWebKit against a specific version of ICU?:

            FWIW, you could just pass this variables to cmake command line without modifying sources, or even point PKG_CONFIG_PATH environment variable to pkgconfig directory of your ICU

            Yes, I imagine and this is what I am planning on doing today (rely on PKG_CONFIG_PATH that is). I was just testing things and therefore just wanted to be 100% sure that the right information was used by the QtWebKit build.

            Out of curiosity, which library depends on system ICU in your case?

            From what I can tell, both libQt5Core.so.5 and libQt5WebKitWidgets.so.5 depend on the following two system libraries, which themselves depend on the system version of ICU:

            • /usr/lib/x86_64-linux-gnu/libxml2.so.2; and
            • /usr/lib/x86_64-linux-gnu/libxslt.so.1.
            1 Reply Last reply
            0
            • K Offline
              K Offline
              Konstantin Tokarev
              wrote on last edited by
              #6

              @agarny said in Linux: build QtWebKit against a specific version of ICU?:

              From what I can tell, both libQt5Core.so.5 and libQt5WebKitWidgets.so.5 depend on the following two system libraries, which themselves depend on the system version of ICU

              Oh. QtWebKit binaries are provided for use with official Qt builds, not system libraries

              A 1 Reply Last reply
              0
              • K Konstantin Tokarev

                @agarny said in Linux: build QtWebKit against a specific version of ICU?:

                From what I can tell, both libQt5Core.so.5 and libQt5WebKitWidgets.so.5 depend on the following two system libraries, which themselves depend on the system version of ICU

                Oh. QtWebKit binaries are provided for use with official Qt builds, not system libraries

                A Offline
                A Offline
                agarny
                wrote on last edited by
                #7

                @Konstantin-Tokarev said in Linux: build QtWebKit against a specific version of ICU?:

                @agarny said in Linux: build QtWebKit against a specific version of ICU?:

                From what I can tell, both libQt5Core.so.5 and libQt5WebKitWidgets.so.5 depend on the following two system libraries, which themselves depend on the system version of ICU

                Oh. QtWebKit binaries are provided for use with official Qt builds, not system libraries

                First, I obviously meant libQt5WebKit.so.5 and not libQt5Core.so.5.

                Second, sure, it's just that when you do an ldd on the QtWebKit binaries, you get told that both the system version of ICU and the version you requested (56.1 in my case) are needed. So, I got a bit confused back then, although I now understand the reasoning for it.

                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