libvirt零知识学习5 —— libvirt源码编译安装(3)

接前一篇文章libvirt零知识学习4 —— libvirt源码编译安装(2)

在上篇文章及上上篇文章中构建libvirt的时候遇到了一个问题“ERROR: Problem encountered: YAJL 2 is required to build QEMU driver”。上篇文章讲到即使安装了相应的YAJL库仍然不能解决问题,本篇文章就来继续对此问题进行深入分析和解决。

首先,笔者尝试了网上提到的一些方法,比如libvirt编译运行问题总结_mltrees的博客-CSDN博客

中提到的以下解决方法,但是仍然无效。

echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libyajl.conf
sudo ldconfig

没有更好的办法,只能抠一下源码,仔细分析查找问题到底出在了哪里。

根据构建信息中给出的相关提示:

Run-time dependency readline found: YES 8.1
Run-time dependency libsanlock_client found: NO (tried pkgconfig and cmake)
Run-time dependency libsasl2 found: NO (tried pkgconfig and cmake)
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
Run-time dependency libudev found: YES 251
Library util found: YES
Run-time dependency wireshark found: NO (tried pkgconfig and cmake)
Run-time dependency yajl found: NO (tried pkgconfig and cmake)
Program pkcheck found: YES (/usr/bin/pkcheck)
Run-time dependency xenlight found: NO (tried pkgconfig and cmake)
Checking if "lxc support" compiles: YES 

meson.build:1625:6: ERROR: Problem encountered: YAJL 2 is required to build QEMU driver

A full log can be found at /home/penghao/libvirt/libvirt-8.10.0/build/meson-logs/meson-log.txt

可以看到错误的具体位置在meson.build文件的1625行,上下文如下:

yail_dep相关代码也在meson.build中,如下:

yajl_version = '2.0.3'
yajl_dep = dependency('yajl', version: '>=' + yajl_version, required: get_option('yajl'))
if yajl_dep.found()
  # Kludge for yajl include path on non-Linux
  #
  # As of 2.1.0, upstream yajl.pc has -I${includedir}/yajl among
  # its Cflags, which is clearly wrong. This does not affect Linux
  # because ${includedir} is already part of the default include path,
  # but on other platforms that's not the case and the result is that
  # <yajl/yajl.h> can't be located, causing the build to fail.
  #
  # Since upstream development for yajl has stopped years ago, there's
  # little hope of this issue getting fixed by a new upstream release.
  # Some non-Linux operating systems such as FreeBSD have elected to
  # carry a small downstream patch, but in the case of Homebrew on
  # macOS this approach has been rejected[1] and so we're left with no
  # choice but to work around the issue ourselves.
  #
  # [1] https://github.com/Homebrew/homebrew-core/pull/74516
  if host_machine.system() != 'linux'
    yajl_includedir = yajl_dep.get_variable(pkgconfig : 'includedir')
    if yajl_includedir.contains('include/yajl')
      rc = run_command(
        'python3', '-c',
        'print("@0@".replace("@1@", "@2@"))'.format(
          yajl_includedir, 'include/yajl', 'include',
        ),
        check: true,
      )
      yajl_includedir = rc.stdout().strip()
      yajl_dep = declare_dependency(
        compile_args: [ '-I' + yajl_includedir ],
        dependencies: [ yajl_dep ],
      )
    endif
  endif

  conf.set('WITH_YAJL', 1)
endif

参考Reference manual中的Functions

dependency()

Finds an external dependency (usually a library installed on your system) with the given name with pkg-config and with CMake if pkg-config fails. Additionally, frameworks (OSX only) and library-specific fallback detection logic are also supported.

Since 0.60.0 more than one name can be provided, they will be tried in order and the first name to be found will be used. The fallback subproject will be used only if none of the names are found on the system. Once one of the name has been found, all other names are added into the cache so subsequent calls for any of those name will return the same value. This is useful in case a dependency could have different names, such as png and libpng.

  • Since 0.64.0 a dependency fallback can be provided by WrapDB. Simply download the database locally using meson wrap update-db command and Meson will automatically fallback to subprojects provided by WrapDB if the dependency is not found on the system and the project does not ship their own .wrap file.

Dependencies can also be resolved in two other ways:

  • if the same name was used in a meson.override_dependency prior to the call to dependency, the overriding dependency will be returned unconditionally; that is, the overriding dependency will be used independent of whether an external dependency is installed in the system. Typically, meson.override_dependency will have been used by a subproject.

  • by a fallback subproject which, if needed, will be brought into the current build specification as if subproject() had been called. The subproject can be specified with the fallback argument. Alternatively, if the fallback argument is absent, since 0.55.0 Meson can automatically identify a subproject as a fallback if a wrap file provides the dependency, or if a subproject has the same name as the dependency. In the latter case, the subproject must use meson.override_dependency to specify the replacement, or Meson will report a hard error. See the Wrap documentation for more details. This automatic search can be controlled using the allow_fallback keyword argument.

