[Nix-dev] hydra build fails on unstable localhost

stewart mackenzie setori88 at gmail.com
Tue Apr 7 15:39:30 CEST 2015


Hi,

an unstable localhost has an issue with building hydra:

Error message:

building
make flags: SHELL=/nix/store/4dd49ybmqlaq2xw6cb4wxrgs51zhv19s-bash-4.3-p33/bin/bash
building all-recursive
Making all in src
make[1]: Entering directory
`/tmp/nix-build-hydra-0.1pre1234-abcdef.drv-0/hydra-0.1pre1234-abcdef/src'
building all-recursive
Making all in c
make[2]: Entering directory
`/tmp/nix-build-hydra-0.1pre1234-abcdef.drv-0/hydra-0.1pre1234-abcdef/src/c'
building hydra-eval-jobs.o
g++ -DPACKAGE_NAME=\"Hydra\" -DPACKAGE_TARNAME=\"hydra\"
-DPACKAGE_VERSION=\"0.1pre1234-abcdef\" -DPACKAGE_STRING=\"Hydra\
0.1pre1234-abcdef\" -DPACKAGE_BUGREPORT=\"nix-dev at cs.uu.nl\"
-DPACKAGE_URL=\"http://nixos.org/hydra/\" -DPACKAGE=\"hydra\"
-DVERSION=\"0.1pre1234-abcdef\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -I.
-I/nix/store/wh8m4p32vcwrhd91ir9aa5k49j7wmn71-boehm-gc-7.2f/include
-I/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix
 -g -O2 -std=c++0x -c -o hydra-eval-jobs.o hydra-eval-jobs.cc
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,
                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:107:0:
warning: "PACKAGE_BUGREPORT" redefined [enabled by default]
 #define PACKAGE_BUGREPORT ""
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,

                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:110:0:
warning: "PACKAGE_NAME" redefined [enabled by default]
 #define PACKAGE_NAME "nix"
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,
                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:113:0:
warning: "PACKAGE_STRING" redefined [enabled by default]
 #define PACKAGE_STRING "nix 1.9pre4045_bd91064"
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,
                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:116:0:
warning: "PACKAGE_TARNAME" redefined [enabled by default]
 #define PACKAGE_TARNAME "nix"
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,
                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:119:0:
warning: "PACKAGE_URL" redefined [enabled by default]
 #define PACKAGE_URL ""
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/types.hh:3:0,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/util.hh:3,
                 from
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/shared.hh:3,
                 from hydra-eval-jobs.cc:6:
/nix/store/ygcswx4ij987pgbhwk2m9f20wdr4jm4h-nix-1.9pre4045_bd91064/include/nix/config.h:122:0:
warning: "PACKAGE_VERSION" redefined [enabled by default]
 #define PACKAGE_VERSION "1.9pre4045_bd91064"
 ^
<command-line>:0:0: note: this is the location of the previous definition
hydra-eval-jobs.cc: In lambda function:
hydra-eval-jobs.cc:215:16: error: 'initGC' was not declared in this scope
         initGC();
                ^
make[2]: *** [hydra-eval-jobs.o] Error 1
make[2]: Leaving directory
`/tmp/nix-build-hydra-0.1pre1234-abcdef.drv-0/hydra-0.1pre1234-abcdef/src/c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/tmp/nix-build-hydra-0.1pre1234-abcdef.drv-0/hydra-0.1pre1234-abcdef/src'
make: *** [all-recursive] Error 1
build time elapsed:  0m0.049s 0m0.022s 0m1.565s 0m0.521s

this is my configuration.nix file:


{ config, pkgs, ... }:

let
  hydra = pkgs.fetchgit {
    url = https://github.com/NixOS/hydra;
    rev = "9e664cf8b03f2488767ae7d0d523529b91402b45"; #most recent
    sha256 = "10rsx6qg5x8h66l35fm3cwclzpvdhvrqfvf7axjqa0dp5hlrmnm4";
#most recent
  };
in
{
  require  = [ "${hydra}/hydra-module.nix" ];
....
  services = {
      hydra = {
        enable = true;
        dbi = "dbi:Pg:dbname=hydra;user=hydra";
        package = (import "${hydra}/release.nix" {}).build.x86_64-linux;
        hydraURL = "localhost";
        listenHost = "localhost";
        port = 3000;
        minimumDiskFree = 5;  # in GB
        minimumDiskFreeEvaluator = 2;
        notificationSender = "sjm at exiconglobal.com";
        #logo = "/var/lib/hydra/logo.png";
        debugServer = false;
        };
...
     postgresql = {
       enable = true;
       package = pkgs.postgresql;
       dataDir = "/var/db/postgresql";
       authentication = ''
         # Generated file; do not edit!
         local all all                trust
         host  all all 127.0.0.1/32   trust
       '';
     }
...


if I use this hydra revision: "4c0e3e47034545ad3exes9e86dd069138bcebb8ccee"
The system works but I cannot connect to the postgresql database ...
in other words I cannot add an admin user.

my /var/lib/hydra/.pgpass is set and it would seem permissions are correct:

]$ ls -la
total 5720
drwxr-xr-x  3 hydra nogroup    4096 Apr  7 21:25 .
drwxr-xr-x 18 root  root       4096 Feb 14 14:05 ..
-rw-------  1 hydra nogroup    1801 Apr  5 17:23 .bash_history
drwx------  2 hydra root       4096 Apr  7 21:02 data
-rw-r--r--  1 hydra nogroup       0 Apr  5 15:21 hydra.sqlite
-rw-------  1 hydra root         28 Apr  5 12:39 .pgpass
-rw-------  1 hydra nogroup      51 Apr  5 17:23 .psql_history
-rw-r-----  1 root  root    5832704 Nov 18 16:13 session_data

Lastly when I run the latest hydra (9e664c) running on our server
which runs channels/nixos-14.12 the latest commit completely fixes the
jobs tests!  \m/

Thanks for that!

/sjm


More information about the nix-dev mailing list