Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt5-base 5.15 build fails with llvm+clang
QtWS25 Last Chance

Qt5-base 5.15 build fails with llvm+clang

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 1.2k Views
  • 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.
  • D Offline
    D Offline
    dilyn
    wrote on last edited by
    #1

    I'm attempting to build qt5-base on a Linux machine. I previously could build successfully using GCC 10. I recently switched the whole system to LLVM (clang, lld, etc.) and am hitting a build error I'm not sure how to tackle.
    Below is the build log.
    http://ix.io/2oUD

    The specific error occurs in QtNetwork:

    src/network/socket/qnet_unix_p.h:120:29: error: cannot initialize a parameter of type 'socklen_t *' (aka 'unsigned int *') with an rvalue of type 'int *'
    

    Unfortunately I don't know C(PP), do I can't particularly parse this.

    I'm using llvm 10. To avoid other errors I found I had to manually specify the platform as linux-clang-libc++.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you give more information about your Linux setup ?
      What distribution ?
      What package did you install ?
      What configure options did you use exactly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Can you give more information about your Linux setup ?
        What distribution ?
        What package did you install ?
        What configure options did you use exactly ?

        D Offline
        D Offline
        dilyn
        wrote on last edited by
        #3

        I'm using KISS linux, just a simple musl-based, source distro.
        I'm building qt5 from source (qt5-base-everywhere-src-5.15.0.tar.xz); this is exactly what I'm doing to build it:

        # Don't link against execinfo.h.
        sed -i 's/define QLOG/define N/g' \
            ./src/corelib/global/qlogging.cpp
        
        ./configure \
            -confirm-license \
            -opensource \
            -prefix /usr \
            -docdir /usr/share/doc/qt \
            -headerdir /usr/include/qt \
            -archdatadir /usr/lib/qt \
            -datadir /usr/share/qt \
            -sysconfdir /etc/xdg \
            -examplesdir /usr/share/doc/qt/examples \
            -nomake examples \
            -nomake tests \
            -platform linux-clang-libc++ \
            -optimized-qmake \
            -no-libudev \
            -no-separate-debug-info \
            -no-pch \
            -no-dbus \
            -no-accessibility \
            -no-gtk \
            -no-glib \
            -system-libjpeg \
            -system-libpng \
            -system-sqlite \
            -system-zlib \
            -system-freetype \
            -system-harfbuzz \
            -silent
        
        make
        make INSTALL_ROOT="$1" install
        

        These are the dependencies we have listed for qt5-base (although from testing it seems ICU is also required; but that eror message occurs in Widgets)

        bison make
        flex  make
        freetype-harfbuzz
        gperf make
        libICE
        libSM
        libX11
        libXext
        libXi
        libXrandr
        libXrender
        libXslt
        libinput
        libjpeg-turbo
        libpng
        libxkbcommon
        linux-headers make
        mesa
        mtdev
        perl  make
        sqlite
        xcb-util
        xcb-util-image
        xcb-util-keysyms
        xcb-util-wm
        xcb-util-renderutil
        zlib
        

        The only real thing that has changed on my system since the last time I built qt5 is dropping gcc for llvm (clang, libc++, compiler-rt, lld, etc). I've rebuilt basically the entire system after this with only a few hiccups.

        I've tried choosing different platforms as well. linux-clang results in an identical error message. Interestingly, autodetection acts as if I'm using gcc still. Which may be a clue?

        We DO use libressl instead of openssl (and indeed we apply patches to qt5 to enable ssl support), but considering I've built 5.15 previously with gcc that doesn't appear to be the issue.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I would check the bug report system. They might have not used LLVM 10.

          Did you check with LLVM 9 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            I would check the bug report system. They might have not used LLVM 10.

            Did you check with LLVM 9 ?

            D Offline
            D Offline
            dilyn
            wrote on last edited by
            #5

            Thanks for the link; I have posted a bug report.

            I have not tested with llvm 9; I will try it out, it'll take a while to see though. I'll report back when it's done.

            D 1 Reply Last reply
            0
            • D dilyn

              Thanks for the link; I have posted a bug report.

              I have not tested with llvm 9; I will try it out, it'll take a while to see though. I'll report back when it's done.

              D Offline
              D Offline
              dilyn
              wrote on last edited by
              #6

              Update: also fails with an identical error using llvm 9.0.1.

              I'm going to continue troubleshooting this, see if I can get some other people to reproduce 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