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

cannot initialize a parameter of type 'socklen_t *' with an rvalue of type 'int *'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.15.0
    • Network: Sockets
    • None
    • musl, llvm 10, clang 10, lld 10
    • Linux/X11

    Description

       

      I am using KISS Linux, a musl-based, source distribution. When building with gcc (9, 10), everything completes successfully. 

      When building with a (gcc-independent) llvm install (using llvm, clang, libc++, lld, etc.), I get the following error message when building qt5-base. It occurs in the Network portion of the build:

      In file included from kernel/qhostinfo_unix.cpp:54:
      In file included from ../../include/QtNetwork/5.15.0/QtNetwork/private/qnet_unix_p.h:1:
      ../../include/QtNetwork/5.15.0/QtNetwork/private/../../../../../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 *'
          fd = ::accept4(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen), sockflags);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/include/sys/socket.h:387:68: note: passing argument to parameter here
      int accept4(int, struct sockaddr *__restrict, socklen_t *__restrict, int);
                                                                         ^
      1 error generated.
      make[2]: *** [Makefile:21735: .obj/qhostinfo_unix.o] Error 1
      make[2]: Leaving directory '/tmp/build-25556/qt5/src/network'
      make[1]: *** [Makefile:245: sub-network-make_first] Error 2
      make[1]: Leaving directory '/tmp/build-25556/qt5/src'
      make: *** [Makefile:51: sub-src-make_first] Error 2
      

       

       

      Full build log is located [here|https://pastebin.com/xdsSqv2p].

       

      How I am configuring qt5-base:

      ./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
      

      I have tested this with both llvm 10 as well as the latest master branch on Github. I have not yet tested with llvm 9 - I can (and will), but it will take about a day to get it. 

       

      What's interesting is I have to manually specify my platform when using llvm. Otherwise, I get errors about missing gcc. Testing with both platform linux-clang and linux-clang-libc++ results in identical errors. 

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            dilyn DILYN CORNER
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes