[Nix-dev] sha256 hash mismatch, was Trouble building on debian testing

Andrew Fraser andy at fraserphysics.com
Mon Dec 21 03:10:30 CET 2015


Thanks.  I had found that site between the time I sent my email and
when I got your reply.  I had tried setting the LD_LIBRARY_PATH
enviroment as suggested and it doesn't fix the configuration.  However,
the site was helpful.  I went in and hacked the files generated by
./configure as suggested and got the build to run.

I have written a Makefile that fetches the necessary source, builds
everything and installs nix-boot.  The last target gets built with the
following rule:

-----------------------------------------------------------------
# The find/sed code fixes problems left by configure.  See
# https://github.com/NixOS/nix/issues/566
${HOME}/nix: ${NIX_DEP} unpack_OK
	export LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH};\
  cd srcs/nix*; \
  ${CONFIG} --with-store-dir=$$HOME/nix/store --localstatedir=$$HOME/nix/var; \
  find -name "*.c" -print0|xargs -0 grep -l \<bzlib.h\>|\
    xargs sed -i 's <bzlib.h> "${PREFIX}/include/bzlib.h" g'; \
  find -name "*.mk" -print0|xargs -0 grep -l LDFLAGS\ =\ \-l| \
    xargs grep -l LDFLAGS\ =\ |\
    xargs sed -i "s LDFLAGS\ = LDFLAGS\ =\ -L${PREFIX}/lib g"; \
  make; make install
-----------------------------------------------------------------

Now I get a sha256 hash mismatch.  I built nix-boot from
https://nixos.org/releases/nix/nix-1.10/nix-1.10.tar.xz  Then from my
history I did the following:

  829  mv nix old_nix
  830  export PATH=$HOME/nix-boot/bin:$PATH
  831  nix-channel --add http://nixos.org/channels/nixos-15.09-small
  832  nix-channel --update
  833  nix-env -iA nix
  834  ls
  835  nix-env -iA nixpkgs.nix
  836  history > history

After running "nix-env -iA nixpkgs.nix" again, I get the same kind of
hash mismatch (on bash as before).  Here is the tail of the output:
  /usr/projects/fvs/nix/store/vpmvs8hhal8y8n0zhcrpi2fj8aicxabc-libsodium-1.0.6.tar.gz.drv
  /usr/projects/fvs/nix/store/kkan4y1qrvya0dfwvlzn0wrznk5ngy7a-libsodium-1.0.6.drv
  /usr/projects/fvs/nix/store/qsvh0r27mvk8a0rv0mr5alay4ffxf57k-perl-DBI-1.634.drv
  /usr/projects/fvs/nix/store/yqfv5ijdb3r2aj64xqyd8fvkyr6chky0-sqlite-3.8.11.1.drv
  /usr/projects/fvs/nix/store/nlydybq86b7kq7a118niw36w8lakylcn-perl-DBD-SQLite-1.48.drv
  /usr/projects/fvs/nix/store/pwzimzf4rla1l5piv53jzg8r6h9zd2rl-perl-WWW-Curl-4.17.drv
  /usr/projects/fvs/nix/store/ss2ps00xg1hdfp4mik1crqb9xp936qga-nix-1.10.drv
building path(s) ‘/usr/projects/fvs/nix/store/rhn2bzqxay1723xgbs560s2aig3xzsv2-bash43-042’

trying http://ftpmirror.gnu.org/bash/bash-4.3-patches/bash43-042
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   326  100   326    0     0   1750      0 --:--:-- --:--:-- --:--:--  2362
100  1535  100  1535    0     0   3904      0 --:--:-- --:--:-- --:--:--  3904
output path ‘/usr/projects/fvs/nix/store/rhn2bzqxay1723xgbs560s2aig3xzsv2-bash43-042’ should have sha256 hash ‘1bwhssay66n75fy0pxcrwbm032s6fvfg7dblzbrzzn5k38a56nmp’, instead has ‘06a90k0p6bqc4wk2dsmapna69124an76xvlnlj3xm497vci968dc’
cannot build derivation ‘/usr/projects/fvs/nix/store/d562jsniw3w768b94hcd2p9792v52i5d-bash-4.3-p42.drv’: 1 dependencies couldn't be built
building path(s) ‘/usr/projects/fvs/nix/store/zxznqwi6psgsmj50pnpbcxzyprng7brs-binutils-2.23.1.tar.bz2’
killing process 22323
cannot build derivation ‘/usr/projects/fvs/nix/store/ss2ps00xg1hdfp4mik1crqb9xp936qga-nix-1.10.drv’: 1 dependencies couldn't be built
error: build of ‘/usr/projects/fvs/nix/store/ss2ps00xg1hdfp4mik1crqb9xp936qga-nix-1.10.drv’ failed



>>>>> "JC" == James Cook <james.cook at utoronto.ca>writes:

    JC> Try the last comment here:
    JC> https://github.com/NixOS/nix/issues/566 If you do solve it,
    JC> there's also a StackOverflow question that could use an answer
    JC> http://stackoverflow.com/questions/29495436/usr-bin-ld-cannot-find-lsqlite3

    JC> James


More information about the nix-dev mailing list