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

Jan Synáček jan.synacek at gmail.com
Mon Oct 10 14:43:14 CEST 2016


On Mon, Oct 10, 2016 at 1:09 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> 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".

Pardon my ignorance, but I still can't see where the cycle is and how
you managed to figure it out. In this particular case, the cycle (at
least a part of it) is supposed to be somewhere in
'/nix/store/2ipa3ipr85ywzq61366cg7ymk7n6bqg6-systemd-master-lib'
according to the error message. But that's all what it says... Maybe
the message could be more helpful? How do I know for what to grep?

Cheers,
-- 
Jan Synáček


More information about the nix-dev mailing list