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

config.tests/unix/icu fails for static icu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.0 Beta 2
    • 5.8.0
    • Build System
    • None
    • 85b30fda7ceccecfd3938703979b3431bdedc9a2

    Description

      I want to link statically the Qt dependencies of my Qt build. Therefore i build icu statically and provided the -icu configuration flag. Using icu as a shared lib runs fine, but in the static case the Qt build configuration fails with the following message:

      ERROR: Feature 'icu' was enabled, but the pre-condition 'libs.icu' failed.

      I looked up the specific configuration test location in qt5/qtbase/config.tests/unix/icu. Running the already correctly configured make shows the following errors:

      /home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dl_open_57: error: undefined reference to 'dlopen'
      /home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dl_close_57: error: undefined reference to 'dlclose'
      /home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dlsym_func_57: error: undefined reference to 'dlsym'
      collect2: Fehler: ld gab 1 als Ende-Status zurück
      

      I searched for the missing symbol problem and found this stack overflow post:
      http://stackoverflow.com/questions/956640/linux-c-error-undefined-reference-to-dlopen

      Using the additional -ldl flag for the LIBS in the preconfigured makefile seems to fix the problem and the build process exits without any warning or error.

      So my specific questions are:

      1. Is Qt able to handle static icu linking into the Qt lib?
      2. Is only the config test broken by the missing -ldl flag for the static case?
      3. What should i do to be able to statically link every Qt dependency into the Qt itself?

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            cguenther.tu.chemnitz Christian Günther
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes