linux-user: syscall: ioctls: support DRM_IOCTL_VERSION
PATCH v3 1/1 linux-user: syscall: ioctls: support DRM_IOCTL_VERSION
From: Chen Gang <[email protected]>
Another DRM_IOCTL_* commands will be done later.
--- configure | 18 +++++++++++ linux-user/ioctls.h | 3 ++ linux-user/syscall.c | 61 ++++++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 15 ++++++++++ linux-user/syscall_types.h | 11 +++++++ 5 files changed, 108 insertions(+)
configure +18 -0
@@ -3912,6 +3912,24 @@ EOF fi fi +######################################### +# libdrm check + +cat > $TMPC << EOF +#include <libdrm/drm.h> +#include <sys/ioctl.h> +int main(void) +{ + struct drm_version version; + ioctl(-1, DRM_IOCTL_VERSION, &version); + return 0; +} +EOF +if ! compile_prog "" ; then + error_exit "libdrm check failed" \ + "Make sure to have the libdrm/drm.h installed." +fi + ########################################## # SHA command probe for modules if test "$modules" = yes; then
linux-user/ioctls.h +3 -0
@@ -574,6 +574,9 @@IOCTL_SPECIAL (SIOCDELRT ,IOC_W , do_ioctl_rt, MK_PTR(MK_STRUCT(STRUCT_rtentry))) +IOCTL_SPECIAL (DRM_IOCTL_VERSION ,IOC_RW , do_ioctl_drm, + MK_PTR(MK_STRUCT(STRUCT_drm_version))) +#ifdef TARGET_TIOCSTART IOCTL_IGNORE (TIOCSTART)IOCTL_IGNORE (TIOCSTOP)
linux-user/syscall.c +61 -0
73 lines not on this page · raw message
linux-user/syscall_defs.h +15 -0
@@ -1167,6 +1167,9 @@ struct target_rtc_pll_info {#define TARGET_DM_TARGET_MSG TARGET_IOWRU(0xfd, 0x0e)#define TARGET_DM_DEV_SET_GEOMETRY TARGET_IOWRU(0xfd, 0x0f) +/* drm ioctls */ +#define TARGET_DRM_IOCTL_VERSION TARGET_IOWRU('d', 0x00) +/* from asm/termbits.h */ #define TARGET_NCC 8
@@ -2598,6 +2601,18 @@ struct target_mq_attr {abi_long mq_curmsgs; }; +struct target_drm_version { +int version_major; +int version_minor; +int version_patchlevel; +abi_ulong name_len; +abi_ulong name; +abi_ulong date_len; +abi_ulong date; +abi_ulong desc_len; +abi_ulong desc; +}; +#include "socket.h" #include "errno_defs.h"
linux-user/syscall_types.h +11 -0
@@ -292,6 +292,17 @@ STRUCT(dm_target_versions,STRUCT (dm_target_msg, TYPE_ULONGLONG) /* sector */ +STRUCT (drm_version, +TYPE_INT ,/* version_major */ +TYPE_INT ,/* version_minor */ +TYPE_INT ,/* version_patchlevel */ +TYPE_ULONG ,/* name_len */ +TYPE_PTRVOID ,/* name */ +TYPE_ULONG ,/* date_len */ +TYPE_PTRVOID ,/* date */ +TYPE_ULONG ,/* desc_len */ + TYPE_PTRVOID) /* desc */ + STRUCT(file_clone_range, TYPE_LONGLONG, /* src_fd */ TYPE_ULONGLONG, /* src_offset */
Signature · 1 line
2.24.0.308.g228f53135a
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===
Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --enable-docs
ERROR: libdrm check failed
Make sure to have the libdrm/drm.h installed.
# QEMU configure log Sat May 23 14:20:32 UTC 2020
---
funcs: do_compiler do_cc compile_object check_define main
lines: 93 123 625 651 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c config-temp/qemu-conf.c:2:2: error: #error __linux__ not defined
#error __linux__ not defined
^~~~~
---
funcs: do_compiler do_cc compile_object check_define main
lines: 93 123 625 703 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c config-temp/qemu-conf.c:2:2: error: #error __i386__ not defined
#error __i386__ not defined
^~~~~
---
funcs: do_compiler do_cc compile_object check_define main
lines: 93 123 625 706 0
x86_64-w64-mingw32-gcc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c config-temp/qemu-conf.c:2:2: error: #error __ILP32__ not defined
#error __ILP32__ not defined
^~~~~
---
lines: 93 129 969 0
x86_64-w64-mingw32-gcc -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -liberty /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -liberty
collect2: error: ld returned 1 exit status
funcs: do_compiler do_cc compile_object main
lines: 93 123 1943 0
---
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 93 129 2024 2028 0
x86_64-w64-mingw32-gcc -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Werror -Wstring-plus-int -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Wstring-plus-int'; did you mean '-Wstrict-aliasing'?
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 93 129 2024 2028 0
x86_64-w64-mingw32-gcc -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Werror -Wtypedef-redefinition -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Wtypedef-redefinition'; did you mean '-Wold-style-definition'?
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 93 129 2024 2028 0
x86_64-w64-mingw32-gcc -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Werror -Winitializer-overrides -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64
x86_64-w64-mingw32-gcc: error: unrecognized command line option '-Winitializer-overrides'; did you mean '-Wno-suggest-override'?
funcs: do_compiler do_cc compile_prog cc_has_warning_flag main
lines: 93 129 2024 2028 0
---
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -Wl,-z,relro -Wl,-z,now /usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: unrecognized option '-z'/usr/lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
funcs: do_compiler do_cc compile_object main
lines: 93 123 2267 0
---
lines: 93 123 2313 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -Werror -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c config-temp/qemu-conf.c: In function 'main':config-temp/qemu-conf.c:4:21: error: unknown conversion type character 'z' in format [-Werror=format=]
return printf("%zu", SIZE_MAX);
^
config-temp/qemu-conf.c:4:19: error: too many arguments for format [-Werror=format-extra-args]
return printf("%zu", SIZE_MAX);
^~~~~
config-temp/qemu-conf.c:4:21: error: unknown conversion type character 'z' in format [-Werror=format=]
return printf("%zu", SIZE_MAX);
^
config-temp/qemu-conf.c:4:19: error: too many arguments for format [-Werror=format-extra-args]
return printf("%zu", SIZE_MAX);
^~~~~cc1: all warnings being treated as errors
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 2325 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong config-temp/qemu-conf.c:1:10: fatal error: sys/socket.h: No such file or directory
#include <sys/socket.h>
^~~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 2439 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -llzo2 config-temp/qemu-conf.c:1:10: fatal error: lzo/lzo1x.h: No such file or directory
#include <lzo/lzo1x.h>
^~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 2458 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lsnappy config-temp/qemu-conf.c:1:10: fatal error: snappy-c.h: No such file or directory
#include <snappy-c.h>
^~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 2495 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -llzfse config-temp/qemu-conf.c:1:10: fatal error: lzfse.h: No such file or directory
#include <lzfse.h>
^~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 2577 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lxenstore -lxenctrl -lxenguest config-temp/qemu-conf.c:1:10: fatal error: xenctrl.h: No such file or directory
#include <xenctrl.h>
^~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3018 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lnettle config-temp/qemu-conf.c:1:10: fatal error: nettle/xts.h: No such file or directory
#include <nettle/xts.h>
^~~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3120 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lpam config-temp/qemu-conf.c:1:10: fatal error: security/pam_appl.h: No such file or directory
#include <security/pam_appl.h>
^~~~~~~~~~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_object check_include main
lines: 93 123 633 3135 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -c -o config-temp/qemu-conf.o config-temp/qemu-conf.c config-temp/qemu-conf.c:1:10: fatal error: ifaddrs.h: No such file or directory
#include <ifaddrs.h>
^~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3273 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -Dmain=SDL_main -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/SDL2 -Wno-undef -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lmingw32 -lSDL2main -lSDL2 -mwindows config-temp/qemu-conf.c:5:2: error: #error No x11 support
#error No x11 support
^~~~~
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/SDL2/SDL.h:32,
from config-temp/qemu-conf.c:1:/usr/x86_64-w64-mingw32/sys-root/mingw/include/SDL2/SDL_main.h:111:17: error: conflicting types for 'SDL_main'
#define main SDL_main
^~~~~~~~config-temp/qemu-conf.c:7:5: note: in expansion of macro 'main'
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3288 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lrdmacm -libverbs -libumad config-temp/qemu-conf.c:1:10: fatal error: rdma/rdma_cma.h: No such file or directory
#include <rdma/rdma_cma.h>
^~~~~~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3388 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -DSTRUCT_IOVEC_DEFINED -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lsasl2 config-temp/qemu-conf.c:1:10: fatal error: sasl/sasl.h: No such file or directory
#include <sasl/sasl.h>
^~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3482 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong config-temp/qemu-conf.c:2:10: fatal error: xfs/xfs.h: No such file or directory
#include <xfs/xfs.h>
^~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3506 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lvdeplug config-temp/qemu-conf.c:1:10: fatal error: libvdeplug.h: No such file or directory
#include <libvdeplug.h>
^~~~~~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3556 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lcap-ng config-temp/qemu-conf.c:1:10: fatal error: cap-ng.h: No such file or directory
#include <cap-ng.h>
^~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3651 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lbrlapi config-temp/qemu-conf.c:1:10: fatal error: brlapi.h: No such file or directory
#include <brlapi.h>
^~~~~~~~~~compilation terminated.
---
lines: 93 129 3682 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/local/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -L/usr/local/lib /tmp/ccblMepF.o:qemu-conf.c:(.text+0x1c): undefined reference to `iconv_open'
collect2: error: ld returned 1 exit status
looking at iconv in '-I/usr/local/include' '-L/usr/local/lib -liconv'
funcs: do_compiler do_cc compile_prog main
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3740 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -DNCURSES_WIDECHAR -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong config-temp/qemu-conf.c:2:10: fatal error: curses.h: No such file or directory
#include <curses.h>
^~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3740 0
x86_64-w64-mingw32-gcc -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -DNCURSES_WIDECHAR -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong -lpdcurses config-temp/qemu-conf.c:2:10: fatal error: curses.h: No such file or directory
#include <curses.h>
^~~~~~~~~~compilation terminated.
---
funcs: do_compiler do_cc compile_prog main
lines: 93 129 3924 0
x86_64-w64-mingw32-gcc -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -fno-pie -m64 -mcx16 -mthreads -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -no-pie -m64 -fstack-protector-strong config-temp/qemu-conf.c:1:10: fatal error: libdrm/drm.h: No such file or directory
#include <libdrm/drm.h>
^~~~~~~~~~~~~~compilation terminated.
---
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=63c47ae146374fb88b26fa5dfab6e7d7', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-6yibd5d7/src/docker-src.2020-05-23-10.19.39.18113:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 1. filter=--filter=label=com.qemu.instance.uuid=63c47ae146374fb88b26fa5dfab6e7d7
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-6yibd5d7/src'
make: *** [docker-run-test-mingw@fedora] Error 2
real 1m29.051s
user 0m7.957s
The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Le 23/05/2020 à 15:24, [email protected] a écrit :
Quoted 28 lines
From: Chen Gang <[email protected]>
Another DRM_IOCTL_* commands will be done later.
Signed-off-by Chen Gang <[email protected]>--- configure | 18 +++++++++++ linux-user/ioctls.h | 3 ++ linux-user/syscall.c | 61 ++++++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 15 ++++++++++ linux-user/syscall_types.h | 11 +++++++ 5 files changed, 108 insertions(+)configure +7
-0@@ -3912,6 +3912,24 @@ EOF fi fi +######################################### +# libdrm check + +cat > $TMPC << EOF +#include <libdrm/drm.h> +#include <sys/ioctl.h> +int main(void)
configure EOF · line 3931
Quoted 10 lines
configure +10
-0+{ + struct drm_version version; + ioctl(-1, DRM_IOCTL_VERSION, &version); + return 0; +} +EOF +if ! compile_prog "" ; then + error_exit "libdrm check failed" \ + "Make sure to have the libdrm/drm.h installed." +fi
You break the build of qemu if libdrm is not available, not a good idea.
In fact, you should only check for the include with something like "check_include libdrm/drm.h" and then define a HAVE_DRM_H to use it around the new code:
#ifdef HAVE_DRM_H
#include <libdrm/drm.h>
#endif
...
#ifdef HAVE_DRM_H
static inline abi_long target_to_host_drmversion(...
...
#endif
...
#ifdef HAVE_DRM_H
IOCTL_SPECIAL(DRM_IOCTL_VERSION,...
...
#endif
Thanks,
Laurent
Quoted 43 lines · Laurent Vivier
Quoted 15 lines
configure +7
-0@@ -3912,6 +3912,24 @@ EOF fi fi +######################################### +# libdrm check + +cat > $TMPC << EOF +#include <libdrm/drm.h> +#include <sys/ioctl.h> +int main(void)configure EOF · line 3931
Quoted 10 lines
configure +10
-0+{ + struct drm_version version; + ioctl(-1, DRM_IOCTL_VERSION, &version); + return 0; +} +EOF +if ! compile_prog "" ; then + error_exit "libdrm check failed" \ + "Make sure to have the libdrm/drm.h installed." +fiYou break the build of qemu if libdrm is not available, not a good idea.
In fact, you should only check for the include with something like "
check_includelibdrm/drm.h" and then define aHAVE_DRM_Hto use it around the new code:#ifdef
HAVE_DRM_H
#include <libdrm/drm.h>
#endif...
#ifdefHAVE_DRM_H
static inlineabi_longtarget_to_host_drmversion(...
...
#endif
...
Quoted 5 lines
#ifdef
HAVE_DRM_H
IOCTL_SPECIAL(DRM_IOCTL_VERSION,...
...
#endif
OK, thanks. I'll send patch v4
Chen Gang