If dependency_name is '', the dependency is always not found. So with required: false, this always returns a dependency object for which the found() method returns false, and which can be passed like any other dependency to the dependencies: keyword argument of a build_target. This can be used to implement a dependency which is sometimes not required e.g. in some branches of a conditional, or with a fallback: kwarg, can be used to declare an optional dependency that only looks in the specified subproject, and only if that's allowed by --wrap-mode.

The returned object dep also has additional methods.

简单地说就是添加依赖。

参考以下博客:

meson和pkg-config-CSDN博客

其中提到了已经安装了相应的包但仍然提示找不到的情况,与我们遇到的很相似。

首先,使用pkg-config命令查看是否有YAJL包:

$ pkg-config --list-all | grep -i "yajl"
$

可见,系统中查不到YAJL包。

然后,用以下代码查看pkg-config执行时搜索的文件:

$ pkg-config --variable pc_path pkg-config
/usr/lib/pkgconfig:/usr/share/pkgconfig

在这些目录下添加自己编写的针对于YAJL包的pc文件即可。

在/usr/lib/pkgconfig/下创建YAJL.pc文件,并输入以下内容并保存退出:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
sharedlibdir=${libdir}
includedir=${prefix}/include

Name: YAML
Description: Yet Another Jason Library
Version: 2.1.0

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Cflags: -I${includedir}

再次执行以下命令就可以看到YAJL了:

$ pkg-config --list-all | grep -i "yajl"
YAJL                                YAJL - Yet Another Jason Library

再次执行meson build命令,命令及结果如下所示:

……
Run-time dependency readline found: YES 8.1
Run-time dependency libsanlock_client found: NO (tried pkgconfig and cmake)
Run-time dependency libsasl2 found: NO (tried pkgconfig and cmake)
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
Run-time dependency libudev found: YES 251
Library util found: YES
Run-time dependency wireshark found: NO (tried pkgconfig and cmake)
Run-time dependency yajl found: NO (tried pkgconfig and cmake)
Program pkcheck found: YES (/usr/bin/pkcheck)
Run-time dependency xenlight found: NO (tried pkgconfig and cmake)
Checking if "lxc support" compiles: YES 

meson.build:1625:6: ERROR: Problem encountered: YAJL 2 is required to build QEMU driver

A full log can be found at /home/penghao/libvirt/libvirt-8.10.0/build/meson-logs/meson-log.txt

还是同样的问题!为什么?难道一开始方向就错了?

凭借多年的经验,这次方向是正确的,应该是有一些小地方导致问题依旧。仔细想想可能是哪里的问题,最有可能的地方就是YAML.pc这个文件的名字。于是将YAJL.pc改为yajl.pc,命令如下:

$ sudo mv /usr/lib/pkgconfig/YAJL.pc /usr/lib/pkgconfig/yajl.pc

再次执行以下命令,可以看到YAJL变为jajl了:

$ pkg-config --list-all | grep -i "yajl"
yajl                                YAJL - Yet Another Jason Library

此时再次执行meson build命令,命令及结果如下所示:

