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

configure fails on Arch Linux, complains about struct statx redeclaration etc.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.2
    • 5.10.1, 5.11.1, 5.12.0 Alpha
    • Core: I/O
    • None
    • Linux/X11
    • 25feee4e061b99edab79503d81f5bd045c6c8e3d

    Description

      This has just started happening recently; must be due to some recent system header changes. I did a git bisect and it blames d3393ce258 Add support for statx(2) on Linux; the errors with that SHA1 look about the same as when doing a build on current 5.11 branch:

      $ rm -rf * .*; ../qt5/configure -developer-build -debug  -nomake examples -nomake tests -opensource -confirm-license
      ....
      Creating qmake...
      In file included from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:94:
      /usr/include/linux/stat.h:56:8: error: redefinition of ‘struct statx_timestamp’
       struct statx_timestamp {
              ^~~~~~~~~~~~~~~
      In file included from /usr/include/sys/stat.h:446,
                       from /home/rutledge/dev/qt5/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
      /usr/include/bits/statx.h:25:8: note: previous definition of ‘struct statx_timestamp’
       struct statx_timestamp
              ^~~~~~~~~~~~~~~
      In file included from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:94:
      /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’
       struct statx {
              ^~~~~
      In file included from /usr/include/sys/stat.h:446,
                       from /home/rutledge/dev/qt5/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
      /usr/include/bits/statx.h:36:8: note: previous definition of ‘struct statx’
       struct statx
              ^~~~~
      /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:110:12: error: ‘int renameat2(int, const char*, int, const char*, unsigned int)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
       static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
                  ^~~~~~~~~
      In file included from /usr/include/c++/8.2.0/cstdio:42,
                       from /usr/include/c++/8.2.0/ext/string_conversions.h:43,
                       from /usr/include/c++/8.2.0/bits/basic_string.h:6391,
                       from /usr/include/c++/8.2.0/string:52,
                       from ../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qbytearray.h:52,
                       from ../include/QtCore/qbytearray.h:1,
                       from ../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qstring.h:49,
                       from ../include/QtCore/qstring.h:1,
                       from ../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qiodevice.h:50,
                       from ../include/QtCore/qiodevice.h:1,
                       from ../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qfiledevice.h:43,
                       from ../include/QtCore/qfiledevice.h:1,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfile.h:44,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_p.h:54,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:43:
      /usr/include/stdio.h:164:12: note: previous declaration of ‘int renameat2(int, const char*, int, const char*, unsigned int)’
       extern int renameat2 (int __oldfd, const char *__old, int __newfd,
                  ^~~~~~~~~
      /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:115:12: error: ‘int statx(int, const char*, int, unsigned int, statx*)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
       static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
                  ^~~~~
      In file included from /usr/include/sys/stat.h:446,
                       from /home/rutledge/dev/qt5/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                       from /home/rutledge/dev/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
      /usr/include/bits/statx.h:87:5: note: previous declaration of ‘int statx(int, const char*, int, unsigned int, statx*)’
       int statx (int __dirfd, const char *__restrict __path, int __flags,
           ^~~~~
      make: *** [Makefile:423: qfilesystemengine_unix.o] Error 1
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes