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

2016-10-10 Thread Daniel Peebles
See also https://github.com/NixOS/nix/issues/481

On Mon, Oct 10, 2016 at 8:57 AM, Eelco Dolstra 
wrote:

> Hi,
>
> On 10/10/2016 02:43 PM, Jan Synáček wrote:
>
> >> 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?
>
> It already is on Nix master, which prints both paths in the cycle, i.e.
>
>   cycle detected in the references of '/nix/store/' from
> '/nix/store/'
>
> so then you can do
>
>   grep -r  /nix/store/
>
> to find which file has the reference. Obviously it would be nicer if Nix
> printed
> this automatically...
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2016-10-10 Thread Eelco Dolstra
Hi,

On 10/10/2016 02:43 PM, Jan Synáček wrote:

>> 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? 

It already is on Nix master, which prints both paths in the cycle, i.e.

  cycle detected in the references of '/nix/store/' from '/nix/store/'

so then you can do

  grep -r  /nix/store/

to find which file has the reference. Obviously it would be nicer if Nix printed
this automatically...

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2016-10-10 Thread Jan Synáček
On Mon, Oct 10, 2016 at 1:09 PM, Eelco Dolstra
 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
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2016-10-10 Thread Eelco Dolstra
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/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev