[Nix-dev] Cycle detected in references when building systemd

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Oct 10 13:09:20 CEST 2016


Hi,

On 10/10/2016 11:57 AM, Jan Synáček wrote:

> I'm trying to build the current master of systemd. I only slightly modified
> pkgs/os-specific/linux/systemd/default.nix (set "version" to 'master',
> set "rev" to 7a9ee77204c2bd18ab6d0236ba17b6439ec76b46, "sha256" to
> 1s9d4ipg39718bvwrcr9vz8p07rwy5hcspc0qmp04p2zhxhcd2xx and removed the
> "patches" section).
> 
> When I try building the package like so:
> 
> 1) cd src/nixpkgs
> 2) NIX_PATH=$(pwd) nix-build -K -A systemd
> 
> I get the following:
> ...
> cycle detected in the references of
> ‘/nix/store/2ipa3ipr85ywzq61366cg7ymk7n6bqg6-systemd-master-lib’
> note: keeping build directory ‘/tmp/nix-build-systemd-master.drv-2’
> error: build of
> ‘/nix/store/nxwwpnpnmif1hnb9msgbly4bn15yahx6-systemd-master.drv’
> failed
> 
> How do I figure out where the cycle is and what rpaths (it's the
> problem, right?) remove or add?

I ran into the same problem building systemd master last week. The issue is that
libudev.so now has a reference to $out/lib/udev/hwdb.bin. So it's not an RPATH
issue. Probably we just need to patch out the use of $out/lib/udev/hwdb.bin,
since we don't have that file anyway (we use /etc/udev/hwdb.bin).

You can find the exact cause of these cycles using good old "grep -r".

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list