Important: Please read the Qt Code of Conduct -

Libicu, needed by Qt5Core, compilation issues. Please help!! Worked fine in 18.04, but not 16.04.

  • Hello QT friends. Thank you taking the time to read this.

    I had been working on this project in Ubuntu 18.04 LTS and had been working with multiple libraries utilizing Protobuf, GRPC, GNU Radio, ArcGIS SDK, among a few other things.

    Down the road I find out we have to STIG the machine, some government security process, which in the end, made us downgrade to 16.04 LTS to fulfill all the requirements needed.

    This caused a lot of issues for us in many ways, but nothing that wasn't fixable. Currently, I have been trying to figure out this next problem before seeking out for help. I've only been programming for a few years, so I am sorry if this turns out to be a single mistake.

    /opt/Qt/5.15.1/gcc_64/lib/ -lGL -lpthread
    cp -f -R "/home/labuser/dev/lewe-master/LeweGui/qdarkstyle" "/home/labuser/dev/build-LEWE2-Desktop_Qt_5_15_1_GCC_64bit-Debug/LeweGui"
    make[1]: Leaving directory '/home/labuser/dev/build-LEWE2-Desktop_Qt_5_15_1_GCC_64bit-Debug/LeweApp'
    /usr/bin/ld: warning:, needed by /opt/Qt/5.15.1/gcc_64/lib/, not found (try using -rpath or -rpath-link)
    /usr/bin/ld: warning:, needed by /opt/Qt/5.15.1/gcc_64/lib/, not found (try using -rpath or -rpath-link)
    /usr/bin/ld: warning:, needed by /opt/Qt/5.15.1/gcc_64/lib/, not found (try using -rpath or -rpath-link)
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_getAlias_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference touenum_next_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to u_strToUpper_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucnv_fromUnicode_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to uenum_close_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_openTimeZoneIDEnumeration_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucal_getDSTSavings_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_setMillis_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucol_getSortKey_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_get_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_compareNames_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucol_setAttribute_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_open_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_openTimeZones_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_getAvailableName_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_close_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_getDefaultName_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_getDefaultTimeZone_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucol_strcoll_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucnv_close_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_countAvailable_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference tou_strToLower_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_getStandardName_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_getTimeZoneDisplayName_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucnv_setSubstChars_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference tou_errorName_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucol_close_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucol_open_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucal_clone_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucal_open_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucal_openCountryTimeZones_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucnv_countAliases_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to ucal_inDaylightTime_56' /opt/Qt/5.15.1/gcc_64/lib/ undefined reference toucnv_toUnicode_56'
    /opt/Qt/5.15.1/gcc_64/lib/ undefined reference to `ucnv_getMaxCharSize_56'
    collect2: error: ld returned 1 exit status
    Makefile:548: recipe for target 'LeweGui' failed
    make[1]: Leaving directory '/home/labuser/dev/build-LEWE2-Desktop_Qt_5_15_1_GCC_64bit-Debug/LeweGui'
    make[1]: *** [LeweGui] Error 1
    Makefile:143: recipe for target 'sub-LeweGui-make_first' failed
    make: *** [sub-LeweGui-make_first] Error 2
    18:29:06: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project LEWE2 (kit: Desktop Qt 5.15.1 GCC 64bit)
    When executing step "Make"

    When I look at the folder, I can see the files are there but I don't know what I can do fix this issue. This works no problem in 18.04. It was working in Redhat 7 before finding out, it wasn't optimal for 16.04

    What could be causing issues for me using 16.04 LTS. I've tried google searching the libs needed by QTCore and I'd tried setting LD paths and other types of linking issues, although I could be doing it wrong, but I am stuck and looking for guidance.

    Thank you for reading. Have a good day.

  • Lifetime Qt Champion


    What version of ICU do you have on your system ?

  • @SGaist

    uconv v2.1 ICU 55.1

  • Lifetime Qt Champion

    Si here is your issue: it's below the version expected by the prebuilt version of Qt you are using.

  • @SGaist I understand.

    labuser@THORE0001:/opt/Qt/5.15.1/gcc_64/lib$ ls
    cmake libQt5Nfc.prl libQt5OpenGLExtensions.a libQt5OpenGLExtensions.prl libQt5OpenGL.prl libQt5PacketProtocol.a libQt5PacketProtocol.prl libQt5PlatformCompositorSupport.a libQt5PlatformCompositorSupport.prl libQt5Positioning.prl libQt5PositioningQuick.prl

    labuser@THORE0001:/opt/Qt/5.15.1/gcc_64/lib$ sudo apt install libicu-dev
    [sudo] password for labuser:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libicu-dev is already the newest version (55.1-7ubuntu0.5).

    labuser@THORE0001:/opt/Qt/5.15.1/gcc_64/lib$ find libicu*

    Although I have libicu56 in the file directory, my machine uses 55. I'm assuming it needs to be 56, or is this not the case?

    Armando o/

  • Lifetime Qt Champion

    One thing you can test: use LD_LIBRARY_PATH to point to the folder where libicu 56 is located before starting your application.

  • Yes. Thank you SGaist.

    In Kits, I was able to select my current kit and under Enviroment put: LD_LIBRARY_PATH=/opt/Qt/5.15.1/gcc_64/lib:${LD_LIBRARY_PATH}

    And it worked for me. Cheers mate.

  • @zeethree50 said in Libicu, needed by Qt5Core, compilation issues. Please help!! Worked fine in 18.04, but not 16.04.:

    And it worked for me

    Great, so please don't forget to mark your post as solved!