Bug 119121

Summary: [SH]: Missing syscall __NR_memfd_create
Product: Other Reporter: John Paul Adrian Glaubitz (glaubitz)
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: normal CC: bugdal, glaubitz, ysato
Priority: P1    
Hardware: SuperH   
OS: Linux   
URL: https://buildd.debian.org/status/fetch.php?pkg=gtk%2B3.0&arch=sh4&ver=3.20.5-4&stamp=1464248716
Kernel Version: 4.6 Subsystem:
Regression: No Bisected commit-id:

Description John Paul Adrian Glaubitz 2016-05-26 10:02:55 UTC
Hi!

Building gtk+3.0_3.20.5 currently fails on Debian sh4 because we can't call syscall(__NR_memfd_create, ...) [1]:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk/wayland -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/. -I/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk -I../../gdk -fvisibility=hidden -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_44 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_46 -pthread -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/sh4-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/libpng16 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -c /build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk/wayland/gdkdisplay-wayland.c  -fPIC -DPIC -o .libs/gdkdisplay-wayland.o
/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk/wayland/gdkdisplay-wayland.c: In function 'create_shm_pool':
/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk/wayland/gdkdisplay-wayland.c:964:18: error: '__NR_memfd_create' undeclared (first use in this function)
   ret = syscall (__NR_memfd_create, "gdk-wayland", MFD_CLOEXEC);
                  ^
/build/gtk+3.0-qXhNqA/gtk+3.0-3.20.5/./gdk/wayland/gdkdisplay-wayland.c:964:18: note: each undeclared identifier is reported only once for each function it appears in

Looking at unistd_32.h for SH [2], there are only 369 syscalls, so many are missing.

Adrian

> [1]
> https://buildd.debian.org/status/fetch.php?pkg=gtk%2B3.0&arch=sh4&ver=3.20.5-4&stamp=1464248716
> [2]
> https://github.com/torvalds/linux/blob/master/arch/sh/include/uapi/asm/unistd_32.h