Bug#890722: flatpack-builder: FTBFS with glibc 2.27: error: static declaration of 'memfd_create' follows non-static declaration

2018-02-19 Thread Aurelien Jarno
On 2018-02-19 09:43, Simon McVittie wrote:
> Control: forwarded -1 https://github.com/GNOME/libglnx/pull/103
> Control: tags -1 + fixed-upstream pending
> 
> On Sat, 17 Feb 2018 at 23:57:53 +0100, Aurelien Jarno wrote:
> > flatpack-builder 0.10.8-1 fails to build with glibc 2.27
> > (2.27-0experimental0 from experimental):
> > | ./libglnx/glnx-missing-syscall.h:105:19: error: static declaration of 
> > 'memfd_create' follows non-static declaration
> > 
> > glibc 2.27 added support for memfd_create. Unfortunately
> > flatpak-builder, or rather the included libglnx library, also has such a
> > function to wrap the corresponding syscall. It correctly tries to detect
> > it in the configure script to disabled the wrapper in case glibc
> > provides it. However it doesn't work due to a missing include. The
> > attached patch fixes that.
> 
> Thanks, I've sent this upstream to libglnx (where it was accepted)
> and applied it in Debian. Upstream is in the process of releasing
> flatpak-builder 0.10.9 anyway, with the updated libglnx included, so
> I'll probably wait for that version instead of uploading with your patch.

Thanks a lot for fixing the bug upstream. There is no urgency, I don't
expect to upload glibc 2.27 to unstable before at least one week.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Bug#890722: flatpack-builder: FTBFS with glibc 2.27: error: static declaration of 'memfd_create' follows non-static declaration

2018-02-19 Thread Simon McVittie
Control: forwarded -1 https://github.com/GNOME/libglnx/pull/103
Control: tags -1 + fixed-upstream pending

On Sat, 17 Feb 2018 at 23:57:53 +0100, Aurelien Jarno wrote:
> flatpack-builder 0.10.8-1 fails to build with glibc 2.27
> (2.27-0experimental0 from experimental):
> | ./libglnx/glnx-missing-syscall.h:105:19: error: static declaration of 
> 'memfd_create' follows non-static declaration
> 
> glibc 2.27 added support for memfd_create. Unfortunately
> flatpak-builder, or rather the included libglnx library, also has such a
> function to wrap the corresponding syscall. It correctly tries to detect
> it in the configure script to disabled the wrapper in case glibc
> provides it. However it doesn't work due to a missing include. The
> attached patch fixes that.

Thanks, I've sent this upstream to libglnx (where it was accepted)
and applied it in Debian. Upstream is in the process of releasing
flatpak-builder 0.10.9 anyway, with the updated libglnx included, so
I'll probably wait for that version instead of uploading with your patch.

Regards,
smcv



Bug#890722: flatpack-builder: FTBFS with glibc 2.27: error: static declaration of 'memfd_create' follows non-static declaration

2018-02-17 Thread Aurelien Jarno
Package: flatpack-builder
Version: 0.10.8-1
Severity: important
Tags: patch upstream
User: debian-gl...@lists.debian.org
Usertags: 2.27

flatpack-builder 0.10.8-1 fails to build with glibc 2.27
(2.27-0experimental0 from experimental):

| gcc -DHAVE_CONFIG_H -I.  -DFLATPAK_BINDIR=\"/usr/bin\" 
-DFLATPAK_BASEDIR=\"/usr/share/flatpak-builder\" 
-DG_LOG_DOMAIN=\"flatpak-builder\" -I./libglnx -include "config.h"  -Wdate-time 
-D_FORTIFY_SOURCE=2  -pipe -Wall -Werror=empty-body -Werror=strict-prototypes 
-Werror=missing-prototypes -Werror=implicit-function-declaration 
-Werror=format=2 -Werror=format-security -Werror=format-nonliteral 
-Werror=pointer-arith -Werror=init-self -Werror=missing-declarations 
-Werror=return-type -Werror=overflow -Werror=int-conversion 
-Werror=incompatible-pointer-types -Werror=misleading-indentation 
-Werror=missing-include-dirs -pthread -I/usr/include/libsoup-2.4 
-I/usr/include/ostree-1 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -g -O2 
-fdebug-prefix-map=/home/aurel32/work/glibc/rebuild/packages/flatpak-builder-0.10.8=.
 -fstack-protector-strong -Wformat -Werror=format-security -c -o 
src/flatpak_builder-builder-utils.o `test -f 'src/builder-utils.c' || echo 
'./'`src/builder-utils.c
| In file included from ./libglnx/glnx-missing.h:95:0,
|  from ./libglnx/libglnx.h:28,
|  from src/builder-flatpak-utils.h:26,
|  from src/builder-utils.c:39:
| ./libglnx/glnx-missing-syscall.h:105:19: error: static declaration of 
'memfd_create' follows non-static declaration
|  static inline int memfd_create(const char *name, unsigned int flags) {
|^~~~
| In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
|  from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
|  from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
|  from src/builder-utils.c:28:
| /usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous 
declaration of 'memfd_create' was here
|  int memfd_create (const char *__name, unsigned int __flags) __THROW;
|  ^~~~
| make[3]: *** [Makefile:1839: src/flatpak_builder-builder-utils.o] Error 1
| make[3]: Leaving directory 
'/home/aurel32/work/glibc/rebuild/packages/flatpak-builder-0.10.8'
| make[2]: *** [Makefile:2071: all-recursive] Error 1
| make[2]: Leaving directory 
'/home/aurel32/work/glibc/rebuild/packages/flatpak-builder-0.10.8'
| make[1]: *** [Makefile:1000: all] Error 2
| make[1]: Leaving directory 
'/home/aurel32/work/glibc/rebuild/packages/flatpak-builder-0.10.8'
| dh_auto_build: make -j1 returned exit code 2
| make: *** [debian/rules:7: binary-arch] Error 2
| dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit 
status 2
| debuild: fatal error at line 1152:
| dpkg-buildpackage -rfakeroot -us -uc -ui -B failed

glibc 2.27 added support for memfd_create. Unfortunately
flatpak-builder, or rather the included libglnx library, also has such a
function to wrap the corresponding syscall. It correctly tries to detect
it in the configure script to disabled the wrapper in case glibc
provides it. However it doesn't work due to a missing include. The
attached patch fixes that.
--- flatpak-builder-0.10.8.orig/libglnx/libglnx.m4
+++ flatpak-builder-0.10.8/libglnx/libglnx.m4
@@ -12,6 +12,7 @@ AC_CHECK_DECLS([
 #include 
 #include 
 #include 
+#include 
 ]])
 
 AC_ARG_ENABLE(otmpfile,