$ meson build -Dsystem=true -Ddriver_qemu=enabled
The Meson build system
Version: 0.62.2
Source dir: /home/penghao/libvirt/libvirt-8.10.0
Build dir: /home/penghao/libvirt/libvirt-8.10.0/build
Build type: native build
Project name: libvirt
Project version: 8.10.0
C compiler for the host machine: cc (gcc 12.1.0 "cc (GCC) 12.1.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring configmake.h using configuration
Checking for size of "ptrdiff_t" : 8
Checking for size of "size_t" : 8
Compiler for C supports arguments -fasynchronous-unwind-tables: YES 
Compiler for C supports arguments -fexceptions: YES 
Compiler for C supports arguments -fipa-pure-const: YES 
Compiler for C supports arguments -fno-common: YES 
Compiler for C supports arguments -Wabsolute-value: YES 
Compiler for C supports arguments -Waddress: YES 
Compiler for C supports arguments -Waddress-of-packed-member: YES 
Compiler for C supports arguments -Waggressive-loop-optimizations: YES 
Compiler for C supports arguments -Walloc-size-larger-than=9223372036854775807: YES 
Compiler for C supports arguments -Walloca: YES 
Compiler for C supports arguments -Warray-bounds=2: YES 
Compiler for C supports arguments -Wattribute-alias=2: YES 
Compiler for C supports arguments -Wattribute-warning: YES 
Compiler for C supports arguments -Wattributes: YES 
Compiler for C supports arguments -Wbool-compare: YES 
Compiler for C supports arguments -Wbool-operation: YES 
Compiler for C supports arguments -Wbuiltin-declaration-mismatch: YES 
Compiler for C supports arguments -Wbuiltin-macro-redefined: YES 
Compiler for C supports arguments -Wcannot-profile: YES 
Compiler for C supports arguments -Wcast-align: YES 
Compiler for C supports arguments -Wcast-align=strict: YES 
Compiler for C supports arguments -Wno-cast-function-type: YES 
Compiler for C supports arguments -Wchar-subscripts: YES 
Compiler for C supports arguments -Wclobbered: YES 
Compiler for C supports arguments -Wcomment: YES 
Compiler for C supports arguments -Wcomments: YES 
Compiler for C supports arguments -Wcoverage-mismatch: YES 
Compiler for C supports arguments -Wcpp: YES 
Compiler for C supports arguments -Wdangling-else: YES 
Compiler for C supports arguments -Wdate-time: YES 
Compiler for C supports arguments -Wdeclaration-after-statement: YES 
Compiler for C supports arguments -Wdeprecated-declarations: YES 
Compiler for C supports arguments -Wdesignated-init: YES 
Compiler for C supports arguments -Wdiscarded-array-qualifiers: YES 
Compiler for C supports arguments -Wdiscarded-qualifiers: YES 
Compiler for C supports arguments -Wdiv-by-zero: YES 
Compiler for C supports arguments -Wduplicated-cond: YES 
Compiler for C supports arguments -Wduplicate-decl-specifier: YES 
Compiler for C supports arguments -Wempty-body: YES 
Compiler for C supports arguments -Wendif-labels: YES 
Compiler for C supports arguments -Wexpansion-to-defined: YES 
Compiler for C supports arguments -Wformat-contains-nul: YES 
Compiler for C supports arguments -Wformat-extra-args: YES 
Compiler for C supports arguments -Wno-format-nonliteral: YES 
Compiler for C supports arguments -Wformat-overflow=2: YES 
Compiler for C supports arguments -Wformat-security: YES 
Compiler for C supports arguments -Wno-format-truncation: YES 
Compiler for C supports arguments -Wformat-y2k: YES 
Compiler for C supports arguments -Wformat-zero-length: YES 
Compiler for C supports arguments -Wframe-address: YES 
Compiler for C supports arguments -Wframe-larger-than=4096: YES 
Compiler for C supports arguments -Wfree-nonheap-object: YES 
Compiler for C supports arguments -Whsa: YES 
Compiler for C supports arguments -Wif-not-aligned: YES 
Compiler for C supports arguments -Wignored-attributes: YES 
Compiler for C supports arguments -Wignored-qualifiers: YES 
Compiler for C supports arguments -Wimplicit: YES 
Compiler for C supports arguments -Wimplicit-fallthrough=5: YES 
Compiler for C supports arguments -Wimplicit-function-declaration: YES 
Compiler for C supports arguments -Wimplicit-int: YES 
Compiler for C supports arguments -Wincompatible-pointer-types: YES 
Compiler for C supports arguments -Winit-self: YES 
Compiler for C supports arguments -Winline: YES 
Compiler for C supports arguments -Wint-conversion: YES 
Compiler for C supports arguments -Wint-in-bool-context: YES 
Compiler for C supports arguments -Wint-to-pointer-cast: YES 
Compiler for C supports arguments -Winvalid-memory-model: YES 
Compiler for C supports arguments -Winvalid-pch: YES 
Compiler for C supports arguments -Wjump-misses-init: YES 
Compiler for C supports arguments -Wlogical-not-parentheses: YES 
Compiler for C supports arguments -Wlogical-op: YES 
Compiler for C supports arguments -Wmain: YES 
Compiler for C supports arguments -Wmaybe-uninitialized: YES 
Compiler for C supports arguments -Wmemset-elt-size: YES 
Compiler for C supports arguments -Wmemset-transposed-args: YES 
Compiler for C supports arguments -Wmisleading-indentation: YES 
Compiler for C supports arguments -Wmissing-attributes: YES 
Compiler for C supports arguments -Wmissing-braces: YES 
Compiler for C supports arguments -Wmissing-declarations: YES 
Compiler for C supports arguments -Wmissing-field-initializers: YES 
Compiler for C supports arguments -Wmissing-include-dirs: YES 
Compiler for C supports arguments -Wmissing-parameter-type: YES 
Compiler for C supports arguments -Wmissing-profile: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -Wmultichar: YES 
Compiler for C supports arguments -Wmultistatement-macros: YES 
Compiler for C supports arguments -Wnarrowing: YES 
Compiler for C supports arguments -Wnested-externs: YES 
Compiler for C supports arguments -Wnonnull: YES 
Compiler for C supports arguments -Wnonnull-compare: YES 
Compiler for C supports arguments -Wnormalized=nfc: YES 
Compiler for C supports arguments -Wnull-dereference: YES 
Compiler for C supports arguments -Wodr: YES 
Compiler for C supports arguments -Wold-style-declaration: YES 
Compiler for C supports arguments -Wold-style-definition: YES 
Compiler for C supports arguments -Wopenmp-simd: YES 
Compiler for C supports arguments -Woverflow: YES 
Compiler for C supports arguments -Woverride-init: YES 
Compiler for C supports arguments -Wpacked-bitfield-compat: YES 
Compiler for C supports arguments -Wpacked-not-aligned: YES 
Compiler for C supports arguments -Wparentheses: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C supports arguments -Wpointer-compare: YES 
Compiler for C supports arguments -Wpointer-sign: YES 
Compiler for C supports arguments -Wpointer-to-int-cast: YES 
Compiler for C supports arguments -Wpragmas: YES 
Compiler for C supports arguments -Wpsabi: YES 
Compiler for C supports arguments -Wrestrict: YES 
Compiler for C supports arguments -Wreturn-local-addr: YES 
Compiler for C supports arguments -Wreturn-type: YES 
Compiler for C supports arguments -Wscalar-storage-order: YES 
Compiler for C supports arguments -Wsequence-point: YES 
Compiler for C supports arguments -Wshadow: YES 
Compiler for C supports arguments -Wshift-count-negative: YES 
Compiler for C supports arguments -Wshift-count-overflow: YES 
Compiler for C supports arguments -Wshift-negative-value: YES 
Compiler for C supports arguments -Wshift-overflow=2: YES 
Compiler for C supports arguments -Wno-sign-compare: YES 
Compiler for C supports arguments -Wsizeof-array-argument: YES 
Compiler for C supports arguments -Wsizeof-pointer-div: YES 
Compiler for C supports arguments -Wsizeof-pointer-memaccess: YES 
Compiler for C supports arguments -Wstrict-aliasing: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wstringop-overflow=2: YES 
Compiler for C supports arguments -Wstringop-truncation: YES 
Compiler for C supports arguments -Wsuggest-attribute=cold: YES 
Compiler for C supports arguments -Wno-suggest-attribute=const: YES 
Compiler for C supports arguments -Wsuggest-attribute=format: YES 
Compiler for C supports arguments -Wsuggest-attribute=noreturn: YES 
Compiler for C supports arguments -Wno-suggest-attribute=pure: YES 
Compiler for C supports arguments -Wsuggest-final-methods: YES 
Compiler for C supports arguments -Wsuggest-final-types: YES 
Compiler for C supports arguments -Wswitch: YES 
Compiler for C supports arguments -Wswitch-bool: YES 
Compiler for C supports arguments -Wswitch-enum: YES 
Compiler for C supports arguments -Wswitch-unreachable: YES 
Compiler for C supports arguments -Wsync-nand: YES 
Compiler for C supports arguments -Wtautological-compare: YES 
Compiler for C supports arguments -Wtrampolines: YES 
Compiler for C supports arguments -Wtrigraphs: YES 
Compiler for C supports arguments -Wtype-limits: YES 
Compiler for C supports arguments -Wno-typedef-redefinition: NO 
Compiler for C supports arguments -Wuninitialized: YES 
Compiler for C supports arguments -Wunknown-pragmas: YES 
Compiler for C supports arguments -Wunused: YES 
Compiler for C supports arguments -Wunused-but-set-parameter: YES 
Compiler for C supports arguments -Wunused-but-set-variable: YES 
Compiler for C supports arguments -Wunused-const-variable=2: YES 
Compiler for C supports arguments -Wunused-function: YES 
Compiler for C supports arguments -Wunused-label: YES 
Compiler for C supports arguments -Wunused-local-typedefs: YES 
Compiler for C supports arguments -Wunused-parameter: YES 
Compiler for C supports arguments -Wunused-result: YES 
Compiler for C supports arguments -Wunused-value: YES 
Compiler for C supports arguments -Wunused-variable: YES 
Compiler for C supports arguments -Wvarargs: YES 
Compiler for C supports arguments -Wvariadic-macros: YES 
Compiler for C supports arguments -Wvector-operation-performance: YES 
Compiler for C supports arguments -Wvla: YES 
Compiler for C supports arguments -Wvolatile-register-var: YES 
Compiler for C supports arguments -Wwrite-strings: YES 
Compiler for C supports arguments -fstack-protector-strong: YES 
First supported argument: -fstack-protector-strong
Checking if "-Wdouble-promotion" compiles: YES 
Compiler for C supports arguments -Wsuggest-attribute=format: YES (cached)
Compiler for C supports arguments -Wframe-larger-than=262144: YES 
Compiler for C supports link arguments -Wl,-z,relro: YES 
Compiler for C supports link arguments -Wl,-z,now: YES 
Compiler for C supports link arguments -Wl,-z,nodelete: YES 
Compiler for C supports link arguments -Wl,-z,defs: YES 
Compiler for C supports link arguments -Wl,--no-copy-dt-needed-entries: YES 
Compiler for C supports link arguments -Wl,--version-script=/home/penghao/libvirt/libvirt-8.10.0/src/libvirt_qemu.syms: YES 
Compiler for C supports link arguments -Wl,-export-dynamic: YES 
First supported link argument: -Wl,-export-dynamic
Checking for function "elf_aux_info" : NO 
Checking for function "fallocate" : YES 
Checking for function "getauxval" : YES 
Checking for function "getegid" : YES 
Checking for function "geteuid" : YES 
Checking for function "getgid" : YES 
Checking for function "getifaddrs" : YES 
Checking for function "getmntent_r" : YES 
Checking for function "getpwuid_r" : YES 
Checking for function "getrlimit" : YES 
Checking for function "getuid" : YES 
Checking for function "getutxid" : YES 
Checking for function "if_indextoname" : YES 
Checking for function "mmap" : YES 
Checking for function "newlocale" : YES 
Checking for function "pipe2" : YES 
Checking for function "posix_fallocate" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "prlimit" : YES 
Checking for function "sched_setscheduler" : YES 
Checking for function "setgroups" : YES 
Checking for function "setrlimit" : YES 
Checking for function "symlink" : YES 
Checking for function "sysctlbyname" : NO 
Checking for function "__lxstat" : YES 
Checking for function "__lxstat64" : YES 
Checking for function "__xstat" : YES 
Checking for function "__xstat64" : YES 
Checking for function "lstat" : YES 
Checking for function "lstat64" : YES 
Checking for function "stat" : YES 
Checking for function "stat64" : YES 
Header <sys/stat.h> has symbol "__lxstat" : NO 
Header <sys/stat.h> has symbol "__lxstat64" : NO 
Header <sys/stat.h> has symbol "__xstat" : NO 
Header <sys/stat.h> has symbol "__xstat64" : NO 
Header <sys/stat.h> has symbol "lstat" : YES 
Header <sys/stat.h> has symbol "lstat64" : NO 
Header <sys/stat.h> has symbol "stat" : YES 
Header <sys/stat.h> has symbol "stat64" : NO 
Has header "asm/hwcap.h" : NO 
Has header "ifaddrs.h" : YES 
Has header "libtasn1.h" : YES 
Has header "linux/kvm.h" : YES 
Has header "linux/magic.h" : YES 
Has header "mntent.h" : YES 
Has header "net/ethernet.h" : YES 
Has header "net/if.h" : YES 
Has header "pty.h" : YES 
Has header "pwd.h" : YES 
Has header "sched.h" : YES 
Has header "sys/auxv.h" : YES 
Has header "sys/ioctl.h" : YES 
Has header "sys/mount.h" : YES 
Has header "sys/syscall.h" : YES 
Has header "sys/ucred.h" : NO 
Has header "syslog.h" : YES 
Has header "util.h" : NO 
Has header "xlocale.h" : NO 
Has header "linux/devlink.h" : YES 
Has header "linux/param.h" : YES 
Has header "linux/sockios.h" : YES 
Has header "linux/if_bridge.h" : YES 
Has header "linux/if_tun.h" : YES 
Header <endian.h> has symbol "htole64" : YES 
Header <linux/ethtool.h> has symbol "ETH_FLAG_TXVLAN" : YES 
Header <linux/ethtool.h> has symbol "ETH_FLAG_NTUPLE" : YES 
Header <linux/ethtool.h> has symbol "ETH_FLAG_RXHASH" : YES 
Header <linux/ethtool.h> has symbol "ETH_FLAG_LRO" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_GGSO" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_GGRO" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_GFLAGS" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_GFEATURES" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_SCOALESCE" : YES 
Header <linux/ethtool.h> has symbol "ETHTOOL_GCOALESCE" : YES 
Header <linux/if_vlan.h> has symbol "GET_VLAN_VID_CMD" : YES 
Header <unistd.h> has symbol "SEEK_HOLE" : YES 
Header <net/if_dl.h> has symbol "link_addr" : NO 
Header <sched.h> has symbol "cpu_set_t" : YES 
Header <linux/devlink.h> has symbol "DEVLINK_CMD_ESWITCH_GET" : YES 
Header <linux/vhost.h> has symbol "VHOST_VSOCK_SET_GUEST_CID" : YES 
Header <linux/bpf.h> has symbol "BPF_PROG_QUERY" : YES 
Header <linux/bpf.h> has symbol "BPF_CGROUP_DEVICE" : YES 
Header <net/if_bridgevar.h> has symbol "BRDGSFD" : NO 
Header <sys/cpuset.h> has symbol "cpuset_getaffinity" : NO 
Header <mach/clock.h> has symbol "clock_serv_t" : NO 
Checking for type "struct ifreq" : YES 
Checking for type "struct sockpeercred" : NO 
Checking whether type "struct ifreq" has member "ifr_newname" : YES 
Checking whether type "struct ifreq" has member "ifr_ifindex" : YES 
Checking whether type "struct ifreq" has member "ifr_index" : NO 
Checking whether type "struct ifreq" has member "ifr_hwaddr" : YES 
Checking for size of "long" : 8
Program perl found: YES (/usr/bin/perl)
Program python3 found: YES (/usr/bin/python3)
Program xmllint found: YES (/usr/bin/xmllint)
Program xsltproc found: YES (/usr/bin/xsltproc)
Program rpcgen found: YES (/usr/bin/rpcgen)
Program augparse found: NO
Program dmidecode found: YES (/usr/sbin/dmidecode)
Program ebtables found: YES (/usr/sbin/ebtables)
Program flake8 found: NO
Program ip found: YES (/usr/sbin/ip)
Program ip6tables found: YES (/usr/sbin/ip6tables)
Program iptables found: YES (/usr/sbin/iptables)
Program iscsiadm found: NO
Program mdevctl found: NO
Program mm-ctl found: NO
Program modprobe found: YES (/usr/sbin/modprobe)
Program ovs-vsctl found: NO
Program pdwtags found: NO
Program rmmod found: YES (/usr/sbin/rmmod)
Program scrub found: NO
Program tc found: YES (/usr/sbin/tc)
Program udevadm found: YES (/usr/bin/udevadm)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency libtirpc found: YES 1.3.2
Library acl found: YES
Found CMake: /usr/bin/cmake (3.23.2)
Run-time dependency libapparmor found: NO (tried pkgconfig and cmake)
Library attr found: YES
Run-time dependency audit found: NO (tried pkgconfig and cmake)
Run-time dependency bash-completion found: YES 2.11.0
Run-time dependency blkid found: YES 2.38.0
Run-time dependency libcap-ng found: NO (tried pkgconfig and cmake)
Run-time dependency libcurl found: YES 7.84.0
Run-time dependency devmapper found: YES 1.02.185
Library dl found: YES
Has header "dlfcn.h" : YES 
Run-time dependency fuse3 found: NO (tried pkgconfig and cmake)
Run-time dependency fuse found: YES 2.9.9
Run-time dependency glib-2.0 found: YES 2.72.3
Run-time dependency gobject-2.0 found: YES 2.72.3
Run-time dependency gio-unix-2.0 found: YES 2.72.3
Run-time dependency glusterfs-api found: NO (tried pkgconfig and cmake)
Run-time dependency gnutls found: YES 3.7.3
Run-time dependency libiscsi found: NO (tried pkgconfig and cmake)
Run-time dependency libnl-3.0 found: YES 3.5.0
Run-time dependency libnl-route-3.0 found: YES 3.5.0
Run-time dependency libparted found: YES 3.5
pcap-config found: NO need ['>=1.5.0']
Run-time dependency pcap found: NO (tried pkgconfig and config-tool)
Run-time dependency libssh found: NO (tried pkgconfig and cmake)
Run-time dependency libssh2 found: NO (tried pkgconfig and cmake)
Run-time dependency libxml-2.0 found: YES 2.9.14
Library m found: YES
Run-time dependency netcf found: NO (tried pkgconfig and cmake)
Checking for function "gettext" : YES 
Has header "libintl.h" : YES 
Program xgettext found: YES (/usr/bin/xgettext)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msgmerge found: YES (/usr/bin/msgmerge)
Library numa found: NO
Run-time dependency openwsman found: NO (tried pkgconfig and cmake)
Run-time dependency parallels-sdk found: NO (tried pkgconfig and cmake)
Run-time dependency pciaccess found: YES 0.16
Library rbd found: NO
Library rados found: NO
Run-time dependency readline found: YES 8.1
Run-time dependency libsanlock_client found: NO (tried pkgconfig and cmake)
Run-time dependency libsasl2 found: NO (tried pkgconfig and cmake)
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
Run-time dependency libudev found: YES 251
Library util found: YES
Run-time dependency wireshark found: NO (tried pkgconfig and cmake)
Run-time dependency yajl found: YES 2.1.0
Program pkcheck found: YES (/usr/bin/pkcheck)
Run-time dependency xenlight found: NO (tried pkgconfig and cmake)
Checking if "lxc support" compiles: YES 
Program qemu-bridge-helper found: NO
Program qemu-pr-helper found: NO
Program slirp-helper found: NO
Program dbus-daemon found: YES (/usr/bin/dbus-daemon)
Has header "mntent.h" : YES (cached)
Program mount found: YES (/usr/bin/mount)
Program umount found: YES (/usr/bin/umount)
Program mkfs found: YES (/usr/sbin/mkfs)
Program showmount found: NO
Program pvcreate found: YES (/usr/sbin/pvcreate)
Program vgcreate found: YES (/usr/sbin/vgcreate)
Program lvcreate found: YES (/usr/sbin/lvcreate)
Program pvremove found: YES (/usr/sbin/pvremove)
Program vgremove found: YES (/usr/sbin/vgremove)
Program lvremove found: YES (/usr/sbin/lvremove)
Program lvchange found: YES (/usr/sbin/lvchange)
Program vgchange found: YES (/usr/sbin/vgchange)
Program vgscan found: YES (/usr/sbin/vgscan)
Program pvs found: YES (/usr/sbin/pvs)
Program vgs found: YES (/usr/sbin/vgs)
Program lvs found: YES (/usr/sbin/lvs)
Program dtrace found: NO
Program systemctl found: YES (/usr/bin/systemctl)
Has header "nss.h" : YES 
Checking for type "struct gaih_addrtuple" : YES 
Checking for type "ns_mtab" : NO 
Program apibuild.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/apibuild.py)
Program augeas-gentest.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/augeas-gentest.py)
Program check-aclperms.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-aclperms.py)
Program check-aclrules.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-aclrules.py)
Program check-driverimpls.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-driverimpls.py)
Program check-drivername.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/check-drivername.py)
Program check-file-access.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-file-access.py)
Program check-html-references.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-html-references.py)
Program check-remote-protocol.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/check-remote-protocol.py)
Program check-symfile.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-symfile.py)
Program check-symsorting.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/check-symsorting.py)
Program dtrace2systemtap.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/dtrace2systemtap.py)
Program esx_vi_generator.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/esx_vi_generator.py)
Program genaclperms.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/genaclperms.py)
Program genpolkit.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/genpolkit.py)
Program gensystemtap.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/gensystemtap.py)
Program group-qemu-caps.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/group-qemu-caps.py)
Program header-ifdef.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/header-ifdef.py)
Program hvsupport.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/hvsupport.py)
Program hyperv_wmi_generator.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/hyperv_wmi_generator.py)
Program meson-dist.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-dist.py)
Program meson-gen-authors.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-gen-authors.py)
Program meson-gen-def.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-gen-def.py)
Program meson-gen-sym.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-gen-sym.py)
Program meson-install-dirs.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/meson-install-dirs.py)
Program meson-install-symlink.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/meson-install-symlink.py)
Program meson-install-web.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-install-web.py)
Program meson-python.sh found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-python.sh)
Program meson-timestamp.py found: YES (/home/penghao/libvirt/libvirt-8.10.0/scripts/meson-timestamp.py)
Program mock-noinline.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/mock-noinline.py)
Program prohibit-duplicate-header.py found: YES (/usr/bin/python3.10 /home/penghao/libvirt/libvirt-8.10.0/scripts/prohibit-duplicate-header.py)
Configuring libvirt-common.h using configuration
Program /home/penghao/libvirt/libvirt-8.10.0/src/keycodemapdb/tools/keymap-gen found: YES (/home/penghao/libvirt/libvirt-8.10.0/src/keycodemapdb/tools/keymap-gen)
Program genprotocol.pl found: YES (/home/penghao/libvirt/libvirt-8.10.0/src/rpc/genprotocol.pl)
Program gendispatch.pl found: YES (/home/penghao/libvirt/libvirt-8.10.0/src/rpc/gendispatch.pl)
Configuring libvirtd.conf.tmp with command
Configuring libvirtd.aug.tmp with command
Configuring test_libvirtd.aug.tmp with command
Configuring virtd.conf.tmp with command
Configuring virtd.aug.tmp with command
Configuring test_virtd.aug.tmp with command
Configuring libvirtd.qemu.logrotate using configuration
Configuring libvirtd.lxc.logrotate using configuration
Configuring libvirtd.libxl.logrotate using configuration
Configuring libvirtd.logrotate using configuration
Configuring qemu.conf using configuration
Configuring test_libvirtd_qemu.aug.tmp using configuration
Configuring libvirtd.conf using configuration
Configuring libvirtd.aug using configuration
Configuring test_libvirtd.aug.tmp using configuration
Configuring virtproxyd.conf using configuration
Configuring virtproxyd.aug using configuration
Configuring test_virtproxyd.aug.tmp using configuration
Configuring virtinterfaced.conf using configuration
Configuring virtinterfaced.aug using configuration
Configuring test_virtinterfaced.aug.tmp using configuration
Configuring virtnetworkd.conf using configuration
Configuring virtnetworkd.aug using configuration
Configuring test_virtnetworkd.aug.tmp using configuration
Configuring virtnodedevd.conf using configuration
Configuring virtnodedevd.aug using configuration
Configuring test_virtnodedevd.aug.tmp using configuration
Configuring virtnwfilterd.conf using configuration
Configuring virtnwfilterd.aug using configuration
Configuring test_virtnwfilterd.aug.tmp using configuration
Configuring virtsecretd.conf using configuration
Configuring virtsecretd.aug using configuration
Configuring test_virtsecretd.aug.tmp using configuration
Configuring virtstoraged.conf using configuration
Configuring virtstoraged.aug using configuration
Configuring test_virtstoraged.aug.tmp using configuration
Configuring virtlxcd.conf using configuration
Configuring virtlxcd.aug using configuration
Configuring test_virtlxcd.aug.tmp using configuration
Configuring virtchd.conf using configuration
Configuring virtchd.aug using configuration
Configuring test_virtchd.aug.tmp using configuration
Configuring virtqemud.conf using configuration
Configuring virtqemud.aug using configuration
Configuring test_virtqemud.aug.tmp using configuration
Configuring virtvboxd.conf using configuration
Configuring virtvboxd.aug using configuration
Configuring test_virtvboxd.aug.tmp using configuration
Configuring libvirtd.service using configuration
Configuring libvirtd.socket using configuration
Configuring libvirtd-ro.socket using configuration
Configuring libvirtd-admin.socket using configuration
Configuring libvirtd-tcp.socket using configuration
Configuring libvirtd-tls.socket using configuration
Configuring virtproxyd.service using configuration
Configuring virtproxyd.socket using configuration
Configuring virtproxyd-ro.socket using configuration
Configuring virtproxyd-admin.socket using configuration
Configuring virtproxyd-tcp.socket using configuration
Configuring virtproxyd-tls.socket using configuration
Configuring virtinterfaced.service using configuration
Configuring virtinterfaced.socket using configuration
Configuring virtinterfaced-ro.socket using configuration
Configuring virtinterfaced-admin.socket using configuration
Configuring virtlockd.service using configuration
Configuring virtlockd.socket using configuration
Configuring virtlockd-admin.socket using configuration
Configuring virtlogd.service using configuration
Configuring virtlogd.socket using configuration
Configuring virtlogd-admin.socket using configuration
Configuring virtnetworkd.service using configuration
Configuring virtnetworkd.socket using configuration
Configuring virtnetworkd-ro.socket using configuration
Configuring virtnetworkd-admin.socket using configuration
Configuring virtnodedevd.service using configuration
Configuring virtnodedevd.socket using configuration
Configuring virtnodedevd-ro.socket using configuration
Configuring virtnodedevd-admin.socket using configuration
Configuring virtnwfilterd.service using configuration
Configuring virtnwfilterd.socket using configuration
Configuring virtnwfilterd-ro.socket using configuration
Configuring virtnwfilterd-admin.socket using configuration
Configuring virtsecretd.service using configuration
Configuring virtsecretd.socket using configuration
Configuring virtsecretd-ro.socket using configuration
Configuring virtsecretd-admin.socket using configuration
Configuring virtstoraged.service using configuration
Configuring virtstoraged.socket using configuration
Configuring virtstoraged-ro.socket using configuration
Configuring virtstoraged-admin.socket using configuration
Configuring virtlxcd.service using configuration
Configuring virtlxcd.socket using configuration
Configuring virtlxcd-ro.socket using configuration
Configuring virtlxcd-admin.socket using configuration
Configuring virtchd.service using configuration
Configuring virtchd.socket using configuration
Configuring virtchd-ro.socket using configuration
Configuring virtchd-admin.socket using configuration
Configuring virtqemud.service using configuration
Configuring virtqemud.socket using configuration
Configuring virtqemud-ro.socket using configuration
Configuring virtqemud-admin.socket using configuration
Configuring virtvboxd.service using configuration
Configuring virtvboxd.socket using configuration
Configuring virtvboxd-ro.socket using configuration
Configuring virtvboxd-admin.socket using configuration
Configuring libvirt-lxc.pc using configuration
Configuring libvirt-qemu.pc using configuration
Configuring libvirt.pc using configuration
Configuring virt-xml-validate using configuration
Configuring virt-pki-validate using configuration
Configuring libvirt-guests.sh using configuration
Configuring libvirt-guests.service using configuration
Configuring virsh using configuration
Configuring virt-admin using configuration
Configuring cpu-baseline.rng using configuration
Configuring device.rng using configuration
Configuring privatedata.rng using configuration
Library tasn1 found: YES
Program libvirtd-fail found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/libvirtd-fail)
Program libvirtd-pool found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/libvirtd-pool)
Program virsh-auth found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-auth)
Program virsh-checkpoint found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-checkpoint)
Program virsh-cpuset found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-cpuset)
Program virsh-define-dev-segfault found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-define-dev-segfault)
Program virsh-int-overflow found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-int-overflow)
Program virsh-optparse found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-optparse)
Program virsh-output found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-output)
Program virsh-read-bufsiz found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-read-bufsiz)
Program virsh-read-non-seekable found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-read-non-seekable)
Program virsh-schedinfo found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-schedinfo)
Program virsh-self-test found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-self-test)
Program virsh-snapshot found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-snapshot)
Program virsh-start found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-start)
Program virsh-undefine found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-undefine)
Program virsh-uriprecedence found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-uriprecedence)
Program virsh-vcpupin found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virsh-vcpupin)
Program virt-admin-self-test found: YES (/home/penghao/libvirt/libvirt-8.10.0/tests/virt-admin-self-test)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Program rst2html5 rst2html5.py rst2html5-3 found: NO

docs/meson.build:176:2: ERROR: Program 'rst2html5 rst2html5.py rst2html5-3' not found or not executable

A full log can be found at /home/penghao/libvirt/libvirt-8.10.0/build/meson-logs/meson-log.txt

可以看到,虽然还是有错误,但是并不是yajl的问题了。从上边的log中可以看到,yajl已经找到了:

Library util found: YES
Run-time dependency wireshark found: NO (tried pkgconfig and cmake)
Run-time dependency yajl found: YES 2.1.0
Program pkcheck found: YES (/usr/bin/pkcheck)

对于新出现的问题,将在后续文章中进行分析和解决。

猜你喜欢

转载自blog.csdn.net/phmatthaus/article/details/129727147