Skip to contentSkip to conversation

configure: helpfully output package names for some missing dependencies.

PATCH In review Stewart Smith 4 participants 14 messages Jan 23, 2014 – Feb 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: helpfully output package names for some missing dependencies.

This just makes it a tiny bit easier for new developers to get started by making it easy to see what package they need to install to get the dependency.

---
 configure | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
configure +10 -2
index 3782a6a..87303f6 100755
@@ -1532,7 +1532,9 @@ EOF
         :
     else
         error_exit "zlib check failed" \
-            "Make sure to have the zlib libs and headers installed."
+            "Make sure to have the zlib libs and headers installed." \
+            "Debian/Ubuntu: zlib1g-dev" \
+            "Fedora/RHEL: zlib-devel"
     fi
 fi
 libs_softmmu="$libs_softmmu -lz"
@@ -2348,7 +2350,9 @@ if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then
     LIBS="$glib_libs $LIBS"
     libs_qga="$glib_libs $libs_qga"
 else
-    error_exit "glib-$glib_req_ver required to compile QEMU"
+    error_exit "glib-$glib_req_ver required to compile QEMU."\
+               "Debian/Ubuntu: libglib2.0-dev" \
+               "Fedora/RHEL: glib2-devel"
 fi
 
 ##########################################
@@ -2380,6 +2384,8 @@ else
     error_exit "pixman not present. Your options:" \
         "  (1) Preferred: Install the pixman devel package (any recent" \
         "      distro should have packages as Xorg needs pixman too)." \
+	"      Ubuntu/Debian: libpixman-1-dev" \
+        "      Fedora/RHEL: pixman-devel"\
         "  (2) Fetch the pixman submodule, using:" \
         "      git submodule update --init pixman"
   fi
@@ -2656,6 +2662,8 @@ EOF
     # have neither and want - prompt for system/submodule install
     error_exit "DTC not present. Your options:" \
         "  (1) Preferred: Install the DTC devel package" \
+	"      Ubuntu/Debian: libfdt-dev" \
+        "      Fedora/RHEL: libfdt-devel" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else
Signature · 1 line
1.8.4.2
#1 lore raw

Hi Steward,

Am 23.01.2014 05:54, schrieb Stewart Smith:

Quoted 14 lines

This just makes it a tiny bit easier for new developers to get started by making it easy to see what package they need to install to get the dependency.

---
 configure | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
configure +0 -0
index 3782a6a..87303f6 100755

configure EOF · line 1539

Quoted 9 lines
configure +3 -1
@@ -1532,7 +1532,9 @@ EOF
         :
     else
         error_exit "zlib check failed" \
-            "Make sure to have the zlib libs and headers installed."
+            "Make sure to have the zlib libs and headers installed." \
+            "Debian/Ubuntu: zlib1g-dev" \
+            "Fedora/RHEL: zlib-devel"
     fi
 fi

Removing that zlib check is on my private todo list since QEMU uses glib2, because glib2 already depends on zlib.

Quoted 22 lines
configure +5 -1
 libs_softmmu="$libs_softmmu -lz"
@@ -2348,7 +2350,9 @@ if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then
     LIBS="$glib_libs $LIBS"
     libs_qga="$glib_libs $libs_qga"
 else
-    error_exit "glib-$glib_req_ver required to compile QEMU"
+    error_exit "glib-$glib_req_ver required to compile QEMU."\
+               "Debian/Ubuntu: libglib2.0-dev" \
+               "Fedora/RHEL: glib2-devel"
 fi
 
 ##########################################
@@ -2380,6 +2384,8 @@ else
     error_exit "pixman not present. Your options:" \
         "  (1) Preferred: Install the pixman devel package (any recent" \
         "      distro should have packages as Xorg needs pixman too)." \
+	"      Ubuntu/Debian: libpixman-1-dev" \
+        "      Fedora/RHEL: pixman-devel"\
         "  (2) Fetch the pixman submodule, using:" \
         "      git submodule update --init pixman"
   fi

configure EOF · line 2665

Quoted 4 lines
configure +1 -0
@@ -2656,6 +2662,8 @@ EOF
     # have neither and want - prompt for system/submodule install
     error_exit "DTC not present. Your options:" \
         "  (1) Preferred: Install the DTC devel package" \
+	"      Ubuntu/Debian: libfdt-dev" \

The previous line uses a tab character. Replace it by blanks.

Here a small hint might by useful because searching for 'DTC' packages will usually fail. What about writing "DTC (libfdt) devel package"?

configure EOF · line 2669

Quoted 5 lines
configure +1 -0
+        "      Fedora/RHEL: libfdt-devel" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else

I'm not sure whether the file 'configure' is the right place for the precise package information. Here are some thoughts:

* Those help messages are only useful for Debian / Fedore based Linux distributions, but not for OpenSuSE and definitely not for other hosts (Mac OS X, Windows, BSD).

* They only cover a very limited set of packages. For a really useful QEMU, lots of more packages are needed.

* Package names are not really good interfaces because they tend to change over time.

My personal impression is that the current hints in configure are sufficient (with the one exception DTC) and that the QEMU wiki is a better place to document build dependencies for the different platforms.

Cheers
Stefan

#2 lore raw
Quoted 3 lines · Stefan Weil

My personal impression is that the current hints in configure are sufficient (with the one exception DTC) and that the QEMU wiki is a better place to document build dependencies for the different platforms.

I tend to agree, with the exception that our "feature_not_found()" errors are excessively cryptic, because we just pass a single word to that function, and so we end up saying "User requested feature docs, configure was not able to find it" when what we actually mean is "You need to install makeinfo and pod2man to build the documentation".

thanks
-- PMM

#3 lore raw
In reply to Stefan Weil
Quoted 10 lines · Stefan Weil

Am 23.01.2014 05:54, schrieb Stewart Smith:

Quoted 9 lines
configure +0 -1
index 3782a6a..87303f6 100755
@@ -1532,7 +1532,9 @@ EOF
         :
     else
         error_exit "zlib check failed" \
-            "Make sure to have the zlib libs and headers installed."
Quoted 8 lines

configure EOF · line 1539

Quoted 5 lines
configure +3 -0
+            "Make sure to have the zlib libs and headers installed." \
+            "Debian/Ubuntu: zlib1g-dev" \
+            "Fedora/RHEL: zlib-devel"
     fi
 fi

Removing that zlib check is on my private todo list since QEMU uses glib2, because glib2 already depends on zlib.

It may have some value existing as (at least on Fedora) glib2-devel depends on libz.so.1 (i.e. zlib) but *not* on zlib-devel, so if we just checked for glib2 we'd get the lib but not the headers for zlib, thus having a failing build.

Quoted 7 lines

configure EOF · line 2665

Quoted 5 lines
configure +1 -0
@@ -2656,6 +2662,8 @@ EOF
     # have neither and want - prompt for system/submodule install
     error_exit "DTC not present. Your options:" \
         "  (1) Preferred: Install the DTC devel package" \
+	"      Ubuntu/Debian: libfdt-dev" \

The previous line uses a tab character. Replace it by blanks.

ack. Will do.

Quoted 2 lines

Here a small hint might by useful because searching for 'DTC' packages will usually fail. What about writing "DTC (libfdt) devel package"?

ack, will do.

Quoted 8 lines

