[Pkg-utopia-maintainers] Bug#890722: flatpack-builder: FTBFS with glibc 2.27: error: static declaration of 'memfd_create' follows non-static declaration

Adrian Bunk bunk at debian.org
Sun Feb 18 20:27:13 UTC 2018


reassign 890722 flatpak-builder 0.10.8-1
thanks

There is no c in flatpak.

On Sat, Feb 17, 2018 at 11:57:53PM +0100, Aurelien Jarno wrote:
> Package: flatpack-builder
> Version: 0.10.8-1
> Severity: important
> Tags: patch upstream
> User: debian-glibc at 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 <sched.h>
>  #include <linux/loop.h>
>  #include <linux/random.h>
> +#include <sys/mman.h>
>  ]])
>  
>  AC_ARG_ENABLE(otmpfile,





More information about the Pkg-utopia-maintainers mailing list