Bug 230204 - emulators/qemu 2.12.0 fails to build with option DOCS disabled, unless pass disable-docs to configure
Summary: emulators/qemu 2.12.0 fails to build with option DOCS disabled, unless pass d...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
: 234400 (view as bug list)
Depends on:
Reported: 2018-07-30 23:09 UTC by dewayne
Modified: 2020-07-26 02:25 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (bofh)

fix port when docs are disabled (1.74 KB, patch)
2018-08-29 08:24 UTC, Steven Hartland
no flags Details | Diff
fix build without docs while still building man pages (870 bytes, patch)
2018-11-04 19:27 UTC, guyyur
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2018-07-30 23:09:33 UTC
With these options
# make -C /usr/ports/emulators/qemu showconfig|grep =on
     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
Comment 1 dewayne 2018-07-30 23:51:40 UTC
Also modified pkg-plist to build a package successfully,
sed /^man\\/man/d /usr/ports/emulators/qemu/pkg-plist.
Comment 2 Steven Hartland freebsd_committer 2018-08-29 08:24:58 UTC
Created attachment 196669 [details]
fix port when docs are disabled
Comment 3 dewayne 2018-08-29 17:40:57 UTC
(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 :)
Comment 4 guyyur 2018-11-04 19:27:26 UTC
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
Comment 5 Muhammad Moinur Rahman freebsd_committer 2018-12-18 09:56:37 UTC
disabling DOCS shouldn't exclude man pages unless there are lots of man pages.
Comment 6 Muhammad Moinur Rahman freebsd_committer 2018-12-31 20:19:57 UTC
*** Bug 234400 has been marked as a duplicate of this bug. ***
Comment 7 guyyur 2019-01-01 18:10:10 UTC
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.
Comment 8 commit-hook freebsd_committer 2019-02-12 21:48:59 UTC
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

  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

Comment 9 dewayne 2019-02-13 03:59:30 UTC
(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
     NCURSES=on: Console (text) interface support
     PCAP=on: pcap dependency (networking with bpf)
     STATIC_LINK=on: Statically link the executables
Comment 10 Roman Bogorodskiy freebsd_committer 2020-07-26 02:25:19 UTC
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
     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

make: stopped in /usr/ports/emulators/qemu