configure EOF · line 2669

Quoted 5 lines
configure +1 -0
+        "      Fedora/RHEL: libfdt-devel" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else

I'm not sure whether the file 'configure' is the right place for the precise package information. Here are some thoughts:

It's possibly not the ideal place, but I've never found an ideal place. In other projects I've had the list of package names bitrot in:
- configure output
- README
- HACKING
- INSTALL
- some other documentation that ends up on a web site

Pretty much the only place it hasn't bitrotted is puppet manifests and modules for setting up build machines... which isn't the *ideal* form of documentation :)

That being said, I've found the package names outputted by configure to be useful, even if not always perfect.

Quoted 3 lines

* Those help messages are only useful for Debian / Fedore based Linux distributions, but not for OpenSuSE and definitely not for other hosts (Mac OS X, Windows, BSD).

My guess is that for OSX, Windows and BSD the git submodule option may be taken more often?

I'll happily add in the OpenSuSE packages.. I'm just a bit less experienced with OpenSuSE (maybe it's time for a VM though).

Quoted 2 lines

* They only cover a very limited set of packages. For a really useful QEMU, lots of more packages are needed.

That was to be my next patch: fleshing out the list and thinking of somewhere to put the optional package names so that they're easily discoverable.

Quoted 2 lines

* Package names are not really good interfaces because they tend to change over time.

Yep, they do - but this is relatively rare, and usually it's a version number bump, and the old name usually gives you something to search for that only gives a couple of results (rather than dozens).

Quoted 3 lines

My personal impression is that the current hints in configure are sufficient (with the one exception DTC) and that the QEMU wiki is a better place to document build dependencies for the different platforms.

I'd vote for and rather than or, simply because I'm not good enough to read all the Wiki docs before typing "./configure && make" and I suspect I'm not the only one in the world :)

#4 lore raw

v2 cover configure: make output and errors more friendly

In reply to Stewart Smith

This expands on my previous patch which was just the "configure: helpfully output package names for some missing dependencies" patch.

Based on feedback I've added a hint to the could not find DTC error message.

There's also other changes that were suggested and the ordering of output from configure and configure --help which I found rather useful when attempting to find what package was needed for each configure option.

Stewart Smith (6):
configure: add hint of libfdt to DTC dependency not found message
configure: sort output of configure results alphabetically
configure: alphabetize output of --help and separate into groups
configure: add help for --disable-xfsctl and --enable-xfsctl
configure: add hints to a remedy for feature_not_found errors
configure: helpfully output package names for some missing
dependencies.

 configure | 378 ++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 197 insertions(+), 181 deletions(-)
Signature · 1 line
1.8.4.2
#5 lore raw

PATCH v2 1/6 configure: add hint of libfdt to DTC dependency not found message

Most distros package it as libfdt, and mentioning libfdt here makes it much easier to find the package you're missing.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 3782a6a..8b6e64a 100755
@@ -2654,8 +2654,8 @@ EOF
     fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
   elif test "$fdt" = "yes" ; then
     # have neither and want - prompt for system/submodule install
-    error_exit "DTC not present. Your options:" \
-        "  (1) Preferred: Install the DTC devel package" \
+    error_exit "DTC (libfdt) not present. Your options:" \
+        "  (1) Preferred: Install the DTC (libfdt) devel package" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else
Signature · 1 line
1.8.4.2
Reviewed-by on v2 1/6
#6 lore raw

Re: [Qemu-devel] [PATCH v2 1/6] configure: add hint of libfdt to DTC dependency not found message

Am 24.01.2014 02:39, schrieb Stewart Smith:

Quoted 14 lines

Most distros package it as libfdt, and mentioning libfdt here makes it much easier to find the package you're missing.

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +0 -0
index 3782a6a..8b6e64a 100755

configure EOF · line 2661

Quoted 10 lines
configure +2 -2
@@ -2654,8 +2654,8 @@ EOF
     fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
   elif test "$fdt" = "yes" ; then
     # have neither and want - prompt for system/submodule install
-    error_exit "DTC not present. Your options:" \
-        "  (1) Preferred: Install the DTC devel package" \
+    error_exit "DTC (libfdt) not present. Your options:" \
+        "  (1) Preferred: Install the DTC (libfdt) devel package" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else
#7 lore raw

PATCH v2 2/6 configure: sort output of configure results alphabetically

In reply to Stewart Smith

Keep the paths and compiler/target details at the top, but sort all the yes/no features alphabetically, making it much easier to both browse through and to check if a feature you want has been enabled or not. Eyes can be faster than grep.

---
 configure | 118 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 59 insertions(+), 59 deletions(-)
configure +59 -59
index 8b6e64a..e61708a 100755
@@ -3722,6 +3722,7 @@ QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags $fdt_cflags"
 libs_softmmu="$libs_softmmu $pixman_libs"
 
 echo "Install prefix    $prefix"
+echo "Install blobs     $blobs"
 echo "BIOS directory    `eval echo $qemu_datadir`"
 echo "binary directory  `eval echo $bindir`"
 echo "library directory `eval echo $libdir`"
@@ -3753,92 +3754,91 @@ if test "$slirp" = "yes" ; then
 fi
 echo "host CPU          $cpu"
 echo "host big endian   $bigendian"
+[ ! -z "$uname_release" ] && \
+echo "uname -r          $uname_release"
 echo "target list       $target_list"
+if test -n "$sparc_cpu"; then
+    echo "Target Sparc Arch $sparc_cpu"
+fi
 echo "tcg debug enabled $debug_tcg"
 echo "gprof enabled     $gprof"
 echo "sparse enabled    $sparse"
 echo "strip binaries    $strip_opt"
 echo "profiler          $profiler"
 echo "static build      $static"
+echo "PIE               $pie"
 echo "-Werror enabled   $werror"
+echo "ATTR/XATTR support $attr"
+echo "Audio drivers     $audio_drv_list"
+echo "Block whitelist (rw) $block_drv_rw_whitelist"
+echo "Block whitelist (ro) $block_drv_ro_whitelist"
+echo "bluez  support    $bluez"
+echo "brlapi support    $brlapi"
+echo "build guest agent $guest_agent"
 if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
 fi
-echo "pixman            $pixman"
-echo "SDL support       $sdl"
-echo "GTK support       $gtk"
+echo "coroutine backend $coroutine"
+echo "coroutine pool    $coroutine_pool"
 echo "curses support    $curses"
 echo "curl support      $curl"
-echo "mingw32 support   $mingw32"
-echo "Audio drivers     $audio_drv_list"
-echo "Block whitelist (rw) $block_drv_rw_whitelist"
-echo "Block whitelist (ro) $block_drv_ro_whitelist"
-echo "VirtFS support    $virtfs"
-echo "VNC support       $vnc"
-if test "$vnc" = "yes" ; then
-    echo "VNC TLS support   $vnc_tls"
-    echo "VNC SASL support  $vnc_sasl"
-    echo "VNC JPEG support  $vnc_jpeg"
-    echo "VNC PNG support   $vnc_png"
-    echo "VNC WS support    $vnc_ws"
-fi
-if test -n "$sparc_cpu"; then
-    echo "Target Sparc Arch $sparc_cpu"
-fi
-echo "xen support       $xen"
-echo "brlapi support    $brlapi"
-echo "bluez  support    $bluez"
 echo "Documentation     $docs"
-[ ! -z "$uname_release" ] && \
-echo "uname -r          $uname_release"
+echo "fdatasync         $fdatasync"
+echo "fdt support       $fdt"
+echo "gcov              $gcov_tool"
+echo "gcov enabled      $gcov"
+echo "GTK support       $gtk"
+echo "GlusterFS support $glusterfs"
+echo "GLX support       $glx"
 echo "GUEST_BASE        $guest_base"
-echo "PIE               $pie"
-echo "vde support       $vde"
-echo "netmap support    $netmap"
-echo "Linux AIO support $linux_aio"
-echo "ATTR/XATTR support $attr"
-echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
-echo "RDMA support      $rdma"
-echo "TCG interpreter   $tcg_interpreter"
-echo "fdt support       $fdt"
-echo "preadv support    $preadv"
-echo "fdatasync         $fdatasync"
-echo "madvise           $madvise"
-echo "posix_madvise     $posix_madvise"
-echo "sigev_thread_id   $sigev_thread_id"
-echo "uuid support      $uuid"
 echo "libcap-ng support $cap_ng"
-echo "vhost-net support $vhost_net"
-echo "vhost-scsi support $vhost_scsi"
-echo "Trace backend     $trace_backend"
-echo "Trace output file $trace_file-<pid>"
-echo "spice support     $spice ($spice_protocol_version/$spice_server_version)"
-echo "rbd support       $rbd"
-echo "xfsctl support    $xfs"
-echo "nss used          $smartcard_nss"
-echo "libusb            $libusb"
-echo "usb net redir     $usb_redir"
-echo "GLX support       $glx"
 if test "$libiscsi_version" = "1.4.0"; then
 echo "libiscsi support  $libiscsi (1.4.0)"
 else
 echo "libiscsi support  $libiscsi"
 fi
-echo "build guest agent $guest_agent"
+echo "libssh2 support   $libssh2"
+echo "libusb            $libusb"
+echo "Linux AIO support $linux_aio"
+echo "madvise           $madvise"
+echo "mingw32 support   $mingw32"
+echo "netmap support    $netmap"
+echo "nss used          $smartcard_nss"
+echo "pixman            $pixman"
+echo "preadv support    $preadv"
+echo "posix_madvise     $posix_madvise"
 echo "QGA VSS support   $guest_agent_with_vss"
+echo "QOM debugging     $qom_cast_debug"
+echo "rbd support       $rbd"
+echo "RDMA support      $rdma"
+echo "SDL support       $sdl"
 echo "seccomp support   $seccomp"
-echo "coroutine backend $coroutine"
-echo "coroutine pool    $coroutine_pool"
-echo "GlusterFS support $glusterfs"
-echo "virtio-blk-data-plane $virtio_blk_data_plane"
-echo "gcov              $gcov_tool"
-echo "gcov enabled      $gcov"
+echo "sigev_thread_id   $sigev_thread_id"
+echo "spice support     $spice ($spice_protocol_version/$spice_server_version)"
+echo "TCG interpreter   $tcg_interpreter"
 echo "TPM support       $tpm"
-echo "libssh2 support   $libssh2"
 echo "TPM passthrough   $tpm_passthrough"
-echo "QOM debugging     $qom_cast_debug"
+echo "Trace backend     $trace_backend"
+echo "Trace output file $trace_file-<pid>"
+echo "usb net redir     $usb_redir"
+echo "uuid support      $uuid"
+echo "vde support       $vde"
 echo "vhdx              $vhdx"
+echo "vhost-net support $vhost_net"
+echo "vhost-scsi support $vhost_scsi"
+echo "VirtFS support    $virtfs"
+echo "VNC support       $vnc"
+if test "$vnc" = "yes" ; then
+    echo "VNC TLS support   $vnc_tls"
+    echo "VNC SASL support  $vnc_sasl"
+    echo "VNC JPEG support  $vnc_jpeg"
+    echo "VNC PNG support   $vnc_png"
+    echo "VNC WS support    $vnc_ws"
+fi
+echo "virtio-blk-data-plane $virtio_blk_data_plane"
+echo "xen support       $xen"
+echo "xfsctl support    $xfs"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
Signature · 1 line
1.8.4.2
#8 lore raw

PATCH v2 3/6 configure: alphabetize output of --help and separate into groups

In reply to Stewart Smith

This should make it (slightly) easier to discover configure options. I've tried to separate out build options (e.g. gcov) from feature options (such as gtk).

---
 configure | 174 ++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 89 insertions(+), 85 deletions(-)
configure +89 -85
index e61708a..c225291 100755
@@ -1102,7 +1102,7 @@ Standard options:
 $(echo Available targets: $default_target_list | \
   fold -s -w 53 | sed -e 's/^/                           /')
 
-Advanced options (experts only):
+Advanced options, build (experts only):
   --source-path=PATH       path of source code [$source_path]
   --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]
   --cc=CC                  use C compiler CC [$cc]
