Source: qtbase-opensource-src Version: 5.10.1+dfsg-5 Severity: important Justification: fails to build from source (but built in past) User: debian-al...@lists.debian.org Usertags: ftbfs Tags: patch
qtbase-opensource-src FTBFS on Alpha [1] due to an ambiguous resolution of the overloaded call to atime() with definitions of atime() at lines 246, 254 and 299 in src/corelib/io/qfilesystemengine_unix.cpp. The one at line 299 is declared as: Q_DECL_UNUSED static typename std::enable_if<(&T::st_atimensec, true) ... which I guess (I don't know C++ very well) means that if the field st_atimensec is present then include that declaration of atime(). On Alpha Linux this field is present in the struct stat declaration in the header file (sys/stat.h) inside a union declaration, which looks to be a unique definition of struct stat amongst the Linicies. So this definition of atime() at line 299 applies on Alpha Linux and conflicts with one of the earlier definitions at lines 246 and 254. I don't know if this is a bug in the header file (i.e. glibc) or present for historical reasons (Alpha Linux being the first 64-bit Linux does have some idiosyncrasies not repeated in later 64-bit Linicies), nevertheless I attach a patch that disables the second confounding definition of atime() at line 299 on Alpha only. With the patch qtbase-opensource-src builds to completion on Alpha. Cheers Michael. [1] https://buildd.debian.org/status/fetch.php?pkg=qtbase-opensource-src&arch=alpha&ver=5.10.1%2Bdfsg-5&stamp=1523222004&raw=0
--- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -292,7 +292,7 @@ { return timespecToMSecs(statBuffer.st_mtimespec); } #endif -#ifndef st_mtimensec +#if !defined(st_mtimensec) && !defined(__alpha__) // Xtimensec template <typename T> Q_DECL_UNUSED static typename std::enable_if<(&T::st_atimensec, true), qint64>::type