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
- is duplicated by
-
QTBUG-69903 Qt compilation fails with "redefinition of ‘struct statx_timestamp’"
-
- Closed
-