@@ -1135,16 +1135,18 @@ Advanced options (experts only):
   --disable-sparse         disable sparse checker (default)
   --disable-strip          disable stripping binaries
   --disable-werror         disable compilation abort on warning
-  --disable-sdl            disable SDL
-  --enable-sdl             enable SDL
-  --disable-gtk            disable gtk UI
-  --enable-gtk             enable gtk UI
-  --disable-virtfs         disable VirtFS
-  --enable-virtfs          enable VirtFS
-  --disable-vnc            disable VNC
-  --enable-vnc             enable VNC
-  --disable-cocoa          disable Cocoa (Mac OS X only)
-  --enable-cocoa           enable Cocoa (default on Mac OS X)
+  --disable-attr           disables attr and xattr support
+  --enable-attr            enable attr and xattr support
+  --enable-pie             build Position Independent Executables
+  --disable-pie            do not build Position Independent Executables
+  --cpu=CPU                Build for host CPU [$cpu]
+  --disable-blobs          disable installing provided firmware blobs
+  --enable-gcov            enable test coverage analysis with gcov
+  --gcov=GCOV              use specified gcov [$gcov_tool]
+  --enable-docs            enable documentation build
+  --disable-docs           disable documentation build
+
+Advanced options, features (experts only):
   --audio-drv-list=LIST    set audio drivers list:
                            Available drivers: $audio_possible_drivers
   --block-drv-whitelist=L  Same as --block-drv-rw-whitelist=L
@@ -1154,105 +1156,107 @@ Advanced options (experts only):
   --block-drv-ro-whitelist=L
                            set block driver read-only whitelist
                            (affects only QEMU, not qemu-img)
-  --disable-xen            disable xen backend driver support
-  --enable-xen             enable xen backend driver support
-  --disable-xen-pci-passthrough
-  --enable-xen-pci-passthrough
   --disable-brlapi         disable BrlAPI
   --enable-brlapi          enable BrlAPI
-  --disable-vnc-tls        disable TLS encryption for VNC server
-  --enable-vnc-tls         enable TLS encryption for VNC server
-  --disable-vnc-sasl       disable SASL encryption for VNC server
-  --enable-vnc-sasl        enable SASL encryption for VNC server
-  --disable-vnc-jpeg       disable JPEG lossy compression for VNC server
-  --enable-vnc-jpeg        enable JPEG lossy compression for VNC server
-  --disable-vnc-png        disable PNG compression for VNC server (default)
-  --enable-vnc-png         enable PNG compression for VNC server
-  --disable-vnc-ws         disable Websockets support for VNC server
-  --enable-vnc-ws          enable Websockets support for VNC server
-  --disable-curses         disable curses output
-  --enable-curses          enable curses output
+  --disable-bluez          disable bluez stack connectivity
+  --enable-bluez           enable bluez stack connectivity
+  --disable-cap-ng         disable libcap-ng support
+  --enable-cap-ng          enable libcap-ng support
+  --disable-cocoa          disable Cocoa (Mac OS X only)
+  --enable-cocoa           enable Cocoa (default on Mac OS X)
+  --with-coroutine=BACKEND coroutine backend. Supported options:
+                           gthread, ucontext, sigaltstack, windows
+  --disable-coroutine-pool disable coroutine freelist (worse performance)
+  --enable-coroutine-pool  enable coroutine freelist (better performance)
   --disable-curl           disable curl connectivity
   --enable-curl            enable curl connectivity
+  --disable-curses         disable curses output
+  --enable-curses          enable curses output
   --disable-fdt            disable fdt device tree
   --enable-fdt             enable fdt device tree
-  --disable-bluez          disable bluez stack connectivity
-  --enable-bluez           enable bluez stack connectivity
-  --disable-slirp          disable SLIRP userspace network connectivity
-  --disable-kvm            disable KVM acceleration support
-  --enable-kvm             enable KVM acceleration support
+  --fmod-lib               path to FMOD library
+  --fmod-inc               path to FMOD includes
+  --enable-glusterfs       enable GlusterFS backend
+  --disable-glusterfs      disable GlusterFS backend
+  --disable-gtk            disable gtk UI
+  --enable-gtk             enable gtk UI
+  --enable-guest-base      enable GUEST_BASE support for usermode
+                           emulation targets
+  --disable-guest-base     disable GUEST_BASE support
   --disable-rdma           disable RDMA-based migration support
   --enable-rdma            enable RDMA-based migration support
-  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+  --disable-kvm            disable KVM acceleration support
+  --enable-kvm             enable KVM acceleration support
+  --disable-libiscsi       disable iscsi support
+  --enable-libiscsi        enable iscsi support
+  --disable-libssh2        disable ssh block device support
+  --enable-libssh2         enable ssh block device support
+  --disable-libusb         disable libusb (for usb passthrough)
+  --enable-libusb          enable libusb (for usb passthrough)
+  --disable-linux-aio      disable Linux AIO support
+  --enable-linux-aio       enable Linux AIO support
+  --disable-netmap         disable support for netmap network
+  --enable-netmap          enable support for netmap network
+  --enable-rbd             enable building the rados block device (rbd)
+  --disable-sdl            disable SDL
+  --enable-sdl             enable SDL
+  --disable-seccomp        disable seccomp support
+  --enable-seccomp         enables seccomp support
+  --disable-slirp          disable SLIRP userspace network connectivity
+  --disable-smartcard-nss  disable smartcard nss support
+  --enable-smartcard-nss   enable smartcard nss support
+  --disable-spice          disable spice
+  --enable-spice           enable spice
   --enable-system          enable all system emulation targets
   --disable-system         disable all system emulation targets
+  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+  --enable-tpm             enable TPM support
+  --enable-trace-backend=B Set trace backend
+                           Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
+  --with-trace-file=NAME   Full PATH,NAME of file to store traces
+                           Default:trace-<pid>
   --enable-user            enable supported user emulation targets
   --disable-user           disable all user emulation targets
-  --enable-linux-user      enable all linux usermode emulation targets
-  --disable-linux-user     disable all linux usermode emulation targets
   --enable-bsd-user        enable all BSD usermode emulation targets
   --disable-bsd-user       disable all BSD usermode emulation targets
-  --enable-guest-base      enable GUEST_BASE support for usermode
-                           emulation targets
-  --disable-guest-base     disable GUEST_BASE support
-  --enable-pie             build Position Independent Executables
-  --disable-pie            do not build Position Independent Executables
-  --fmod-lib               path to FMOD library
-  --fmod-inc               path to FMOD includes
+  --enable-linux-user      enable all linux usermode emulation targets
+  --disable-linux-user     disable all linux usermode emulation targets
   --oss-lib                path to OSS library
   --enable-uname-release=R Return R for uname -r in usermode emulation
-  --cpu=CPU                Build for host CPU [$cpu]
+  --disable-usb-redir      disable usb network redirection support
+  --enable-usb-redir       enable usb network redirection support
   --disable-uuid           disable uuid support
   --enable-uuid            enable uuid support
   --disable-vde            disable support for vde network
   --enable-vde             enable support for vde network
-  --disable-netmap         disable support for netmap network
-  --enable-netmap          enable support for netmap network
-  --disable-linux-aio      disable Linux AIO support
-  --enable-linux-aio       enable Linux AIO support
-  --disable-cap-ng         disable libcap-ng support
-  --enable-cap-ng          enable libcap-ng support
-  --disable-attr           disables attr and xattr support
-  --enable-attr            enable attr and xattr support
-  --disable-blobs          disable installing provided firmware blobs
-  --enable-docs            enable documentation build
-  --disable-docs           disable documentation build
+  --disable-vhdx           disables support for the Microsoft VHDX image format
+  --enable-vhdx            enable support for the Microsoft VHDX image format
   --disable-vhost-net      disable vhost-net acceleration support
   --enable-vhost-net       enable vhost-net acceleration support
-  --enable-trace-backend=B Set trace backend
-                           Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
-  --with-trace-file=NAME   Full PATH,NAME of file to store traces
-                           Default:trace-<pid>
-  --disable-spice          disable spice
-  --enable-spice           enable spice
-  --enable-rbd             enable building the rados block device (rbd)
-  --disable-libiscsi       disable iscsi support
-  --enable-libiscsi        enable iscsi support
-  --disable-smartcard-nss  disable smartcard nss support
-  --enable-smartcard-nss   enable smartcard nss support
-  --disable-libusb         disable libusb (for usb passthrough)
-  --enable-libusb          enable libusb (for usb passthrough)
-  --disable-usb-redir      disable usb network redirection support
-  --enable-usb-redir       enable usb network redirection support
+  --disable-virtfs         disable VirtFS
+  --enable-virtfs          enable VirtFS
+  --disable-vnc            disable VNC
+  --enable-vnc             enable VNC
+  --disable-vnc-jpeg       disable JPEG lossy compression for VNC server
+  --enable-vnc-jpeg        enable JPEG lossy compression for VNC server
+  --disable-vnc-png        disable PNG compression for VNC server (default)
+  --enable-vnc-png         enable PNG compression for VNC server
+  --disable-vnc-sasl       disable SASL encryption for VNC server
+  --enable-vnc-sasl        enable SASL encryption for VNC server
+  --disable-vnc-tls        disable TLS encryption for VNC server
+  --enable-vnc-tls         enable TLS encryption for VNC server
+  --disable-vnc-ws         disable Websockets support for VNC server
+  --enable-vnc-ws          enable Websockets support for VNC server
+  --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb)
+  --disable-xen            disable xen backend driver support
+  --enable-xen             enable xen backend driver support
+  --disable-xen-pci-passthrough
+  --enable-xen-pci-passthrough
+
+Advanced options, Guest Agent (experts only):
   --disable-guest-agent    disable building of the QEMU Guest Agent
   --enable-guest-agent     enable building of the QEMU Guest Agent
   --with-vss-sdk=SDK-path  enable Windows VSS support in QEMU Guest Agent
