Bug 1725317 - Recent commits in repo break build on darwin (macos 10.13)
Summary: Recent commits in repo break build on darwin (macos 10.13)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-29 13:22 UTC by Robert Scott
Modified: 2019-07-02 08:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-02 08:25:34 UTC
Embargoed:


Attachments (Terms of Use)
Full error output (65.02 KB, text/plain)
2019-06-29 13:22 UTC, Robert Scott
no flags Details

Description Robert Scott 2019-06-29 13:22:05 UTC
Created attachment 1585824 [details]
Full error output

Hi,

In preparing security fixes for Nix/NixOS (https://github.com/NixOS/nixpkgs/pull/63921) resulting from the recent spate of CVEs in libvirt, I noticed that the commit for fixing CVE-2019-10161 (aed6a032cead4386472afb24b16196579e239580) breaks the build on darwin (tested macos 10.13). This is true both for the original commit on master but also the backport to 4.10 (3572564893d1710beb1862797fe32cc2e9cb1e38).

The error produced ends:

```
...
make[2]: Leaving directory '/private/tmp/nix-build-libvirt-5.4.0.drv-0/libvirt-5.4.0/include/libvirt'
Making all in src
make[2]: Entering directory '/private/tmp/nix-build-libvirt-5.4.0.drv-0/libvirt-5.4.0/src'
  GEN      access/viraccessapicheck.h
  GEN      access/viraccessapicheck.c
  GEN      libvirt_access.xml
  GEN      libvirt_access_qemu.xml
  GEN      libvirt_access_lxc.xml
  GEN      locking/qemu-lockd.conf
  GEN      lxc/lxc_controller_dispatch.h
  GEN      remote/remote_protocol.h
Can't exec "no": No such file or directory at ./rpc/genprotocol.pl line 45.
cannot run no -h remote/remote_protocol.x: No such file or directory at ./rpc/genprotocol.pl line 45.
make[2]: *** [Makefile:13633: remote/remote_protocol.h] Error 2
make[2]: Leaving directory '/private/tmp/nix-build-libvirt-5.4.0.drv-0/libvirt-5.4.0/src'
make[1]: *** [Makefile:2131: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-libvirt-5.4.0.drv-0/libvirt-5.4.0'
make: *** [Makefile:2024: all] Error 2
```

Full output attached

Comment 1 Ján Tomko 2019-07-01 08:36:40 UTC
From the configure output:
    checking for rpcgen... no
    checking for portable-rpcgen... no

You need rpcgen to build the remote driver. But I'm confused why changing the file makes
a difference - how did you generate it before backporting the commit?

The current build seems to pass on some darwin with rpcgen installed:
https://travis-ci.org/libvirt/libvirt/jobs/552505287
Our .travis.yml config file:
https://libvirt.org/git/?p=libvirt.git;a=blob;f=.travis.yml;h=b510c810835f2f8447e

Comment 2 Robert Scott 2019-07-01 19:39:45 UTC
Ah, looking closer at our package, on darwin we build from the tarball (https://github.com/NixOS/nixpkgs/blob/8ac0f575d9a7f9420bcc1994b5dbb204cff819bf/pkgs/development/libraries/libvirt/default.nix#L17) and applying the patches to that. Are the tarballs by any chance supplied with pre-generated rpc protocols?

Comment 3 Daniel Berrangé 2019-07-02 08:25:34 UTC
Yes, tarballs have the RPC code generated.


Note You need to log in before you can comment on or make changes to this bug.