Bug 221279 - devel/libvirt: Fails to configure (Can't build nss plugin without yajl) with NSS option enabled
Summary: devel/libvirt: Fails to configure (Can't build nss plugin without yajl) with ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Roman Bogorodskiy
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-08-06 13:08 UTC by VVD
Modified: 2017-08-17 13:25 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (novel)
koobs: merge-quarterly?


Attachments
libvirt nss yajl dep (670 bytes, patch)
2017-08-13 06:27 UTC, Roman Bogorodskiy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2017-08-06 13:08:43 UTC
11.1 amd64
===========================================
Part of the build log with error:
-------------------------------------------
…
checking for numad... no
checking for init script type... none
checking for whether to install sysctl config... no
configure: error: Can't build nss plugin without yajl
===>  Script "configure" failed unexpectedly.
Please report the problem to novel@FreeBSD.org [maintainer] and attach the
"/tmp/work/usr/ports/devel/libvirt/work/libvirt-3.6.0/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
…
-------------------------------------------
OPTIONS_FILE_SET+=BHYVE
OPTIONS_FILE_UNSET+=DOCS
OPTIONS_FILE_SET+=GNUTLS
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_SET+=NSS
OPTIONS_FILE_UNSET+=QEMU
OPTIONS_FILE_SET+=READLINE
OPTIONS_FILE_UNSET+=SASL
OPTIONS_FILE_UNSET+=XEN
OPTIONS_FILE_SET+=ZFS
===========================================
devel/libvirt build fine with NSS on after this hack:
-------------------------------------------
--- configure.orig
+++ configure
@@ -70773,7 +70773,7 @@
   if test "x$with_nss_plugin" != "xno" ; then
     if test "x$with_yajl" != "xyes" ; then
       if test "x$with_nss_plugin" = "xyes" ; then
-        as_fn_error $? "Can't build nss plugin without yajl" "$LINENO" 5
+#        as_fn_error $? "Can't build nss plugin without yajl" "$LINENO" 5
       else
         with_nss_plugin=no
       fi
Comment 1 Roman Bogorodskiy freebsd_committer 2017-08-09 14:43:13 UTC
(In reply to vvd from comment #0)

Thanks for the PR; I'll check if the nss plugin really needs yajl and will either add a dependency or try to fix that upstream.

By the way, another possible workaround is to enable the QEMU option which pulls yajl.
Comment 2 VVD 2017-08-09 17:38:06 UTC
(In reply to Roman Bogorodskiy from comment #1)
yajl already installed:
$ pkg info | grep yajl
yajl-2.1.0                     Portable JSON parsing and serialization library in ANSI C
Comment 3 Roman Bogorodskiy freebsd_committer 2017-08-13 06:27:27 UTC
Created attachment 185348 [details]
libvirt nss yajl dep
Comment 4 Roman Bogorodskiy freebsd_committer 2017-08-13 06:28:18 UTC
(In reply to vvd from comment #2)

Yeah, it needs to be instructed to look for yajl in /usr/local; could you please check if the attached patch works for you?
Comment 5 VVD 2017-08-14 12:29:04 UTC
(In reply to Roman Bogorodskiy from comment #4)
Compiled without errors.
Thanks!
Comment 6 commit-hook freebsd_committer 2017-08-17 13:25:33 UTC
A commit references this bug:

Author: novel
Date: Thu Aug 17 13:24:45 UTC 2017
New revision: 448098
URL: https://svnweb.freebsd.org/changeset/ports/448098

Log:
  devel/libvirt: add yajl dependency for nss

  The nss plugin requires yajl. It's pulled for qemu when it's enabled, but
  build fails when nss plugin is enabled and qemu driver is disabled, so
  add a dependency on yajl for both options.

  PR:		221279
  Reported by:	vvd@unislabs.com

Changes:
  head/devel/libvirt/Makefile