-  --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb)
-  --disable-seccomp        disable seccomp support
-  --enable-seccomp         enables seccomp support
-  --with-coroutine=BACKEND coroutine backend. Supported options:
-                           gthread, ucontext, sigaltstack, windows
-  --disable-coroutine-pool disable coroutine freelist (worse performance)
-  --enable-coroutine-pool  enable coroutine freelist (better performance)
-  --enable-glusterfs       enable GlusterFS backend
-  --disable-glusterfs      disable GlusterFS backend
-  --enable-gcov            enable test coverage analysis with gcov
-  --gcov=GCOV              use specified gcov [$gcov_tool]
-  --enable-tpm             enable TPM support
-  --disable-libssh2        disable ssh block device support
-  --enable-libssh2         enable ssh block device support
-  --disable-vhdx           disables support for the Microsoft VHDX image format
-  --enable-vhdx            enable support for the Microsoft VHDX image format
 
 NOTE: The object files are built at the place where configure is launched
 EOF
Signature · 1 line
1.8.4.2
#9 lore raw

Re: [Qemu-devel] [PATCH v2 3/6] configure: alphabetize output of --help and separate into groups

Am 24.01.2014 02:39, schrieb Stewart Smith:

Quoted 224 lines

This should make it (slightly) easier to discover configure options. I've tried to separate out build options (e.g. gcov) from feature options (such as gtk).

---
 configure | 174 ++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 89 insertions(+), 85 deletions(-)
configure +89 -78
index e61708a..c225291 100755
@@ -1102,7 +1102,7 @@ Standard options:
 $(echo Available targets: $default_target_list | \
   fold -s -w 53 | sed -e 's/^/                           /')
 
-Advanced options (experts only):
+Advanced options, build (experts only):
   --source-path=PATH       path of source code [$source_path]
   --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]
   --cc=CC                  use C compiler CC [$cc]
@@ -1135,16 +1135,18 @@ Advanced options (experts only):
   --disable-sparse         disable sparse checker (default)
   --disable-strip          disable stripping binaries
   --disable-werror         disable compilation abort on warning
-  --disable-sdl            disable SDL
-  --enable-sdl             enable SDL
-  --disable-gtk            disable gtk UI
-  --enable-gtk             enable gtk UI
-  --disable-virtfs         disable VirtFS
-  --enable-virtfs          enable VirtFS
-  --disable-vnc            disable VNC
-  --enable-vnc             enable VNC
-  --disable-cocoa          disable Cocoa (Mac OS X only)
-  --enable-cocoa           enable Cocoa (default on Mac OS X)
+  --disable-attr           disables attr and xattr support
+  --enable-attr            enable attr and xattr support
+  --enable-pie             build Position Independent Executables
+  --disable-pie            do not build Position Independent Executables
+  --cpu=CPU                Build for host CPU [$cpu]
+  --disable-blobs          disable installing provided firmware blobs
+  --enable-gcov            enable test coverage analysis with gcov
+  --gcov=GCOV              use specified gcov [$gcov_tool]
+  --enable-docs            enable documentation build
+  --disable-docs           disable documentation build
+
+Advanced options, features (experts only):
   --audio-drv-list=LIST    set audio drivers list:
                            Available drivers: $audio_possible_drivers
   --block-drv-whitelist=L  Same as --block-drv-rw-whitelist=L
@@ -1154,105 +1156,107 @@ Advanced options (experts only):
   --block-drv-ro-whitelist=L
                            set block driver read-only whitelist
                            (affects only QEMU, not qemu-img)
-  --disable-xen            disable xen backend driver support
-  --enable-xen             enable xen backend driver support
-  --disable-xen-pci-passthrough
-  --enable-xen-pci-passthrough
   --disable-brlapi         disable BrlAPI
   --enable-brlapi          enable BrlAPI
-  --disable-vnc-tls        disable TLS encryption for VNC server
-  --enable-vnc-tls         enable TLS encryption for VNC server
-  --disable-vnc-sasl       disable SASL encryption for VNC server
-  --enable-vnc-sasl        enable SASL encryption for VNC server
-  --disable-vnc-jpeg       disable JPEG lossy compression for VNC server
-  --enable-vnc-jpeg        enable JPEG lossy compression for VNC server
-  --disable-vnc-png        disable PNG compression for VNC server (default)
-  --enable-vnc-png         enable PNG compression for VNC server
-  --disable-vnc-ws         disable Websockets support for VNC server
-  --enable-vnc-ws          enable Websockets support for VNC server
-  --disable-curses         disable curses output
-  --enable-curses          enable curses output
+  --disable-bluez          disable bluez stack connectivity
+  --enable-bluez           enable bluez stack connectivity
+  --disable-cap-ng         disable libcap-ng support
+  --enable-cap-ng          enable libcap-ng support
+  --disable-cocoa          disable Cocoa (Mac OS X only)
+  --enable-cocoa           enable Cocoa (default on Mac OS X)
+  --with-coroutine=BACKEND coroutine backend. Supported options:
+                           gthread, ucontext, sigaltstack, windows
+  --disable-coroutine-pool disable coroutine freelist (worse performance)
+  --enable-coroutine-pool  enable coroutine freelist (better performance)
   --disable-curl           disable curl connectivity
   --enable-curl            enable curl connectivity
+  --disable-curses         disable curses output
+  --enable-curses          enable curses output
   --disable-fdt            disable fdt device tree
   --enable-fdt             enable fdt device tree
-  --disable-bluez          disable bluez stack connectivity
-  --enable-bluez           enable bluez stack connectivity
-  --disable-slirp          disable SLIRP userspace network connectivity
-  --disable-kvm            disable KVM acceleration support
-  --enable-kvm             enable KVM acceleration support
+  --fmod-lib               path to FMOD library
+  --fmod-inc               path to FMOD includes
+  --enable-glusterfs       enable GlusterFS backend
+  --disable-glusterfs      disable GlusterFS backend
+  --disable-gtk            disable gtk UI
+  --enable-gtk             enable gtk UI
+  --enable-guest-base      enable GUEST_BASE support for usermode
+                           emulation targets
+  --disable-guest-base     disable GUEST_BASE support
   --disable-rdma           disable RDMA-based migration support
   --enable-rdma            enable RDMA-based migration support
-  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+  --disable-kvm            disable KVM acceleration support
+  --enable-kvm             enable KVM acceleration support
+  --disable-libiscsi       disable iscsi support
+  --enable-libiscsi        enable iscsi support
+  --disable-libssh2        disable ssh block device support
+  --enable-libssh2         enable ssh block device support
+  --disable-libusb         disable libusb (for usb passthrough)
+  --enable-libusb          enable libusb (for usb passthrough)
+  --disable-linux-aio      disable Linux AIO support
+  --enable-linux-aio       enable Linux AIO support
+  --disable-netmap         disable support for netmap network
+  --enable-netmap          enable support for netmap network
+  --enable-rbd             enable building the rados block device (rbd)
+  --disable-sdl            disable SDL
+  --enable-sdl             enable SDL
+  --disable-seccomp        disable seccomp support
+  --enable-seccomp         enables seccomp support
+  --disable-slirp          disable SLIRP userspace network connectivity
+  --disable-smartcard-nss  disable smartcard nss support
+  --enable-smartcard-nss   enable smartcard nss support
+  --disable-spice          disable spice
+  --enable-spice           enable spice
   --enable-system          enable all system emulation targets
   --disable-system         disable all system emulation targets
