[Nix-dev] GCC in pkgs.buildEnv.paths

Kirill Elagin kirelagin at gmail.com
Sun May 25 16:27:58 CEST 2014


I just thought that minimising the testcase might be a good idea.
Simply having

~~~~
  packageOverrides = pkgs_: with pkgs_; {
    testgcc2 = pkgs_.gcc;
  };
~~~~

is already enough to reproduce the issue:

~~~~
% nix-instantiate '<nixpkgs>' -A gcc
warning: you did not specify `--add-root'; the result might be removed by
the garbage collector
/nix/store/993glmz6hxbld0ry81jwv7c3z7cgaz68-gcc-wrapper-4.8.2.drv

% nix-instantiate '<nixpkgs>' -A testgcc2
warning: you did not specify `--add-root'; the result might be removed by
the garbage collector
/nix/store/41nacbfpr8jzsk3k03jjlqb2r2xis5gf-gcc-wrapper-4.8.2.drv
~~~~


--
Кирилл Елагин


On Sun, May 25, 2014 at 12:12 PM, Kirill Elagin <kirelagin at gmail.com> wrote:

> Here is what I see (this is a diff of references of gccWrapper for gcc vs.
> testgcc):
>
> ~~~~~~~~~~~~~~~~~
>  /nix/store/x0ml8lx5220diw4iplia8ry240smb4vl-add-flags
>  /nix/store/2gff5jccdfr4z21yxnfrjjwcq3vpr1wi-bash-4.2-p45.drv
> +/nix/store/cz26wrhr8ddk09yffy67xjsaz339byj2-bash-4.2-p45.drv     <------
> second bash, WUT??
> -/nix/store/yykyb9sf6axlm78f4apk0mabicnv8mnr-binutils-2.23.1.drv
> +/nix/store/7z26jxbwkc5hx9gwrj47dhcpfxwg5b67-binutils-2.23.1.drv
> -/nix/store/xirq1m6mi5lw61v33mnv3j13hy9bwnwx-bootstrap-tools.drv   <------
> gone
>  /nix/store/gj4rbkipgzw4ss82my8m6lnaxdm85b3i-builder.sh
> -/nix/store/qi7wdh1qyvd58ip61dn8d58v2awagbhj-coreutils-8.21.drv
> +/nix/store/q8ng53dv1lccmg4a2jcj8540ifszi65j-coreutils-8.21.drv
> -/nix/store/8hwk0axdnf9c2d61fzs3cn54m2d543y9-gcc-4.8.2.drv
> +/nix/store/5ncp7pw6nc3yhxny8mfks17jngxz9qns-gcc-4.8.2.drv
>  /nix/store/5w5cjjrdyhn5a1ph7bia4z05gbar1fpm-gcc-wrapper.sh
> -/nix/store/cn5p5k04np1v3vpqimgx2f8012wv2ljw-glibc-2.19.drv
> +/nix/store/38aab2xbj5vpk09c218rdz4jy8xfgjs9-glibc-2.19.drv
>  /nix/store/rjs81x48ala9iafn8nki9xklzihd69as-gnatlink-wrapper.sh
>  /nix/store/jh6njrxyaxdsh9i2gfv543bkbamp5ccm-gnat-wrapper.sh
>  /nix/store/z6075iacwfl1bmsmg2q712ccvj370zp0-ld-solaris-wrapper.sh
>  /nix/store/jj68gnbzcsyr59p0074zh5znx54022w4-ld-wrapper.sh
>  /nix/store/v6na0qqb5jcas6av4w7ialplw8h0rwl9-setup-hook.sh
> -/nix/store/884c7h4gi7xf2vpyfp1lybqxvkf644m8-stdenv-linux-boot.drv
> +/nix/store/kyai48rvwcaynnp0qywcg89yp0l5dzrq-stdenv.drv
>  /nix/store/zcw8i26jh4gvyq74g2g9w6ixh7rprph0-utils.sh
> +/nix/store/f3ssylga2wkh9k3bydmaajzz6wifms2w-zlib-1.2.8.drv     <-------
> hey, who are you?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> I didn't know how to diff .drvs either, so I used a command like
>
> ~~~~
> nix-store -q --references <path_to_drv_in_store> | sort -t - -k2
> ~~~~
>
> to produce a list of references sorted by derivation name. Then `diff`
> plus some hand-juggling to make the diff look nicer.
>
>
> --
> Кирилл Елагин
>
>
> On Sun, May 25, 2014 at 11:51 AM, Pavel Chuprikov <pschuprikov at gmail.com>wrote:
>
>> Hi,
>>   I didn't know how to diff .drv, so I converted them using ad-hoc python
>> script.
>>
>> --
>> Pavel
>>
>>
>> On Sun, May 25, 2014 at 11:27 AM, Pavel Chuprikov <pschuprikov at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I've compared derivations of gcc-wrappers and here what I got:
>>>
>>> pkgs.gcc vs pkgs.testgcc
>>> ~~~~~~~~~~~~~~~~
>>> 1c1
>>> < ('out',
>>> '/nix/store/agf8fk4xj2aqr3jccfcypqsmvkz3smn8-gcc-wrapper-4.8.2', '', '')
>>> ---
>>> > ('out',
>>> '/nix/store/nxzf150liimxqdz0f105kg5vsbcd9c75-gcc-wrapper-4.8.2', '', '')
>>> 3,8c3,9
>>> < ('/nix/store/884c7h4gi7xf2vpyfp1lybqxvkf644m8-stdenv-linux-boot.drv',
>>> ['out'])
>>> < ('/nix/store/8hwk0axdnf9c2d61fzs3cn54m2d543y9-gcc-4.8.2.drv', ['out'])
>>> < ('/nix/store/cn5p5k04np1v3vpqimgx2f8012wv2ljw-glibc-2.19.drv', ['out'])
>>> < ('/nix/store/qi7wdh1qyvd58ip61dn8d58v2awagbhj-coreutils-8.21.drv',
>>> ['out'])
>>> < ('/nix/store/xirq1m6mi5lw61v33mnv3j13hy9bwnwx-bootstrap-tools.drv',
>>> ['out'])
>>> < ('/nix/store/yykyb9sf6axlm78f4apk0mabicnv8mnr-binutils-2.23.1.drv',
>>> ['out'])
>>> ---
>>> > ('/nix/store/38aab2xbj5vpk09c218rdz4jy8xfgjs9-glibc-2.19.drv', ['out'])
>>> > ('/nix/store/5ncp7pw6nc3yhxny8mfks17jngxz9qns-gcc-4.8.2.drv', ['out'])
>>> > ('/nix/store/7z26jxbwkc5hx9gwrj47dhcpfxwg5b67-binutils-2.23.1.drv',
>>> ['out'])
>>> > ('/nix/store/cz26wrhr8ddk09yffy67xjsaz339byj2-bash-4.2-p45.drv',
>>> ['out'])
>>> > ('/nix/store/f3ssylga2wkh9k3bydmaajzz6wifms2w-zlib-1.2.8.drv', ['out'])
>>> > ('/nix/store/kyai48rvwcaynnp0qywcg89yp0l5dzrq-stdenv.drv', ['out'])
>>> > ('/nix/store/q8ng53dv1lccmg4a2jcj8540ifszi65j-coreutils-8.21.drv',
>>> ['out'])
>>> 19c20
>>> < /nix/store/c8lg3m5mr246fvlx6xsrxa0sykv4l9pg-bootstrap-tools/bin/sh
>>> ---
>>> > /nix/store/p0vd3ydvxplbpjffkpblwj5dahcmp9ri-bash-4.2-p45/bin/bash
>>> 23c24
>>> < ('binutils',
>>> '/nix/store/xjvdpqgn2kd4rg0k30z020kxylvlbpx0-binutils-2.23.1')
>>> ---
>>> > ('binutils',
>>> '/nix/store/lc4961ic7mc3bsl7njhzm4qxawhvj2bq-binutils-2.23.1')
>>> 25,26c26,27
>>> < ('builder',
>>> '/nix/store/c8lg3m5mr246fvlx6xsrxa0sykv4l9pg-bootstrap-tools/bin/sh')
>>> < ('coreutils',
>>> '/nix/store/xdswdgz11w9lm9n9bzb6spl7dj45s2x2-coreutils-8.21')
>>> ---
>>> > ('builder',
>>> '/nix/store/p0vd3ydvxplbpjffkpblwj5dahcmp9ri-bash-4.2-p45/bin/bash')
>>> > ('coreutils',
>>> '/nix/store/w15x8z4g200r6syxnc2wyq93gizbg7dv-coreutils-8.21')
>>> 28c29
>>> < ('gcc', '/nix/store/9fb027n5a2lf9qwpb98v77iycqq552pf-gcc-4.8.2')
>>> ---
>>> > ('gcc', '/nix/store/1rymlfk7y0pjwmhh6ngp0azw3173v5a0-gcc-4.8.2')
>>> 39c40
>>> < ('libc', '/nix/store/pdskwizjw8ar31hql2wjnnx6g0s6xc50-glibc-2.19')
>>> ---
>>> > ('libc', '/nix/store/gbymvr6n95scxf6mzkgfzywydsjskmsm-glibc-2.19')
>>> 45c46
>>> < ('out',
>>> '/nix/store/agf8fk4xj2aqr3jccfcypqsmvkz3smn8-gcc-wrapper-4.8.2')
>>> ---
>>> > ('out',
>>> '/nix/store/nxzf150liimxqdz0f105kg5vsbcd9c75-gcc-wrapper-4.8.2')
>>> 50,51c51,52
>>> < ('shell',
>>> '/nix/store/p0vd3ydvxplbpjffkpblwj5dahcmp9ri-bash-4.2-p45/bin/bash')
>>> < ('stdenv',
>>> '/nix/store/hbw5c0hqrg3mv7sa2aic7s9yvrcwjixz-stdenv-linux-boot')
>>> ---
>>> > ('shell',
>>> '/nix/store/4s36p56jq79zhnyplrhqjscaqbw0x3c8-bash-4.2-p45/bin/bash')
>>> > ('stdenv', '/nix/store/rq16hrf7gy426a6lcnf6pa9746sxnbgc-stdenv')
>>> 55c56
>>> < ('zlib', '')
>>> ---
>>> > ('zlib', '/nix/store/kksws74v0v0jf6dl6f5fhw24dygzairc-zlib-1.2.8')
>>> ~~~~~~~~~~~
>>>
>>> I noticed that a few inputs are different in their names ('builder',
>>> 'stdenv', 'zlib').
>>>
>>> --
>>> Pavel
>>>
>>>
>>>
>>>
>>> On Sun, May 25, 2014 at 10:25 AM, Kirill Elagin <kirelagin at gmail.com>wrote:
>>>
>>>> Hi Peter,
>>>>
>>>> Just for the record: this issue is not due to Pavel's misconfiguration,
>>>> I can confirm the behaviour he described.
>>>>
>>>> In my case it is
>>>>
>>>> ~~~~~
>>>> % nix-env --dry-run -iA nixos.pkgs.gcc
>>>> (dry run; not doing anything)
>>>> installing `gcc-wrapper-4.8.2'
>>>> % readlink -f $(which gcc)
>>>> /nix/store/agf8fk4xj2aqr3jccfcypqsmvkz3smn8-gcc-wrapper-4.8.2/bin/gcc
>>>> ~~~~~~~~~~~
>>>>
>>>> (I don't know how to force `nix-env` to print computed hash of an
>>>> already present package.)
>>>>
>>>> ~~~~~~
>>>> % nix-env --dry-run -iA nixos.pkgs.testgcc
>>>> (dry run; not doing anything)
>>>> installing `testgcc'
>>>>
>>>> these derivations will be built:
>>>>   /nix/store/41nacbfpr8jzsk3k03jjlqb2r2xis5gf-gcc-wrapper-4.8.2.drv
>>>>   /nix/store/7z26jxbwkc5hx9gwrj47dhcpfxwg5b67-binutils-2.23.1.drv
>>>>   /nix/store/di54xrm0pkrs67fv61g7j53qhsm8vm55-testgcc.drv
>>>> these paths will be fetched (13.86 MiB download, 79.74 MiB unpacked):
>>>>   /nix/store/1rymlfk7y0pjwmhh6ngp0azw3173v5a0-gcc-4.8.2
>>>> ~~~~~~~~~~~~~~
>>>>
>>>> So please note that hashes don't much not only for `gcc-wrapper` and
>>>> `binutils`, but also for `gcc` and,
>>>> strangely enough, that another `gcc` is available on the channel!
>>>>
>>>> ~~~~~~~~
>>>> % nix-store -q -R $(which gcc) | grep gcc-4
>>>> /nix/store/9fb027n5a2lf9qwpb98v77iycqq552pf-gcc-4.8.2
>>>> ~~~~~~~~~~~
>>>>
>>>> Probably, comparing inputs of `gcc`'s with given hashes might shed some
>>>> light on the case.
>>>>
>>>> Answering your questions:
>>>>
>>>> ~~~~~~
>>>> % nix-env -qaP | grep testgcc
>>>> nixos.pkgs.testgcc
>>>> testgcc
>>>> ~~~~~~~
>>>>
>>>> And removing `~/.nix-defexpr/channels` doesn't change anything.
>>>>
>>>>
>>>>
>>>> --
>>>> Кирилл Елагин
>>>>
>>>>
>>>> On Sun, May 25, 2014 at 1:55 AM, Peter Simons <simons at cryp.to> wrote:
>>>>
>>>>> Hi Pavel,
>>>>>
>>>>> could you please restore original ~/.nixpkgs/config.nix file you were
>>>>> using when you started this thread and run:
>>>>>
>>>>>   $ nix-env -qaP \* | grep testgcc
>>>>>
>>>>> What is the output of that command?
>>>>>
>>>>> Afterwards, please delete the symlink ~/.nix-defexpr/channels (so that
>>>>> ~/.nix-defexpr/channels_root is the only remaining entry in that
>>>>> directory). Then, please run:
>>>>>
>>>>>   $ nix-env -iA nixos.pkgs.testgcc --dry-run
>>>>>
>>>>> Does the command still try to re-build gcc, glibc, etc.?
>>>>>
>>>>> Take care,
>>>>> Peter
>>>>>
>>>>> _______________________________________________
>>>>> nix-dev mailing list
>>>>> nix-dev at lists.science.uu.nl
>>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> nix-dev mailing list
>>>> nix-dev at lists.science.uu.nl
>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140525/9f15199b/attachment.html 


More information about the nix-dev mailing list