Questions about nix-pills pt 2

Part 1

graphviz does not build

I have advanced to section 12.3 of the nix-pills, and am building graphviz.

These are my files:

According to the pills graphviz should build, and I am then tasked with resolving a runtime issue. Graphviz does not build for me, however. Shortened output:

/nix/store/5ddb4j8z84p6sjphr0kh6cbq5jd12ncs-binutils-2.35.1/bin/ld: ../../lib/gvc/.libs/libgvc.so: undefined reference to `dlopen_LTX_get_vtable'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:734: dot] Error 1
make[3]: Leaving directory '/build/graphviz-2.38.0/cmd/dot'
make[2]: *** [Makefile:531: all-recursive] Error 1
make[2]: Leaving directory '/build/graphviz-2.38.0/cmd'
make[1]: *** [Makefile:774: all-recursive] Error 1
make[1]: Leaving directory '/build/graphviz-2.38.0'
make: *** [Makefile:583: all] Error 2
builder for '/nix/store/pw1gkvwmgg6bwnyyp97hqyfvv91fhjy1-graphviz.drv' failed with exit code 2
error: build of '/nix/store/pw1gkvwmgg6bwnyyp97hqyfvv91fhjy1-graphviz.drv' failed
Exception: nix-build exited with 100
[tty 137], line 1: nix-build graphviz.nix 

Does anyone see what I may have done wrong?

1 Like

The pills are a bit out of date, and need modernising the last time i checked.

pkgs = import {};

doesn’t ‘pin’ your nixpkgs to a certain revision/commit. So this example probably worked a long time ago, but things have moved on. (and they move quick in nixpkgs land!).

It’s quite possible this would work if you could find out the commit is was published at.

2 Likes

Thanks. I found this section in the wiki and it looks like I can pin by using the fetchGit builtin eg

import (builtins.fetchGit {
  # Descriptive name to make the store path easier to identify
  name = "nixos-unstable-2018-09-12";
  url = "https://github.com/nixos/nixpkgs/";
  # Commit hash for nixos-unstable as of 2018-09-12
  # `git ls-remote https://github.com/nixos/nixpkgs nixos-unstable`
  ref = "refs/heads/nixos-unstable";
  rev = "ca2ba44cab47767c8127d1c8633e2b581644eb8f";
}) {}

Indeed, according to the preface it appears that the pills were updated in 2017 and by searching gcc using lazamar.co.uk, I find a ready-made snippet for a 2017 commit here.

Fingers crossed.

kaboom

error: undefined variable 'binutils-unwrapped' at /home/crinklywrappr/Documents/nix-pills/autotools.nix:7:47
(use '--show-trace' to show detailed location information)
Exception: nix-build exited with 1
[tty 148], line 1: nix-build graphviz.nix 

I tried w/ that + 2 other hashes wrt binutils in 2017.

If the path forward is to solve the dependency issue or guess the correct git hash then I think I’m done.

Reported the issue here.

1 Like

the pills need a overhaul, but nobody seems to have the time or are brave enough to do it. Don’t let it put you off however, most things do work, it just takes a bit of tweagaling around.

1 Like