+  --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
+  --enable-tpm             enable TPM support
+  --enable-trace-backend=B Set trace backend
+                           Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
+  --with-trace-file=NAME   Full PATH,NAME of file to store traces
+                           Default:trace-<pid>
   --enable-user            enable supported user emulation targets
   --disable-user           disable all user emulation targets
-  --enable-linux-user      enable all linux usermode emulation targets
-  --disable-linux-user     disable all linux usermode emulation targets
   --enable-bsd-user        enable all BSD usermode emulation targets
   --disable-bsd-user       disable all BSD usermode emulation targets
-  --enable-guest-base      enable GUEST_BASE support for usermode
-                           emulation targets
-  --disable-guest-base     disable GUEST_BASE support
-  --enable-pie             build Position Independent Executables
-  --disable-pie            do not build Position Independent Executables
-  --fmod-lib               path to FMOD library
-  --fmod-inc               path to FMOD includes
+  --enable-linux-user      enable all linux usermode emulation targets
+  --disable-linux-user     disable all linux usermode emulation targets
   --oss-lib                path to OSS library
   --enable-uname-release=R Return R for uname -r in usermode emulation
-  --cpu=CPU                Build for host CPU [$cpu]
+  --disable-usb-redir      disable usb network redirection support
+  --enable-usb-redir       enable usb network redirection support
   --disable-uuid           disable uuid support
   --enable-uuid            enable uuid support
   --disable-vde            disable support for vde network
   --enable-vde             enable support for vde network
-  --disable-netmap         disable support for netmap network
-  --enable-netmap          enable support for netmap network
-  --disable-linux-aio      disable Linux AIO support
-  --enable-linux-aio       enable Linux AIO support
-  --disable-cap-ng         disable libcap-ng support
-  --enable-cap-ng          enable libcap-ng support
-  --disable-attr           disables attr and xattr support
-  --enable-attr            enable attr and xattr support
-  --disable-blobs          disable installing provided firmware blobs
-  --enable-docs            enable documentation build
-  --disable-docs           disable documentation build
+  --disable-vhdx           disables support for the Microsoft VHDX image format
+  --enable-vhdx            enable support for the Microsoft VHDX image format
   --disable-vhost-net      disable vhost-net acceleration support
   --enable-vhost-net       enable vhost-net acceleration support
-  --enable-trace-backend=B Set trace backend
-                           Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
-  --with-trace-file=NAME   Full PATH,NAME of file to store traces
-                           Default:trace-<pid>
-  --disable-spice          disable spice
-  --enable-spice           enable spice
-  --enable-rbd             enable building the rados block device (rbd)
-  --disable-libiscsi       disable iscsi support
-  --enable-libiscsi        enable iscsi support
-  --disable-smartcard-nss  disable smartcard nss support
-  --enable-smartcard-nss   enable smartcard nss support
-  --disable-libusb         disable libusb (for usb passthrough)
-  --enable-libusb          enable libusb (for usb passthrough)
-  --disable-usb-redir      disable usb network redirection support
-  --enable-usb-redir       enable usb network redirection support
+  --disable-virtfs         disable VirtFS
+  --enable-virtfs          enable VirtFS
+  --disable-vnc            disable VNC
+  --enable-vnc             enable VNC
+  --disable-vnc-jpeg       disable JPEG lossy compression for VNC server
+  --enable-vnc-jpeg        enable JPEG lossy compression for VNC server
+  --disable-vnc-png        disable PNG compression for VNC server (default)
+  --enable-vnc-png         enable PNG compression for VNC server
+  --disable-vnc-sasl       disable SASL encryption for VNC server
+  --enable-vnc-sasl        enable SASL encryption for VNC server
+  --disable-vnc-tls        disable TLS encryption for VNC server
+  --enable-vnc-tls         enable TLS encryption for VNC server
+  --disable-vnc-ws         disable Websockets support for VNC server
+  --enable-vnc-ws          enable Websockets support for VNC server
+  --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb)
+  --disable-xen            disable xen backend driver support
+  --enable-xen             enable xen backend driver support
+  --disable-xen-pci-passthrough
+  --enable-xen-pci-passthrough
+
+Advanced options, Guest Agent (experts only):
   --disable-guest-agent    disable building of the QEMU Guest Agent
   --enable-guest-agent     enable building of the QEMU Guest Agent
   --with-vss-sdk=SDK-path  enable Windows VSS support in QEMU Guest Agent
-  --with-win-sdk=SDK-path  path to Windows Platform SDK (to build VSS .tlb)
-  --disable-seccomp        disable seccomp support
-  --enable-seccomp         enables seccomp support
-  --with-coroutine=BACKEND coroutine backend. Supported options:
-                           gthread, ucontext, sigaltstack, windows
-  --disable-coroutine-pool disable coroutine freelist (worse performance)
-  --enable-coroutine-pool  enable coroutine freelist (better performance)
-  --enable-glusterfs       enable GlusterFS backend
-  --disable-glusterfs      disable GlusterFS backend

configure Advanced options (experts only): · line 1262

Quoted 10 lines
configure +0 -7
-  --enable-gcov            enable test coverage analysis with gcov
-  --gcov=GCOV              use specified gcov [$gcov_tool]
-  --enable-tpm             enable TPM support
-  --disable-libssh2        disable ssh block device support
-  --enable-libssh2         enable ssh block device support
-  --disable-vhdx           disables support for the Microsoft VHDX image format
-  --enable-vhdx            enable support for the Microsoft VHDX image format
 
 NOTE: The object files are built at the place where configure is launched
 EOF

May I suggest a different first step to make the help output more readable?

Do we really need two lines of help output for each pair of --enable-xxx and --disable-xxx? It would be sufficient to document only one variant if the other variant is always supported, too. My favourite is a pattern like this:

--disable-xxx        disable xxx support (default: enabled)
--disable-xxx        disable xxx support (default: auto detected)
--disable-xxx        disable xxx support (default)

A final hint could say "Instead of --disable-xxx you can also enforce a feature with --enable-xxx".

I like alphabetized sorts but would keep groups like the different selections for the gui interfaces. Those could be largely reduced if we used libvnc. That would also fix bugs and reduce the efforts needed for maintainance of QEMU, but that is a different topic :-)

Stefan

#10 lore raw

PATCH v2 4/6 configure: add help for --disable-xfsctl and --enable-xfsctl

In reply to Stewart Smith

Previously undocumented configure options

---
 configure | 2 ++
 1 file changed, 2 insertions(+)
configure +2 -0
index c225291..e607ebf 100755
@@ -1252,6 +1252,8 @@ Advanced options, features (experts only):
   --enable-xen             enable xen backend driver support
   --disable-xen-pci-passthrough
   --enable-xen-pci-passthrough
