Hello, Samuel Thibault, on Sun 20 Sep 2015 22:53:07 +0200, wrote: > kio FTBFS on hurd-i386: > > /«PKGBUILDDIR»/obj-i586-gnu/src/ioslaves/file/../../../../src/ioslaves/file/file.cpp:338: > warning: posix_fadvise64 is not implemented and will always fail
This is still a problem with 5.16.0, making basically the whole KDE world unbuildable on hurd-i386. > which turns into an error due to -Wl,--fatal-warnings > > This function is actually probed by the CMakefiles, but only with > check_function_exists. It happens that the posix_fadvise function is > provided by glibc as a stub, which always returns ENOSYS. The fact that > the function is actually not implemented is announced by the presence > of #define __stub_posix_fadvise in /usr/include/i386-gnu/gnu/stubs.h > Autoconf automatically detects that in its ac_fn_c_check_func() > function, but it seems that cmake unfortunately didn't integrate that > kind of detection yet into check_function_exists, and thus wrongly > believes the support is available. It happens that cmake has a proper > check_function_exists_glibc function defined in > ./Utilities/cmlibarchive/build/cmake/CheckFuncs.cmake > but it doesn't seem to be shipped in the standard cmake. So the > solutions I see would be: > > - avoid -Wl,--fatal-warnings, since it may actually bring other kinds of > unexpected FTBFS along upgrades of gcc or binutils in the future. > - either to integrate ./Utilities/cmlibarchive/build/cmake/CheckFuncs.cmake > into kio's cmake/ directory to be able to call the proper > check_function_exists_glibc detection function > - or to patch over src/ioslaves/file/file.cpp and file_unix.cpp's > #if HAVE_FADVISE into #if HAVE_FADVISE && !defined(__hurd__) (but once > hurd-i386 gets posix_fadvise support it should get reverted). So what do you think, how do you prefer to proceed? The simplest would be the third solution, as attached. Also, the symbols file needs to be update, see attached patch. In the meanwhile, the hurd-i386 port looks in terribly bad shape due to all the not-rebuilt KDE packages. Samuel
Kio's check_function_exists_glibc does not actually detect for the presence of posix_fadvise: it ignores the stubs.h provided by glibc. See #799619 for the details. Index: kio-5.16.0/src/ioslaves/file/file.cpp =================================================================== --- kio-5.16.0.orig/src/ioslaves/file/file.cpp +++ kio-5.16.0/src/ioslaves/file/file.cpp @@ -333,7 +333,7 @@ void FileProtocol::get(const QUrl &url) return; } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) //TODO check return code posix_fadvise(f.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif Index: kio-5.16.0/src/ioslaves/file/file_unix.cpp =================================================================== --- kio-5.16.0.orig/src/ioslaves/file/file_unix.cpp +++ kio-5.16.0/src/ioslaves/file/file_unix.cpp @@ -128,7 +128,7 @@ void FileProtocol::copy(const QUrl &srcU return; } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(src_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif @@ -144,7 +144,7 @@ void FileProtocol::copy(const QUrl &srcU return; } -#if HAVE_FADVISE +#if HAVE_FADVISE && !defined(__GNU__) posix_fadvise(dest_file.handle(), 0, 0, POSIX_FADV_SEQUENTIAL); #endif
--- debian/libkf5kiocore5.symbols.original 2016-04-24 10:55:11.000000000 +0000 +++ debian/libkf5kiocore5.symbols 2016-04-24 10:55:15.000000000 +0000 @@ -901,12 +901,12 @@ _ZN3KIO8UDSEntry6insertEjRK7QString@Base 4.96.0 _ZN3KIO8UDSEntry6insertEjx@Base 4.96.0 _ZN3KIO8UDSEntry7reserveEi@Base 5.5.0+git20141229.0049+15.04 - (arch=kfreebsd-any)_ZN3KIO8UDSEntryC1ERK4statRK7QString@Base 5.11.0 - (arch=!kfreebsd-any)_ZN3KIO8UDSEntryC1ERK6stat64RK7QString@Base 4.100.0 + (arch=kfreebsd-any hurd-i386)_ZN3KIO8UDSEntryC1ERK4statRK7QString@Base 5.11.0 + (arch=!kfreebsd-any !hurd-i386)_ZN3KIO8UDSEntryC1ERK6stat64RK7QString@Base 4.100.0 _ZN3KIO8UDSEntryC1ERKS0_@Base 4.96.0 _ZN3KIO8UDSEntryC1Ev@Base 4.96.0 - (arch=kfreebsd-any)_ZN3KIO8UDSEntryC2ERK4statRK7QString@Base 5.11.0 - (arch=!kfreebsd-any)_ZN3KIO8UDSEntryC2ERK6stat64RK7QString@Base 4.100.0 + (arch=kfreebsd-any hurd-i386)_ZN3KIO8UDSEntryC2ERK4statRK7QString@Base 5.11.0 + (arch=!kfreebsd-any !hurd-i386)_ZN3KIO8UDSEntryC2ERK6stat64RK7QString@Base 4.100.0 _ZN3KIO8UDSEntryC2ERKS0_@Base 4.96.0 _ZN3KIO8UDSEntryC2Ev@Base 4.96.0 _ZN3KIO8UDSEntryD1Ev@Base 4.96.0