gregrahn / tpcds-kit

TPC-DS benchmark kit with some modifications/fixes
317 stars 200 forks source link

Error: open of distributions failed: tpcds.idx: no such file or directory #48

Closed CrisBuda closed 5 years ago

CrisBuda commented 5 years ago

I have the following nix expression to set up the TPCDS toolkit. All is well, the executables (dsdgen dsqgen distcomp mkheader checksum) are copied but then when I run dsdgen I get this error: "Error: open of distributions failed: tpcds.idx: no such file or directory"

{ pkgs, ... }:
    pkgs.stdenv.mkDerivation rec {
      pname = "tpcds-kit";
      version = "unstable-2019-06-14";
      src = pkgs.fetchFromGitHub {
        owner = "gregrahn";
        repo = pname;
        rev = "9d01e73403c32d8e3d89a987d096b98cbfae3c62";
        sha256 = "removed";
      };
      preBuild = "cd tools";
      buildInputs = with pkgs; [ bison byacc (pkgs.writeScriptBin "lex" "exec ${flex}/bin/flex $@") ];
      hardeningDisable = [ "all" ];

      installPhase = ''
        mkdir -p $out/bin
        cp dsdgen dsqgen distcomp mkheader checksum tpcds $out/bin;

      '';

    }

It seems that the tpcds.idx (since its not an executable, maybe?) is not copied into that folder, but the 5 executables are. If cd-ing into it I can't see it, dsdgen can't see it either and returns this error. Can confirm that in my local install of tpcds-kit, the tpcds.idx and tpcds.idx.h files are there and dsdgen can be run just fine. I am trying to set it up in Google cloud instance to work the same way. Tried adding tpcds to the cp command, but it seems to not do anything.

Is there something obvious I am missing? thank you in advance

CrisBuda commented 5 years ago

So I found out I needed to copy .ctags_updated as well: https://github.com/gregrahn/tpcds-kit/blob/9d01e73403c32d8e3d89a987d096b98cbfae3c62/tools/makefile#L237

then use wrapProgram to automatically cd in the right folder: postFixup = ''wrapProgram $out/bin/dsdgen --run "cd $out/bin"'';

gregrahn commented 5 years ago

Seems like the issue is addressed in this section: https://github.com/gregrahn/tpcds-kit#data-generation

If you do not run dsdgen from the tools/ directory then you will need to use the option -DISTRIBUTIONS /.../tpcds-kit/tools/tpcds.idx.