+  --disable-xfsctl         disable xfsctl calls in block/raw (posix)
+  --enable-xfsctl          enable xfsctl (ZERO_RANGE and UNRESVSP) in block/raw
 
 Advanced options, Guest Agent (experts only):
   --disable-guest-agent    disable building of the QEMU Guest Agent
Signature · 1 line
1.8.4.2
#11 lore raw

PATCH v2 5/6 configure: add hints to a remedy for feature_not_found errors

In reply to Stewart Smith

Modify feature_not_found to accept an optional second parameter to be printed after the generic feature not found error.

Modify most calls to feature_not_found to provide hints as to the packages that may be missing. The few calls remaining without a remedy are ones I couldn't work out how to remedy myself.

---
 configure | 68 ++++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 35 insertions(+), 33 deletions(-)
configure +35 -33
index e607ebf..4ad2de5 100755
@@ -1472,9 +1472,11 @@ esac
 
 feature_not_found() {
   feature=$1
+  remedy=$2
 
   error_exit "User requested feature $feature" \
-      "configure was not able to find it"
+      "configure was not able to find it." \
+      "$remedy"
 }
 
 # ---
@@ -1522,7 +1524,7 @@ int main(void) {
 }
 EOF
   if ! compile_object ; then
-    feature_not_found "nptl"
+    feature_not_found "nptl" "Install glibc and linux kernel headers."
   fi
 fi
 
@@ -1553,7 +1555,7 @@ if test "$seccomp" != "no" ; then
 	seccomp="yes"
     else
 	if test "$seccomp" = "yes"; then
-            feature_not_found "libseccomp"
+            feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0"
 	fi
 	seccomp="no"
     fi
@@ -1578,7 +1580,7 @@ EOF
   if ! compile_prog "" "$xen_libs" ; then
     # Xen not found
     if test "$xen" = "yes" ; then
-      feature_not_found "xen"
+      feature_not_found "xen" "Install xen devel"
     fi
     xen=no
 
@@ -1701,7 +1703,7 @@ EOF
   # Xen version unsupported
   else
     if test "$xen" = "yes" ; then
-      feature_not_found "xen (unsupported version)"
+      feature_not_found "xen (unsupported version)" "Install supported xen (e.g. 4.0, 3.4, 3.3)"
     fi
     xen=no
   fi
@@ -1750,7 +1752,7 @@ if test "$sparse" != "no" ; then
     sparse=yes
   else
     if test "$sparse" = "yes" ; then
-      feature_not_found "sparse"
+      feature_not_found "sparse" "Install sparse binary"
     fi
     sparse=no
   fi
@@ -1772,7 +1774,7 @@ if test "$gtk" != "no"; then
     fi
     if ! $pkg_config --exists "$gtkpackage >= $gtkversion"; then
         if test "$gtk" = "yes" ; then
-            feature_not_found "gtk"
+            feature_not_found "gtk" "Install gtk2 or gtk3 (requires --with-gtkabi=3.0 option to configure) devel"
         fi
         gtk="no"
     elif ! $pkg_config --exists "$vtepackage >= $vteversion"; then
@@ -1807,7 +1809,7 @@ elif has ${sdl_config}; then
   _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
 else
   if test "$sdl" = "yes" ; then
-    feature_not_found "sdl"
+    feature_not_found "sdl" "Install SDL devel"
   fi
   sdl=no
 fi
@@ -1851,7 +1853,7 @@ EOF
     fi # static link
   else # sdl not found
     if test "$sdl" = "yes" ; then
-      feature_not_found "sdl"
+      feature_not_found "sdl" "Install SDL devel"
     fi
     sdl=no
   fi # sdl compile test
@@ -1917,10 +1919,10 @@ EOF
     QEMU_CFLAGS="$QEMU_CFLAGS $vnc_tls_cflags"
   else
     if test "$vnc_tls" = "yes" ; then
-      feature_not_found "vnc-tls"
+      feature_not_found "vnc-tls" "Install gnutls devel"
     fi
     if test "$vnc_ws" = "yes" ; then
-      feature_not_found "vnc-ws"
+      feature_not_found "vnc-ws" "Install gnutls devel"
     fi
     vnc_tls=no
     vnc_ws=no
@@ -1944,7 +1946,7 @@ EOF
     QEMU_CFLAGS="$QEMU_CFLAGS $vnc_sasl_cflags"
   else
     if test "$vnc_sasl" = "yes" ; then
-      feature_not_found "vnc-sasl"
+      feature_not_found "vnc-sasl" "Install Cyrus SASL devel"
     fi
     vnc_sasl=no
   fi
@@ -1966,7 +1968,7 @@ EOF
     QEMU_CFLAGS="$QEMU_CFLAGS $vnc_jpeg_cflags"
   else
     if test "$vnc_jpeg" = "yes" ; then
-      feature_not_found "vnc-jpeg"
+      feature_not_found "vnc-jpeg" "Install libjpeg-turbo devel"
     fi
     vnc_jpeg=no
   fi
@@ -1998,7 +2000,7 @@ EOF
     QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags"
   else
     if test "$vnc_png" = "yes" ; then
-      feature_not_found "vnc-png"
+      feature_not_found "vnc-png" "Install libpng devel"
     fi
     vnc_png=no
   fi
@@ -2042,7 +2044,7 @@ EOF
     libs_tools="$uuid_libs $libs_tools"
   else
     if test "$uuid" = "yes" ; then
-      feature_not_found "uuid"
+      feature_not_found "uuid" "Install libuuid devel"
     fi
     uuid=no
   fi
@@ -2076,7 +2078,7 @@ EOF
     xfs="yes"
   else
     if test "$xfs" = "yes" ; then
-      feature_not_found "xfs"
+      feature_not_found "xfs" "Instal xfsprogs/xfslibs devel"
     fi
     xfs=no
   fi
@@ -2102,7 +2104,7 @@ EOF
     libs_tools="$vde_libs $libs_tools"
   else
     if test "$vde" = "yes" ; then
-      feature_not_found "vde"
+      feature_not_found "vde" "Install vde (Virtual Distributed Ethernet) devel"
     fi
     vde=no
   fi
@@ -2145,7 +2147,7 @@ EOF
     libs_tools="$cap_libs $libs_tools"
   else
     if test "$cap_ng" = "yes" ; then
-      feature_not_found "cap_ng"
+      feature_not_found "cap_ng" "Install libcap-ng devel"
     fi
     cap_ng=no
   fi
@@ -2250,7 +2252,7 @@ EOF
     libs_softmmu="$brlapi_libs $libs_softmmu"
   else
     if test "$brlapi" = "yes" ; then
-      feature_not_found "brlapi"
+      feature_not_found "brlapi" "Install brlapi devel"
     fi
     brlapi=no
   fi
@@ -2287,7 +2289,7 @@ EOF
     curses=yes
   else
     if test "$curses" = "yes" ; then
-      feature_not_found "curses"
+      feature_not_found "curses" "Install ncurses devel"
     fi
     curses=no
   fi
@@ -2313,7 +2315,7 @@ EOF
     libs_softmmu="$curl_libs $libs_softmmu"
   else
     if test "$curl" = "yes" ; then
-      feature_not_found "curl"
+      feature_not_found "curl" "Install libcurl devel"
     fi
     curl=no
   fi
