|Summary:||emulators/qemu: hw/rdma/vmw/pvrdma_cmd.c depends on linux/types.h?|
|Product:||Ports & Packages||Reporter:||Trond.Endrestol|
|Component:||Individual Port(s)||Assignee:||Roman Bogorodskiy <novel>|
|Severity:||Affects Only Me||CC:||novel|
Description Trond.Endrestol 2018-11-04 19:25:15 UTC
During build of emulators/qemu on 12.0-BETA3, this happened: cc -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/hw/rdma/vmw -iquote hw/rdma/vmw -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/tcg -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/tcg/i386 -iquote . -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0 -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/accel/tcg -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/include -I/usr/local/include/pixman-1 -I/construction/xports/emulators/qemu/work/qemu-2.12.0/dtc/libfdt -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -m64 -mcx16 -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 -I/construction/xports/emulators/qemu/work/qemu-2.12.0 -I/usr/local/include -DPREFIX=\""/usr/local\"" -Wno-error=address-of-packed-member -Wno-string-plus-int -Wno-initializer-overrides -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-definition -Wtype-limits -fstack-protector-strong -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/local/include -I/usr/local/include/libpng16 -I/construction/xports/emulators/qemu/work/qemu-2.12.0/capstone/include -iquote .. -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/target/arm -DNEED_CPU_H -iquote /construction/xports/emulators/qemu/work/qemu-2.12.0/include -MMD -MP -MT hw/rdma/vmw/pvrdma_cmd.o -MF hw/rdma/vmw/pvrdma_cmd.d -g -O2 -pipe -fno-omit-frame-pointer -fstack-protector -fno-strict-aliasing -c -o hw/rdma/vmw/pvrdma_cmd.o /construction/xports/emulators/qemu/work/qemu-2.12.0/hw/rdma/vmw/pvrdma_cmd.c /construction/xports/emulators/qemu/work/qemu-2.12.0/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error: 'linux/types.h' file not found #include <linux/types.h> ^~~~~~~~~~~~~~~ 1 error generated. Complete build log is available at https://ximalas.info/~trond/qemu/ due to the size restrictions of bz.
Comment 1 Roman Bogorodskiy 2018-11-07 17:39:08 UTC
Created attachment 199057 [details] Proposed fix I can see a failure like this as well. I've cherry-picked two commits from upstream: https://github.com/qemu/qemu/commit/72221d03b85fcfba27a47a2af08ee59150550ced https://github.com/qemu/qemu/commit/21ab34c9543fe1b6d31b3edbd01a397e7e090d00 Squashed them together and added to the port. I've attached a patch for that. It works for me on -CURRENT locally and in poudriere. Running tests for other versions in poudriere now.
Comment 2 Roman Bogorodskiy 2018-11-08 14:10:31 UTC
(In reply to Roman Bogorodskiy from comment #1) Tested in poudriere, works fine.
Comment 3 Trond.Endrestol 2018-11-08 14:14:58 UTC
(In reply to Roman Bogorodskiy from comment #2) Thank you for piecing together the patches and for testing the outcome. I'll be taking my laptop home from work this weekend to do some more testing of 12.0-BETA3. I'll be sure to try out your patches.
Comment 4 Trond.Endrestol 2018-11-10 15:30:31 UTC
(In reply to Trond.Endrestol from comment #3) qemu finally got built on my laptop. I guess the patch can go live if there are no other concerns.
Comment 5 Roman Bogorodskiy 2018-11-10 16:30:46 UTC
(In reply to Trond.Endrestol from comment #4) It looks like the maintainer wasn't active for a few months, so I've asked portmgr@ if I can commit it. Otherwise will have to wait 2 weeks for maintainer timeout.
Comment 6 commit-hook 2018-11-11 15:30:34 UTC
A commit references this bug: Author: novel Date: Sun Nov 11 15:30:29 UTC 2018 New revision: 484695 URL: https://svnweb.freebsd.org/changeset/ports/484695 Log: emulators/qemu: fix build on 12 and -CURRENT Build fails with: hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error: 'linux/types.h' file not found Add two upstream commits to fix this issue: * 72221d03b85fcfba27a47a2af08ee59150550ced to not include linux/types.h * 21ab34c9543fe1b6d31b3edbd01a397e7e090d00 to split PVRDMA from RDMA as pvrdma device can't be used on FreeBSD as mremap() system call is missing PR: 232968 Reported by: Trond.Endrestol@ximalas.info Approved by: portmgr (build fix blanket) Obtained from: upstream MFH: 2018Q4 Changes: head/emulators/qemu/Makefile head/emulators/qemu/files/patch-rdma-pvrdma-split
Comment 7 Roman Bogorodskiy 2018-11-11 15:32:46 UTC
Fix committed, requested MFH to 2018Q4.
Comment 8 commit-hook 2018-12-09 08:26:53 UTC
A commit references this bug: Author: novel Date: Sun Dec 9 08:25:52 UTC 2018 New revision: 487030 URL: https://svnweb.freebsd.org/changeset/ports/487030 Log: MFH: r484695 emulators/qemu: fix build on 12 and -CURRENT Build fails with: hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error: 'linux/types.h' file not found Add two upstream commits to fix this issue: * 72221d03b85fcfba27a47a2af08ee59150550ced to not include linux/types.h * 21ab34c9543fe1b6d31b3edbd01a397e7e090d00 to split PVRDMA from RDMA as pvrdma device can't be used on FreeBSD as mremap() system call is missing PR: 232968 Reported by: Trond.Endrestol@ximalas.info Approved by: portmgr (build fix blanket) Obtained from: upstream Approved by: ports-secteam (miwi) Changes: _U branches/2018Q4/ branches/2018Q4/emulators/qemu/Makefile branches/2018Q4/emulators/qemu/files/patch-rdma-pvrdma-split