With these options # make -C /usr/ports/emulators/qemu showconfig|grep =on CDROM_DMA=on: IDE CDROM DMA GNS3=on: gns3 patches (promiscuous multicast) NCURSES=on: Console (text) interface support PCAP=on: pcap dependency (networking with bpf) STATIC_LINK=on: Statically link the executables a "make clean package" (where WRKDIRPREFIX=/var/ports) results in perl -Ww -- /var/ports/usr/ports/emulators/qemu/work/qemu-2.12.0/scripts/texi2pod.pl -I docs -I -I docs "-DVERSION=2.12.0" docs/qemu-qmp-ref.7.pod && pod2man --utf8 --section=7 --center=" " --release=" " docs/qemu-qmp-ref.7.pod > docs/qemu-qmp-ref.7 No filename or title gmake[1]: *** [/var/ports/usr/ports/emulators/qemu/work/qemu-2.12.0/rules.mak:387: docs/qemu-qmp-ref.7] Error 255 gmake[1]: Leaving directory '/var/ports/usr/ports/emulators/qemu/work/qemu-2.12.0' *** Error code 1 I'm afraid the CONFIGURE_ARGS needs some attention to align with the DOCS option being deselected. Unfortunately I cheated and simply changed enable-docs to disable-docs to successfully build the qemu XX package on FreeBSD 11.2-STABLE r336359M amd64 - --prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \ + --prefix=${PREFIX} --cc=${CC} --disable-docs --disable-kvm \ This is different to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196855
Also modified pkg-plist to build a package successfully, sed /^man\\/man/d /usr/ports/emulators/qemu/pkg-plist.
Created attachment 196669 [details] fix port when docs are disabled
(In reply to Steven Hartland from comment #2) Thank-you for the simple and elegant solution. If the maintainer would include, I'd be happy to close :)
Created attachment 198948 [details] fix build without docs while still building man pages I attached a patch to fix patch-Makefile for 2.12.0 It allows building without docs while still building the man pages
disabling DOCS shouldn't exclude man pages unless there are lots of man pages.
*** Bug 234400 has been marked as a duplicate of this bug. ***
My patch "fix build without docs while still building man pages" doesn't disable the man pages. It doesn't require passing "--disable-docs" It rearranges patch-Makefile so the man page qemu-block-drivers.7 will be built even if DOCS is disabled and corrects the paths of qemu-qmp-ref.7 and qemu-ga-ref.7 (the files moved under interop subdir) for the ifdef NOPORTDOCS case. These three man pages not being built when DOCS is disabled is the cause of the build failure.
A commit references this bug: Author: bofh Date: Tue Feb 12 21:48:13 UTC 2019 New revision: 492812 URL: https://svnweb.freebsd.org/changeset/ports/492812 Log: emulators/qemu: Add NETMAP support - Build qemu-guest-agent without unused libs [1] - Fix build with DOCS disabled [2] PR: 232949 [1] 230204 [2] Submitted by: zhecka@gmail.com [1] dewayne@heuristicsystems.com.au [2] Reported by: vmaffione Changes: head/emulators/qemu/Makefile head/emulators/qemu/files/patch-Makefile
(In reply to commit-hook from comment #8) Thank-you for looking into this problem. I updated overnight, unfortunately I know receive: # make -C /usr/ports/emulators/qemu clean package ===> Cleaning for qemu-2.12.1_2 ===> qemu-2.12.1_2 need to specify gl component with USE_GL. *** Error code 1 on FreeBSD11.2S (8th Feb). Config information # make -C /usr/ports/emulators/qemu showconfig |grep =on CDROM_DMA=on: IDE CDROM DMA NCURSES=on: Console (text) interface support PCAP=on: pcap dependency (networking with bpf) STATIC_LINK=on: Statically link the executables
Recently is started failing again: =>> Building emulators/qemu build started at Sun Jul 26 05:41:57 +04 2020 port directory: /usr/ports/emulators/qemu package name: qemu-4.2.1 building for: FreeBSD current-local-job-03 13.0-CURRENT FreeBSD 13.0-CURRENT 1300101 amd64 maintained by: bofh@FreeBSD.org Makefile ident: $FreeBSD: head/emulators/qemu/Makefile 542523 2020-07-18 19:41:59Z bofh $ ... ---Begin OPTIONS List--- ===> The following configuration options are available for qemu-4.2.1: CAPSTONE=off: Disassembly framework support CDROM_DMA=on: IDE CDROM DMA CURL=on: Data transfer support via cURL DOCS=off: Build and/or install documentation GNUTLS=on: gnutls dependency (vnc encryption) GTK3=on: GTK+ 3 GUI toolkit support ISCSI=off: libiscsi dependency (iSCSI client for emulated drives) JPEG=on: jpeg dependency (vnc lossy compression) OPENGL=on: 2D/3D rendering support via OpenGL PCAP=on: pcap dependency (networking with bpf) PNG=on: png dependency (vnc compression) SAMBA=off: samba dependency (for -smb) SASL=on: cyrus-sasl dependency (vnc encryption) STATIC_LINK=off: Statically link the executables USBREDIR=off: usb device network redirection (experimental!) VDE=on: vde dependency (for vde networking) X11=on: X11 (graphics) support X86_TARGETS=off: Build only x86 system targets ====> Console (text) interface support: you have to select exactly one of them NCURSES_DEFAULT=on: Depend on ncurses (ports if installed, otherwise base) NCURSES_BASE=off: Depend on ncurses in base NCURSES_PORT=off: Depend on devel/ncurses in ports ===> Use 'make config' to modify these settings ---End OPTIONS List--- ... gmake[2]: Nothing to be done for 'all'. gmake[2]: Leaving directory '/wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/slirp' gmake[2]: Entering directory '/wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/dtc' gmake[2]: 'libfdt/libfdt.a' is up to date. gmake[2]: Leaving directory '/wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/dtc' sh /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/hxtool -t < /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/qemu-options.hx > qemu-options.texi sh /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/hxtool -t < /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/hmp-commands.hx > qemu-monitor.texi sh /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/hxtool -t < /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/hmp-commands-info.hx > qemu-monitor-info.texi sh /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/hxtool -t < /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/qemu-img-cmds.hx > qemu-img-cmds.texi perl -Ww -- /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/texi2pod.pl -I docs -I . -I . -DVERSION="4.2.1" -DCONFDIR="/usr/local/etc/qemu" qemu-nbd.texi qemu-nbd.8.pod && pod2man --utf8 --section=8 --center=" " --release=" " qemu-nbd.8.pod > qemu-nbd.8 perl -Ww -- /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/texi2pod.pl -I docs -I scripts -I . -DVERSION="4.2.1" -DCONFDIR="/usr/local/etc/qemu" scripts/texi2pod.pl qemu-ga.8.pod && pod2man --utf8 --section=8 --center=" " --release=" " qemu-ga.8.pod > qemu-ga.8 /usr/local/bin/python3.7 -B /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/scripts/qapi-gen.py -o qga/qapi-generated -p "qga-" /wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/qga/qapi-schema.json No filename or title gmake[1]: *** [/wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1/rules.mak:394: qemu-ga.8] Error 255 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: Leaving directory '/wrkdirs/usr/ports/emulators/qemu/work/qemu-4.2.1' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/emulators/qemu
Created attachment 217299 [details] patch for 4.2.1 The attached patch seems to fix this problem for me.
I was actually unable to recreate this problem in a clean system. http://pdr.bofh.network/data/latest-per-pkg/qemu/4.2.1/ But I will give it another try tonight after upgrading the jails. And one more thing is so far I know that manpages should be installed irrespective of PORTDOCS. So is the %%PORTDOCS%% really necessary in pkg-plist?
> I was actually unable to recreate this problem in a clean system. > > http://pdr.bofh.network/data/latest-per-pkg/qemu/4.2.1/ I looked at the logs there and all have 'DOCS=on'. To reproduce that, you'll need DOCS=off; it's reproducible for me both in pourdiere with OPTIONS_UNSET=DOCS (which I use for my normal builds) and also locally if I configure qemu with DOCS=off and just do `make clean check-plist`. I think updating jails should not be required to reproduce this. > And one more thing is so far I know that manpages should be > installed irrespective of PORTDOCS. > So is the %%PORTDOCS%% really necessary in pkg-plist? Yeah, my patch is definitely not the best approach, and it's a blunt way of fixing things. There should be a better way to fix this.
Created attachment 217314 [details] fix qemu-ga.8 location for NOPORTDOCS Problem is qemu-ga.8 location changed to $(MANUAL_BUILDDIR)/interop/qemu-ga.8 in 4.2.1. r542523 fixed the location for "else" section but not for "ifdef NOPORTDOCS" section.
(In reply to guyyur from comment #14) This works for me, and looks good too.
(In reply to guyyur from comment #14) JFYI: Two weeks has passed since the fix was proposed (2020-08-18), I plan to commit it tomorrow if there'll be no feedback.
Oops. Now there are two patches now. Looks like guyyur@gmail.com's one is a better one? So which one are you proposing to commit ?
(In reply to Muhammad Moinur Rahman from comment #17) Yes, guyyur@gmail.com's patch seems better to me too, I think it's the one that needs to be committed. Thanks
(In reply to Roman Bogorodskiy from comment #18) I will commit it by tonight. And next time please create a different/new bugs. Somehow this doesn't show up in my buglist. :(
A commit references this bug: Author: bofh Date: Tue Sep 1 22:26:49 UTC 2020 New revision: 547301 URL: https://svnweb.freebsd.org/changeset/ports/547301 Log: emulators/qemu: Fix build with OPTION DOCS disabled PR: 230204 Submitted by: guyyur@gmail.com Reported by: novel Changes: head/emulators/qemu/files/patch-Makefile