@@ -2333,7 +2335,7 @@ EOF
     libs_softmmu="$bluez_libs $libs_softmmu"
   else
     if test "$bluez" = "yes" ; then
-      feature_not_found "bluez"
+      feature_not_found "bluez" "Install bluez-libs/libbluetooth devel"
     fi
     bluez="no"
   fi
@@ -2469,7 +2471,7 @@ EOF
     libs_softmmu="$rbd_libs $libs_softmmu"
   else
     if test "$rbd" = "yes" ; then
-      feature_not_found "rados block device"
+      feature_not_found "rados block device" "Install librbd/ceph devel"
     fi
     rbd=no
   fi
@@ -2535,7 +2537,7 @@ EOF
     libs_tools="$libs_tools -laio"
   else
     if test "$linux_aio" = "yes" ; then
-      feature_not_found "linux AIO"
+      feature_not_found "linux AIO" "Install libaio devel"
     fi
     linux_aio=no
   fi
@@ -2583,7 +2585,7 @@ EOF
     libattr=yes
   else
     if test "$attr" = "yes" ; then
-      feature_not_found "ATTR"
+      feature_not_found "ATTR" "Install libc6 or libattr devel"
     fi
     attr=no
   fi
@@ -2687,7 +2689,7 @@ EOF
     glx=yes
   else
     if test "$glx" = "yes" ; then
-      feature_not_found "glx"
+      feature_not_found "glx" "Install GL devel (e.g. MESA)"
     fi
     glx_libs=
     glx=no
@@ -2709,7 +2711,7 @@ if test "$glusterfs" != "no" ; then
     fi
   else
     if test "$glusterfs" = "yes" ; then
-      feature_not_found "GlusterFS backend support"
+      feature_not_found "GlusterFS backend support" "Install glusterfs-api devel"
     fi
     glusterfs="no"
   fi
@@ -3029,7 +3031,7 @@ if test "$docs" != "no" ; then
     docs=yes
   else
     if test "$docs" = "yes" ; then
-      feature_not_found "docs"
+      feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
     fi
     docs=no
   fi
@@ -3078,7 +3080,7 @@ EOF
     LIBS="$LIBS -liscsi"
   else
     if test "$libiscsi" = "yes" ; then
-      feature_not_found "libiscsi"
+      feature_not_found "libiscsi" "Install libiscsi devel"
     fi
     libiscsi="no"
   fi
@@ -3162,7 +3164,7 @@ EOF
     spice_server_version=$($pkg_config --modversion spice-server)
   else
     if test "$spice" = "yes" ; then
-      feature_not_found "spice"
+      feature_not_found "spice" "Install spice-server and spice-protocol devel"
     fi
     spice="no"
   fi
@@ -3212,7 +3214,7 @@ if test "$libusb" != "no" ; then
         libs_softmmu="$libs_softmmu $libusb_libs"
     else
         if test "$libusb" = "yes"; then
-            feature_not_found "libusb"
+            feature_not_found "libusb" "Install libusb devel"
         fi
         libusb="no"
     fi
@@ -3228,7 +3230,7 @@ if test "$usb_redir" != "no" ; then
         libs_softmmu="$libs_softmmu $usb_redir_libs"
     else
         if test "$usb_redir" = "yes"; then
-            feature_not_found "usb-redir"
+            feature_not_found "usb-redir" "Install usbredir devel"
         fi
         usb_redir="no"
     fi
@@ -4292,7 +4294,7 @@ if test "$trace_backend" = "ftrace"; then
     echo "CONFIG_TRACE_FTRACE=y" >> $config_host_mak
     trace_default=no
   else
-    feature_not_found "ftrace(trace backend)"
+    feature_not_found "ftrace(trace backend)" "ftrace requires Linux"
   fi
 fi
 echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
Signature · 1 line
1.8.4.2
#12 lore raw

PATCH v2 6/6 configure: helpfully output package names for some missing dependencies.

In reply to Stewart Smith

This just makes it a tiny bit easier for new developers to get started by making it easy to see what package they need to install to get the dependency.

---
 configure | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
configure +10 -2
index 4ad2de5..cc49cf4 100755
@@ -1540,7 +1540,9 @@ EOF
         :
     else
         error_exit "zlib check failed" \
-            "Make sure to have the zlib libs and headers installed."
+            "Make sure to have the zlib libs and headers installed." \
+            "Debian/Ubuntu: zlib1g-dev" \
+            "Fedora/RHEL: zlib-devel"
     fi
 fi
 libs_softmmu="$libs_softmmu -lz"
@@ -2356,7 +2358,9 @@ if $pkg_config --atleast-version=$glib_req_ver gthread-2.0; then
     LIBS="$glib_libs $LIBS"
     libs_qga="$glib_libs $libs_qga"
 else
-    error_exit "glib-$glib_req_ver required to compile QEMU"
+    error_exit "glib-$glib_req_ver required to compile QEMU."\
+               "Debian/Ubuntu: libglib2.0-dev" \
+               "Fedora/RHEL: glib2-devel"
 fi
 
 ##########################################
@@ -2388,6 +2392,8 @@ else
     error_exit "pixman not present. Your options:" \
         "  (1) Preferred: Install the pixman devel package (any recent" \
         "      distro should have packages as Xorg needs pixman too)." \
+        "      Ubuntu/Debian: libpixman-1-dev" \
+        "      Fedora/RHEL: pixman-devel"\
         "  (2) Fetch the pixman submodule, using:" \
         "      git submodule update --init pixman"
   fi
@@ -2664,6 +2670,8 @@ EOF
     # have neither and want - prompt for system/submodule install
     error_exit "DTC (libfdt) not present. Your options:" \
         "  (1) Preferred: Install the DTC (libfdt) devel package" \
+        "      Ubuntu/Debian: libfdt-dev" \
+        "      Fedora/RHEL: libfdt-devel" \
         "  (2) Fetch the DTC submodule, using:" \
         "      git submodule update --init dtc"
   else
Signature · 1 line
1.8.4.2
#13 lore raw

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 0/6] configure: make output and errors more friendly

In reply to Stewart Smith
Quoted 9 lines · Stewart Smith

This expands on my previous patch which was just the "configure: helpfully output package names for some missing dependencies" patch.

Based on feedback I've added a hint to the could not find DTC error message.

There's also other changes that were suggested and the ordering of output from configure and configure --help which I found rather useful when attempting to find what package was needed for each configure option.

Quoted 8 lines

Stewart Smith (6):

1   configure: add hint of libfdt to DTC dependency not found message
2   configure: sort output of configure results alphabetically
3   configure: alphabetize output of --help and separate into groups
4   configure: add help for --disable-xfsctl and --enable-xfsctl
5   configure: add hints to a remedy for feature_not_found errors
6   configure: helpfully output package names for some missing

dependencies.

I think I'd happily take 1, 2, 5 and 6, but 3 and 4 really needs to be redone, mentioning every option just once, not twice as it is done now. After that's done, it might be not necessary anymore for 3 at all.

Or I can wait for a resend of whole series. Or alternatively I can try to rework it myself, but for now I'm quite busy so can't promise anything.

Please note that major tweaks in ./configure will most likely conflict with modules support series which has been posted for revew again.

What should I do?

Thanks,

/mjt