jfischoff / tmp-postgres

Create temporary postgres instances
BSD 3-Clause "New" or "Revised" License
53 stars 17 forks source link

soak-test fail on macOS #272

Closed sternenseemann closed 3 years ago

sternenseemann commented 3 years ago

I have observed two different kinds of failures in soak-test:

Preprocessing test suite 'test' for tmp-postgres-1.34.1.0..
Building test suite 'test' for tmp-postgres-1.34.1.0..
[1 of 1] Compiling Main             ( test/Main.hs, dist/build/test/test-tmp/Main.o, dist/build/test/test-tmp/Main.dyn_o )
Linking dist/build/test/test ...
Preprocessing executable 'with-cache-loop' for tmp-postgres-1.34.1.0..
Building executable 'with-cache-loop' for tmp-postgres-1.34.1.0..
[1 of 1] Compiling Main             ( profiling/Main.hs, dist/build/with-cache-loop/with-cache-loop-tmp/Main.o, dist/build/with-cache-loop/with-cache-loop-tmp/Main.dyn_o )
Linking dist/build/with-cache-loop/with-cache-loop ...
Preprocessing executable 'soak-test' for tmp-postgres-1.34.1.0..
Building executable 'soak-test' for tmp-postgres-1.34.1.0..
[1 of 1] Compiling Main             ( resource-soak-test/Main.hs, dist/build/soak-test/soak-test-tmp/Main.o, dist/build/soak-test/soak-test-tmp/Main.dyn_o )
Linking dist/build/soak-test/soak-test ...
running tests
Running 1 test suites...
Test suite test: RUNNING...

withConfig
  succeeds with
    mempty and extra postgresql.conf FAILED [1]
    optionsToDefaultConfig mempty is the same as mempty Config FAILED [2]
    postgres db name does not cause createdb failure FAILED [3]
    template1 db name does not cause createdb failure FAILED [4]
    specific socket works with optionsToDefaultConfig FAILED [5]
    filled out optionsToDefaultConfig FAILED [6]
    default ip option works FAILED [7]
    specific unix socket works FAILED [8]
    works with the default temporary directory to some degree at least FAILED [9]
    works if on non-empty if initdb is disabled FAILED [10]
    makeResourcesDataDirPermanent works
StartPlan:
completePlanInitDb:
  cachePlanDataDirectory:
    /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data
  cachePlanInitDb:
    completeProcessConfigEnvVars:
      tmp_postgres_datadir: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/tmp-postgres-1.34.1.0/.
      HOST_PATH: /nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/bin:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/bin:/nix/store/157cg5bk6ym66n73idmp7z1md70kyy4q-hspec-discover-2.7.10/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/d8wv1fg7z343imib46ydrddmqhg9r5vs-findutils-4.7.0/bin:/nix/store/bkypkqmbfjd3lw42iq7wl58lbsddlj7w-diffutils-3.7/bin:/nix/store/skhmqfq03a9f2wm2033kwclvm61sa3lw-gnused-4.8/bin:/nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin:/nix/store/ns5wrchrq5v4rmkqkiqwpa1vsnzg0m0d-gawk-5.1.0/bin:/nix/store/6db6a4pw86h8m879qylb097vyhsc84y8-gnutar-1.34/bin:/nix/store/rys3pmdsrblc6f0252jymdkrbk101hx3-gzip-1.10/bin:/nix/store/jdisgiccdaspnhi44zvzlh0hw39z8i05-bzip2-1.0.6.0.2-bin/bin:/nix/store/4bh4813x6wv5ay2nrbln1kr4w65vgrjd-gnumake-4.3/bin:/nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin:/nix/store/v7yspxwjbg96mngjri9ghdbli6cs3i71-patch-2.7.6/bin:/nix/store/2jdg87kz171rm06xlahlzfsz9w7bvn15-xz-5.2.5-bin/bin
      haddockPhase: runHook preHaddock
      ./Setup haddock --html \
        --hoogle \
        --quickjump \
        --hyperlink-source \

      runHook postHaddock

      NIX_CFLAGS_COMPILE_FOR_BUILD:  -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      propagatedBuildInputs: /nix/store/54bvpzbymxs2im3yi36jiz65avp7ad27-ansi-wl-pprint-0.6.9 /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3  /nix/store/5a1l3gww0c9qkvmlrf8gbdhkfvq18lrz-base64-bytestring-1.1.0.0   /nix/store/rs9mqy2mpyfrjg1vq1ayhlmvjyl2mn93-cryptohash-sha1-0.11.100.1   /nix/store/vjhjflnl9gxhd6n6nj61har4ngflz1rv-generic-monoid-0.1.0.1 /nix/store/wrxh20hhd3b3jpzc63hapa3n01c47hgm-port-utils-0.2.1.0 /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4   /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3   /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3   /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4  /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3
      stdenv: /nix/store/b9h2w4nd3rg3hi9yga9ycpgppb5hl2p2-stdenv-darwin
      LANG: en_US.UTF-8
      TZ: UTC
      OLDPWD: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      out: /nix/store/fc69bvkznv96c7w2yi5x5bj5ygn55fp1-tmp-postgres-1.34.1.0
      compileBuildDriverPhase: runHook preCompileBuildDriver

      for i in Setup.hs Setup.lhs /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs; do
        test -f $i && break
      done

      echo setupCompileFlags: $setupCompileFlags
      ghc $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i

      runHook postCompileBuildDriver

      AS_FOR_BUILD: as
      NIX_NO_SELF_RPATH: 1
      src: /nix/store/b9bf48c11n336vlajz2lfw407a7swdc8-tmp-postgres-1.34.1.0.tar.gz
      CONFIG_SHELL: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      buildInputs: /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3    /nix/store/vjhjflnl9gxhd6n6nj61har4ngflz1rv-generic-monoid-0.1.0.1 /nix/store/5fmqhlkni4cpzjiy83ahh9m23srndl7q-hspec-2.7.10  /nix/store/n2jlvpr6mhbivd4v3s0s8xbabr19hlnb-network-3.1.1.1 /nix/store/wrxh20hhd3b3jpzc63hapa3n01c47hgm-port-utils-0.2.1.0 /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4  /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3 
      builder: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      preConfigurePhases: compileBuildDriverPhase
      NIX_DONT_SET_RPATH_FOR_BUILD: 1
      CC: clang
      NIX_CC_FOR_BUILD: /nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0
      postPatch: 
      NIX_DONT_SET_RPATH: 1
      NIX_LDFLAGS_FOR_BUILD:  -liconv -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib
      STRIP: strip
      depsBuildTarget: 
      NM_FOR_BUILD: nm
      NIX_LOG_FD: 2
      propagatedNativeBuildInputs: 
      NIX_COREFOUNDATION_RPATH: /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      preCheck: export HOME="$TMPDIR"

      depsTargetTarget: 
      NIX_CC_WRAPPER_TARGET_HOST_x86_64_apple_darwin: 1
      system: x86_64-darwin
      PWD: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/tmp-postgres-1.34.1.0
      HOME: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      setupCompilerEnvironmentPhase: NIX_BUILD_CORES=$(( NIX_BUILD_CORES < 16 ? NIX_BUILD_CORES : 16 ))
      runHook preSetupCompilerEnvironment

      echo "Build with /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4."
      export PATH=/nix/store/dpak996p2ipypnacr1bp7h29iid5j5ww-hscolour-1.24.4/bin:$PATH

      setupPackageConfDir="$TMPDIR/setup-package.conf.d"
      mkdir -p $setupPackageConfDir
      packageConfDir="$TMPDIR/package.conf.d"
      mkdir -p $packageConfDir

      setupCompileFlags="-package-db=$setupPackageConfDir -j$NIX_BUILD_CORES -threaded -rtsopts"
      configureFlags="--verbose --prefix=$out --libdir=\$prefix/lib/\$compiler --libsubdir=\$abi/\$libname  --docdir=$doc/share/doc/tmp-postgres-1.34.1.0 --with-gcc=$CC --package-db=$packageConfDir   --ghc-options=-j$NIX_BUILD_CORES  --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci $configureFlags"
      for p in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}"; do
        # If this dependency has a package database, then copy the contents of it,
      # unless it is one of our GHCs. These can appear in our dependencies when
      # we are doing native builds, and they have package databases in them, but
      # we do not want to copy them over.
      #
      # We don't need to, since those packages will be provided by the GHC when
      # we compile with it, and doing so can result in having multiple copies of
      # e.g. Cabal in the database with the same name and version, which is
      # ambiguous.
      if [ -d "$p/lib/ghc-8.10.4/package.conf.d" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ]; then
        cp -f "$p/lib/ghc-8.10.4/package.conf.d/"*.conf $setupPackageConfDir/
        continue
      fi

      done
      ghc-pkg --package-db="$setupPackageConfDir" recache
      for p in "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}"; do
        # If this dependency has a package database, then copy the contents of it,
      # unless it is one of our GHCs. These can appear in our dependencies when
      # we are doing native builds, and they have package databases in them, but
      # we do not want to copy them over.
      #
      # We don't need to, since those packages will be provided by the GHC when
      # we compile with it, and doing so can result in having multiple copies of
      # e.g. Cabal in the database with the same name and version, which is
      # ambiguous.
      if [ -d "$p/lib/ghc-8.10.4/package.conf.d" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ]; then
        cp -f "$p/lib/ghc-8.10.4/package.conf.d/"*.conf $packageConfDir/
        continue
      fi

        if [ -d "$p/include" ]; then
          configureFlags+=" --extra-include-dirs=$p/include"
        fi
        if [ -d "$p/lib" ]; then
          configureFlags+=" --extra-lib-dirs=$p/lib"
        fi
      if [[ -d "$p/Library/Frameworks" ]]; then
        configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
      fi
      done
      # Work around a limit in the macOS Sierra linker on the number of paths
      # referenced by any one dynamic library:
      #
      # Create a local directory with symlinks of the *.dylib (macOS shared
      # libraries) from all the dependencies.
      local dynamicLinksDir="$out/lib/links"
      mkdir -p $dynamicLinksDir

      # Unprettify all package conf files before reading/writing them
      for d in "$packageConfDir/"*; do
        # gawk -i inplace seems to strip the last newline
        gawk -f /nix/store/907d7wf2d113vlv8dlhi1i3d683gc1rs-unpretty-cabal-conf.awk "$d" > tmp
        mv tmp "$d"
      done

      for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do
        for lib in "$d/"*.{dylib,so}; do
          # Allow overwriting because C libs can be pulled in multiple times.
          ln -sf "$lib" "$dynamicLinksDir"
        done
      done
      # Edit the local package DB to reference the links directory.
      for f in "$packageConfDir/"*.conf; do
        sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," "$f"
      done
      ghc-pkg --package-db="$packageConfDir" recache

      runHook postSetupCompilerEnvironment

      TMP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      strictDeps: 
      NIX_ENFORCE_NO_NATIVE: 1
      __propagatedImpureHostDeps: 
      XDG_DATA_DIRS: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4/share:/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/share:/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/share:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/share:/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/share:/nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008/share
      checkPhase: runHook preCheck
      checkFlagsArray+=()
      ./Setup test  $checkFlags ${checkFlagsArray:+"${checkFlagsArray[@]}"}
      runHook postCheck

      RANLIB: ranlib
      AS: as
      AR: ar
      SSL_CERT_FILE: /no-cert-file.crt
      NIX_CC: /nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0
      gl_cv_func_getcwd_abort_bug: no
      NIX_CFLAGS_COMPILE:  -frandom-seed=fc69bvkznv -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      depsBuildBuild: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4
      NIX_STORE: /nix/store
      configurePhase: runHook preConfigure

      unset GHC_PACKAGE_PATH      # Cabal complains if this variable is set during configure.

      echo configureFlags: $configureFlags
      ./Setup configure $configureFlags 2>&1 | /nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin/tee "$NIX_BUILD_TOP/cabal-configure.log"
      if /nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin/egrep -q -z 'Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then
        echo >&2 "*** abort because of serious configure-time warning from Cabal"
        exit 1
      fi

      export GHC_PACKAGE_PATH="$packageConfDir:"

      runHook postConfigure

      outputs: out doc
      CC_FOR_BUILD: clang
      configureFlags: --verbose --prefix=/nix/store/fc69bvkznv96c7w2yi5x5bj5ygn55fp1-tmp-postgres-1.34.1.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname  --docdir=/nix/store/7061g8wpbjm1r3r9y83wwlmh8m18l46b-tmp-postgres-1.34.1.0-doc/share/doc/tmp-postgres-1.34.1.0 --with-gcc=clang --package-db=/private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/package.conf.d   --ghc-options=-j4  --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci  --extra-include-dirs=/nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include --extra-lib-dirs=/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib --extra-include-dirs=/nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include --extra-lib-dirs=/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib --extra-include-dirs=/nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include --extra-lib-dirs=/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib --extra-lib-dirs=/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib --extra-lib-dirs=/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib --extra-lib-dirs=/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib --extra-include-dirs=/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include --extra-lib-dirs=/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib --extra-framework-dirs=/nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      prePhases: setupCompilerEnvironmentPhase
      configurePlatforms: 
      TMPDIR: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      NIX_IGNORE_LD_THROUGH_GCC: 1
      name: tmp-postgres-1.34.1.0
      __impureHostDeps: /bin/sh /usr/lib/libSystem.B.dylib /usr/lib/system/libunc.dylib /dev/zero /dev/random /dev/urandom /bin/sh
      RANLIB_FOR_BUILD: ranlib
      doInstallCheck: 
      doCheck: 1
      MACOSX_DEPLOYMENT_TARGET: 10.12
      NIX_BINTOOLS: /nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1
      LD_DYLD_PATH: /usr/lib/dyld
      NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_apple_darwin: 1
      __sandboxProfile: 
      NM: nm
      prePatch: 
      __darwinAllowLocalNetworking: 
      depsHostHostPropagated: 
      CXX: clang++
      SIZE_FOR_BUILD: size
      __propagatedSandboxProfile: 
      depsBuildBuildPropagated: 
      SHELL: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      TERM: xterm-256color
      NIX_LDFLAGS:  -liconv -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib
      TEMPDIR: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      shell: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      PATH_LOCALE: /nix/store/3qmd3i929nw2hrhszpxgxzm0833ssspx-adv_cmds-119-locale/share/locale
      NIX_BINTOOLS_FOR_BUILD: /nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1
      NIX_CC_WRAPPER_TARGET_BUILD_x86_64_apple_darwin: 1
      NIX_HARDENING_ENABLE: fortify stackprotector pic strictoverflow format relro bindnow
      NIX_INDENT_MAKE: 1
      hardeningDisable: pie
      NIX_SSL_CERT_FILE: /no-cert-file.crt
      setOutputFlags: 
      SHLVL: 1
      NIX_BUILD_CORES: 4
      installPhase: runHook preInstall

      ./Setup copy 
      local packageConfDir="$out/lib/ghc-8.10.4/package.conf.d"
      local packageConfFile="$packageConfDir/tmp-postgres-1.34.1.0.conf"
      mkdir -p "$packageConfDir"
      ./Setup register --gen-pkg-config=$packageConfFile
      if [ -d "$packageConfFile" ]; then
        mv "$packageConfFile/"* "$packageConfDir"
        rmdir "$packageConfFile"
      fi
      for packageConfFile in "$packageConfDir/"*; do
        local pkgId=$(gawk -f /nix/store/907d7wf2d113vlv8dlhi1i3d683gc1rs-unpretty-cabal-conf.awk "$packageConfFile" \
          | grep '^id:' | cut -d' ' -f2)
        mv "$packageConfFile" "$packageConfDir/$pkgId.conf"
      done

      # delete confdir if there are no libraries
      find $packageConfDir -maxdepth 0 -empty -delete;

      for x in $doc/share/doc/tmp-postgres-1.34.1.0"/html/src/"*.html; do
        remove-references-to -t $out $x
      done
      mkdir -p $doc

      runHook postInstall

      STRINGS_FOR_BUILD: strings
      SOURCE_DATE_EPOCH: 1577603671
      TEMP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      GHC_PACKAGE_PATH: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/package.conf.d:
      STRINGS: strings
      preInstallPhases: haddockPhase
      NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_apple_darwin: 1
      STRIP_FOR_BUILD: strip
      depsHostHost: 
      buildPhase: runHook preBuild
      ./Setup build 
      runHook postBuild

      CXX_FOR_BUILD: clang++
      LD_FOR_BUILD: ld
      PATH: /nix/store/dpak996p2ipypnacr1bp7h29iid5j5ww-hscolour-1.24.4/bin:/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4/bin:/nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0/bin:/nix/store/nv5arvc7346f69rcllaf29gmmi8qlpbl-clang-7.1.0/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1/bin:/nix/store/k0p31jydp2bp2s71712jw4c81ls39i5d-cctools-binutils-darwin-949.0.1/bin:/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/bin:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/bin:/nix/store/f47i7ll07svg2s7qy3rg5nimy69r18lq-remove-references-to/bin:/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/bin:/nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008/bin:/nix/store/157cg5bk6ym66n73idmp7z1md70kyy4q-hspec-discover-2.7.10/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/d8wv1fg7z343imib46ydrddmqhg9r5vs-findutils-4.7.0/bin:/nix/store/bkypkqmbfjd3lw42iq7wl58lbsddlj7w-diffutils-3.7/bin:/nix/store/skhmqfq03a9f2wm2033kwclvm61sa3lw-gnused-4.8/bin:/nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin:/nix/store/ns5wrchrq5v4rmkqkiqwpa1vsnzg0m0d-gawk-5.1.0/bin:/nix/store/6db6a4pw86h8m879qylb097vyhsc84y8-gnutar-1.34/bin:/nix/store/rys3pmdsrblc6f0252jymdkrbk101hx3-gzip-1.10/bin:/nix/store/jdisgiccdaspnhi44zvzlh0hw39z8i05-bzip2-1.0.6.0.2-bin/bin:/nix/store/4bh4813x6wv5ay2nrbln1kr4w65vgrjd-gnumake-4.3/bin:/nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin:/nix/store/v7yspxwjbg96mngjri9ghdbli6cs3i71-patch-2.7.6/bin:/nix/store/2jdg87kz171rm06xlahlzfsz9w7bvn15-xz-5.2.5-bin/bin
      NIX_BUILD_TOP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      depsBuildTargetPropagated: 
      NIX_ENFORCE_PURITY: 1
      SIZE: size
      nativeBuildInputs: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4 /nix/store/f47i7ll07svg2s7qy3rg5nimy69r18lq-remove-references-to /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11 /nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008
      doc: /nix/store/7061g8wpbjm1r3r9y83wwlmh8m18l46b-tmp-postgres-1.34.1.0-doc
      LD: ld
      AR_FOR_BUILD: ar
      patches: 
      depsTargetTargetPropagated: 
      _: ./Setup
    completeProcessConfigCmdLine:
    --no-sync --pgdata=/tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data
    completeProcessConfigStdIn: HANDLE
    completeProcessConfigStdOut: HANDLE
    completeProcessConfigStdErr: HANDLE
  cachePlanCopy:
    copyDirectoryCommandSrc:
      /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data
    copyDirectoryCommandDst:
      /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-data-6fa4997f6ca94ed7
    copyDirectoryCommandCow: True
completePlanCopy:   
completePlanCreateDb:   
completePlanPostgres:
  completePostgresPlanProcessConfig:
    completeProcessConfigEnvVars:
      tmp_postgres_datadir: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/tmp-postgres-1.34.1.0/.
      HOST_PATH: /nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/bin:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/bin:/nix/store/157cg5bk6ym66n73idmp7z1md70kyy4q-hspec-discover-2.7.10/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/d8wv1fg7z343imib46ydrddmqhg9r5vs-findutils-4.7.0/bin:/nix/store/bkypkqmbfjd3lw42iq7wl58lbsddlj7w-diffutils-3.7/bin:/nix/store/skhmqfq03a9f2wm2033kwclvm61sa3lw-gnused-4.8/bin:/nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin:/nix/store/ns5wrchrq5v4rmkqkiqwpa1vsnzg0m0d-gawk-5.1.0/bin:/nix/store/6db6a4pw86h8m879qylb097vyhsc84y8-gnutar-1.34/bin:/nix/store/rys3pmdsrblc6f0252jymdkrbk101hx3-gzip-1.10/bin:/nix/store/jdisgiccdaspnhi44zvzlh0hw39z8i05-bzip2-1.0.6.0.2-bin/bin:/nix/store/4bh4813x6wv5ay2nrbln1kr4w65vgrjd-gnumake-4.3/bin:/nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin:/nix/store/v7yspxwjbg96mngjri9ghdbli6cs3i71-patch-2.7.6/bin:/nix/store/2jdg87kz171rm06xlahlzfsz9w7bvn15-xz-5.2.5-bin/bin
      haddockPhase: runHook preHaddock
      ./Setup haddock --html \
        --hoogle \
        --quickjump \
        --hyperlink-source \

      runHook postHaddock

      NIX_CFLAGS_COMPILE_FOR_BUILD:  -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      propagatedBuildInputs: /nix/store/54bvpzbymxs2im3yi36jiz65avp7ad27-ansi-wl-pprint-0.6.9 /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3  /nix/store/5a1l3gww0c9qkvmlrf8gbdhkfvq18lrz-base64-bytestring-1.1.0.0   /nix/store/rs9mqy2mpyfrjg1vq1ayhlmvjyl2mn93-cryptohash-sha1-0.11.100.1   /nix/store/vjhjflnl9gxhd6n6nj61har4ngflz1rv-generic-monoid-0.1.0.1 /nix/store/wrxh20hhd3b3jpzc63hapa3n01c47hgm-port-utils-0.2.1.0 /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4   /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3   /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3   /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4  /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3
      stdenv: /nix/store/b9h2w4nd3rg3hi9yga9ycpgppb5hl2p2-stdenv-darwin
      LANG: en_US.UTF-8
      TZ: UTC
      OLDPWD: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      out: /nix/store/fc69bvkznv96c7w2yi5x5bj5ygn55fp1-tmp-postgres-1.34.1.0
      compileBuildDriverPhase: runHook preCompileBuildDriver

      for i in Setup.hs Setup.lhs /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs; do
        test -f $i && break
      done

      echo setupCompileFlags: $setupCompileFlags
      ghc $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i

      runHook postCompileBuildDriver

      AS_FOR_BUILD: as
      NIX_NO_SELF_RPATH: 1
      src: /nix/store/b9bf48c11n336vlajz2lfw407a7swdc8-tmp-postgres-1.34.1.0.tar.gz
      CONFIG_SHELL: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      buildInputs: /nix/store/ingkws2vwp1dbpqa0ady136x8fvspn7x-async-2.2.3    /nix/store/vjhjflnl9gxhd6n6nj61har4ngflz1rv-generic-monoid-0.1.0.1 /nix/store/5fmqhlkni4cpzjiy83ahh9m23srndl7q-hspec-2.7.10  /nix/store/n2jlvpr6mhbivd4v3s0s8xbabr19hlnb-network-3.1.1.1 /nix/store/wrxh20hhd3b3jpzc63hapa3n01c47hgm-port-utils-0.2.1.0 /nix/store/d1y6lpl7zzralrvynifdsy143lgk4nb1-postgres-options-0.2.0.0 /nix/store/hfwcm5fna5dc5hsvlmkx9higvsqkd28x-postgresql-simple-0.6.4  /nix/store/shszsc46pilqs53r5xrwr2yz8q9ckjc4-temporary-1.3 
      builder: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      preConfigurePhases: compileBuildDriverPhase
      NIX_DONT_SET_RPATH_FOR_BUILD: 1
      CC: clang
      NIX_CC_FOR_BUILD: /nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0
      postPatch: 
      NIX_DONT_SET_RPATH: 1
      NIX_LDFLAGS_FOR_BUILD:  -liconv -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib
      STRIP: strip
      depsBuildTarget: 
      NM_FOR_BUILD: nm
      NIX_LOG_FD: 2
      propagatedNativeBuildInputs: 
      NIX_COREFOUNDATION_RPATH: /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      preCheck: export HOME="$TMPDIR"

      depsTargetTarget: 
      NIX_CC_WRAPPER_TARGET_HOST_x86_64_apple_darwin: 1
      system: x86_64-darwin
      PWD: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/tmp-postgres-1.34.1.0
      HOME: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      setupCompilerEnvironmentPhase: NIX_BUILD_CORES=$(( NIX_BUILD_CORES < 16 ? NIX_BUILD_CORES : 16 ))
      runHook preSetupCompilerEnvironment

      echo "Build with /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4."
      export PATH=/nix/store/dpak996p2ipypnacr1bp7h29iid5j5ww-hscolour-1.24.4/bin:$PATH

      setupPackageConfDir="$TMPDIR/setup-package.conf.d"
      mkdir -p $setupPackageConfDir
      packageConfDir="$TMPDIR/package.conf.d"
      mkdir -p $packageConfDir

      setupCompileFlags="-package-db=$setupPackageConfDir -j$NIX_BUILD_CORES -threaded -rtsopts"
      configureFlags="--verbose --prefix=$out --libdir=\$prefix/lib/\$compiler --libsubdir=\$abi/\$libname  --docdir=$doc/share/doc/tmp-postgres-1.34.1.0 --with-gcc=$CC --package-db=$packageConfDir   --ghc-options=-j$NIX_BUILD_CORES  --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci $configureFlags"
      for p in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}"; do
        # If this dependency has a package database, then copy the contents of it,
      # unless it is one of our GHCs. These can appear in our dependencies when
      # we are doing native builds, and they have package databases in them, but
      # we do not want to copy them over.
      #
      # We don't need to, since those packages will be provided by the GHC when
      # we compile with it, and doing so can result in having multiple copies of
      # e.g. Cabal in the database with the same name and version, which is
      # ambiguous.
      if [ -d "$p/lib/ghc-8.10.4/package.conf.d" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ]; then
        cp -f "$p/lib/ghc-8.10.4/package.conf.d/"*.conf $setupPackageConfDir/
        continue
      fi

      done
      ghc-pkg --package-db="$setupPackageConfDir" recache
      for p in "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}"; do
        # If this dependency has a package database, then copy the contents of it,
      # unless it is one of our GHCs. These can appear in our dependencies when
      # we are doing native builds, and they have package databases in them, but
      # we do not want to copy them over.
      #
      # We don't need to, since those packages will be provided by the GHC when
      # we compile with it, and doing so can result in having multiple copies of
      # e.g. Cabal in the database with the same name and version, which is
      # ambiguous.
      if [ -d "$p/lib/ghc-8.10.4/package.conf.d" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ] && [ "$p" != "/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4" ]; then
        cp -f "$p/lib/ghc-8.10.4/package.conf.d/"*.conf $packageConfDir/
        continue
      fi

        if [ -d "$p/include" ]; then
          configureFlags+=" --extra-include-dirs=$p/include"
        fi
        if [ -d "$p/lib" ]; then
          configureFlags+=" --extra-lib-dirs=$p/lib"
        fi
      if [[ -d "$p/Library/Frameworks" ]]; then
        configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
      fi
      done
      # Work around a limit in the macOS Sierra linker on the number of paths
      # referenced by any one dynamic library:
      #
      # Create a local directory with symlinks of the *.dylib (macOS shared
      # libraries) from all the dependencies.
      local dynamicLinksDir="$out/lib/links"
      mkdir -p $dynamicLinksDir

      # Unprettify all package conf files before reading/writing them
      for d in "$packageConfDir/"*; do
        # gawk -i inplace seems to strip the last newline
        gawk -f /nix/store/907d7wf2d113vlv8dlhi1i3d683gc1rs-unpretty-cabal-conf.awk "$d" > tmp
        mv tmp "$d"
      done

      for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do
        for lib in "$d/"*.{dylib,so}; do
          # Allow overwriting because C libs can be pulled in multiple times.
          ln -sf "$lib" "$dynamicLinksDir"
        done
      done
      # Edit the local package DB to reference the links directory.
      for f in "$packageConfDir/"*.conf; do
        sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," "$f"
      done
      ghc-pkg --package-db="$packageConfDir" recache

      runHook postSetupCompilerEnvironment

      TMP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      strictDeps: 
      NIX_ENFORCE_NO_NATIVE: 1
      __propagatedImpureHostDeps: 
      XDG_DATA_DIRS: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4/share:/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/share:/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/share:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/share:/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/share:/nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008/share
      checkPhase: runHook preCheck
      checkFlagsArray+=()
      ./Setup test  $checkFlags ${checkFlagsArray:+"${checkFlagsArray[@]}"}
      runHook postCheck

      RANLIB: ranlib
      AS: as
      AR: ar
      SSL_CERT_FILE: /no-cert-file.crt
      NIX_CC: /nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0
      gl_cv_func_getcwd_abort_bug: no
      NIX_CFLAGS_COMPILE:  -frandom-seed=fc69bvkznv -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks -isystem /nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include -isystem /nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include -isystem /nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include -isystem /nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include -isystem /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/include -iframework /nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      depsBuildBuild: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4
      NIX_STORE: /nix/store
      configurePhase: runHook preConfigure

      unset GHC_PACKAGE_PATH      # Cabal complains if this variable is set during configure.

      echo configureFlags: $configureFlags
      ./Setup configure $configureFlags 2>&1 | /nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin/tee "$NIX_BUILD_TOP/cabal-configure.log"
      if /nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin/egrep -q -z 'Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then
        echo >&2 "*** abort because of serious configure-time warning from Cabal"
        exit 1
      fi

      export GHC_PACKAGE_PATH="$packageConfDir:"

      runHook postConfigure

      outputs: out doc
      CC_FOR_BUILD: clang
      configureFlags: --verbose --prefix=/nix/store/fc69bvkznv96c7w2yi5x5bj5ygn55fp1-tmp-postgres-1.34.1.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname  --docdir=/nix/store/7061g8wpbjm1r3r9y83wwlmh8m18l46b-tmp-postgres-1.34.1.0-doc/share/doc/tmp-postgres-1.34.1.0 --with-gcc=clang --package-db=/private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/package.conf.d   --ghc-options=-j4  --disable-split-objs --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci  --extra-include-dirs=/nix/store/z3dq18wigwh01289h77gwhwigarqixsk-libcxx-7.1.0-dev/include --extra-lib-dirs=/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib --extra-include-dirs=/nix/store/3qlgjr69pwj1zjyh6659z359qkhisibp-libcxxabi-7.1.0-dev/include --extra-lib-dirs=/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib --extra-include-dirs=/nix/store/kzgybw28ymvirsdlqvyi9z6ad5mszk72-compiler-rt-libc-7.1.0-dev/include --extra-lib-dirs=/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib --extra-lib-dirs=/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib --extra-lib-dirs=/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib --extra-lib-dirs=/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib --extra-include-dirs=/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/include --extra-lib-dirs=/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib --extra-framework-dirs=/nix/store/f618ri9jy3lqjyjzw3pnbp5nliyfg63j-swift-corefoundation/Library/Frameworks
      prePhases: setupCompilerEnvironmentPhase
      configurePlatforms: 
      TMPDIR: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      NIX_IGNORE_LD_THROUGH_GCC: 1
      name: tmp-postgres-1.34.1.0
      __impureHostDeps: /bin/sh /usr/lib/libSystem.B.dylib /usr/lib/system/libunc.dylib /dev/zero /dev/random /dev/urandom /bin/sh
      RANLIB_FOR_BUILD: ranlib
      doInstallCheck: 
      doCheck: 1
      MACOSX_DEPLOYMENT_TARGET: 10.12
      NIX_BINTOOLS: /nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1
      LD_DYLD_PATH: /usr/lib/dyld
      NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_apple_darwin: 1
      __sandboxProfile: 
      NM: nm
      prePatch: 
      __darwinAllowLocalNetworking: 
      depsHostHostPropagated: 
      CXX: clang++
      SIZE_FOR_BUILD: size
      __propagatedSandboxProfile: 
      depsBuildBuildPropagated: 
      SHELL: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      TERM: xterm-256color
      NIX_LDFLAGS:  -liconv -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib -L/nix/store/gqa60v70g0pf5kk3agb4yvi8imi2pdgl-libcxx-7.1.0/lib -L/nix/store/m7wazahnbzmc3pyxvx1an5py9nqq1zhi-libcxxabi-7.1.0/lib -L/nix/store/25mv9fjlkzik8b235vm1vlqcn66cvwzk-compiler-rt-libc-7.1.0/lib -L/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/lib -L/nix/store/vk1xwsd93rl0nk7dpvnlivzp7imb0j2v-libffi-3.3/lib -L/nix/store/rjf4dib6m91fmkgjldbv4wnps49rl4ax-gmp-6.2.1/lib -L/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/lib -L/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/lib -L/nix/store/1ivqbf6ibgq91sl4l4wl40falkk517vk-postgresql-11.11-lib/lib
      TEMPDIR: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      shell: /nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin/bash
      PATH_LOCALE: /nix/store/3qmd3i929nw2hrhszpxgxzm0833ssspx-adv_cmds-119-locale/share/locale
      NIX_BINTOOLS_FOR_BUILD: /nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1
      NIX_CC_WRAPPER_TARGET_BUILD_x86_64_apple_darwin: 1
      NIX_HARDENING_ENABLE: fortify stackprotector pic strictoverflow format relro bindnow
      NIX_INDENT_MAKE: 1
      hardeningDisable: pie
      NIX_SSL_CERT_FILE: /no-cert-file.crt
      setOutputFlags: 
      SHLVL: 1
      NIX_BUILD_CORES: 4
      installPhase: runHook preInstall

      ./Setup copy 
      local packageConfDir="$out/lib/ghc-8.10.4/package.conf.d"
      local packageConfFile="$packageConfDir/tmp-postgres-1.34.1.0.conf"
      mkdir -p "$packageConfDir"
      ./Setup register --gen-pkg-config=$packageConfFile
      if [ -d "$packageConfFile" ]; then
        mv "$packageConfFile/"* "$packageConfDir"
        rmdir "$packageConfFile"
      fi
      for packageConfFile in "$packageConfDir/"*; do
        local pkgId=$(gawk -f /nix/store/907d7wf2d113vlv8dlhi1i3d683gc1rs-unpretty-cabal-conf.awk "$packageConfFile" \
          | grep '^id:' | cut -d' ' -f2)
        mv "$packageConfFile" "$packageConfDir/$pkgId.conf"
      done

      # delete confdir if there are no libraries
      find $packageConfDir -maxdepth 0 -empty -delete;

      for x in $doc/share/doc/tmp-postgres-1.34.1.0"/html/src/"*.html; do
        remove-references-to -t $out $x
      done
      mkdir -p $doc

      runHook postInstall

      STRINGS_FOR_BUILD: strings
      SOURCE_DATE_EPOCH: 1577603671
      TEMP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      GHC_PACKAGE_PATH: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0/package.conf.d:
      STRINGS: strings
      preInstallPhases: haddockPhase
      NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_apple_darwin: 1
      STRIP_FOR_BUILD: strip
      depsHostHost: 
      buildPhase: runHook preBuild
      ./Setup build 
      runHook postBuild

      CXX_FOR_BUILD: clang++
      LD_FOR_BUILD: ld
      PATH: /nix/store/dpak996p2ipypnacr1bp7h29iid5j5ww-hscolour-1.24.4/bin:/nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4/bin:/nix/store/9qiazds7s6qqmkqhvqgrygz74x7bvqhm-clang-wrapper-7.1.0/bin:/nix/store/nv5arvc7346f69rcllaf29gmmi8qlpbl-clang-7.1.0/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/pi6sprl9lfrn9rkpzz9yn0lqqf7mlvik-cctools-binutils-darwin-wrapper-949.0.1/bin:/nix/store/k0p31jydp2bp2s71712jw4c81ls39i5d-cctools-binutils-darwin-949.0.1/bin:/nix/store/28whra1mmwag2lsivpndg1svf9f0d0xa-ncurses-6.2/bin:/nix/store/3833z5d0n3b57fhyiswa9zqjfig0v1mn-libiconv-50/bin:/nix/store/f47i7ll07svg2s7qy3rg5nimy69r18lq-remove-references-to/bin:/nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11/bin:/nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008/bin:/nix/store/157cg5bk6ym66n73idmp7z1md70kyy4q-hspec-discover-2.7.10/bin:/nix/store/baw91z6fwk4aw45yzakmz0ziirqh6x1q-coreutils-8.32/bin:/nix/store/d8wv1fg7z343imib46ydrddmqhg9r5vs-findutils-4.7.0/bin:/nix/store/bkypkqmbfjd3lw42iq7wl58lbsddlj7w-diffutils-3.7/bin:/nix/store/skhmqfq03a9f2wm2033kwclvm61sa3lw-gnused-4.8/bin:/nix/store/9wc9j08alhw117k6m8g41pqqfg1h4c9y-gnugrep-3.6/bin:/nix/store/ns5wrchrq5v4rmkqkiqwpa1vsnzg0m0d-gawk-5.1.0/bin:/nix/store/6db6a4pw86h8m879qylb097vyhsc84y8-gnutar-1.34/bin:/nix/store/rys3pmdsrblc6f0252jymdkrbk101hx3-gzip-1.10/bin:/nix/store/jdisgiccdaspnhi44zvzlh0hw39z8i05-bzip2-1.0.6.0.2-bin/bin:/nix/store/4bh4813x6wv5ay2nrbln1kr4w65vgrjd-gnumake-4.3/bin:/nix/store/xxfxh4npdlp0w5winp2f17ji1yxdivn3-bash-4.4-p23/bin:/nix/store/v7yspxwjbg96mngjri9ghdbli6cs3i71-patch-2.7.6/bin:/nix/store/2jdg87kz171rm06xlahlzfsz9w7bvn15-xz-5.2.5-bin/bin
      NIX_BUILD_TOP: /private/tmp/nix-build-tmp-postgres-1.34.1.0.drv-0
      depsBuildTargetPropagated: 
      NIX_ENFORCE_PURITY: 1
      SIZE: size
      nativeBuildInputs: /nix/store/vj40c9rid2fnby78yxd5gj9mm2g2v389-ghc-8.10.4 /nix/store/f47i7ll07svg2s7qy3rg5nimy69r18lq-remove-references-to /nix/store/31idpq9hdd2hra0qpmx3avsfs8c5lki2-postgresql-11.11 /nix/store/y8s4iykdgbrad39agv19ncybripi3ibl-procps-1003.1-2008
      doc: /nix/store/7061g8wpbjm1r3r9y83wwlmh8m18l46b-tmp-postgres-1.34.1.0-doc
      LD: ld
      AR_FOR_BUILD: ar
      patches: 
      depsTargetTargetPropagated: 
      _: ./Setup
    completeProcessConfigCmdLine:
    -D/tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-data-6fa4997f6ca94ed7 -p53379
    completeProcessConfigStdIn: HANDLE
 sh: locale: command not found
2021-06-22 11:47:02.327 UTC [99635] WARNING:  no usable system locales were found

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
cp: invalid option -- 'c'
Try 'cp --help' for more information.
2021-06-22 11:47:08 GMT [99650]: LOG:  listening on IPv4 address "127.0.0.1", port 53380
2021-06-22 11:47:08 GMT [99650]: LOG:  listening on IPv6 address "::1", port 53380
2021-06-22 11:47:08 GMT [99650]: LOG:  listening on Unix socket "/tmp/tmp-postgres-socket-8f938b570d0dcb65/.s.PGSQL.53380"
2021-06-22 11:47:08 GMT [99651]: LOG:  database system was shut down at 2021-06-22 11:47:06 GMT
2021-06-22 11:47:08 GMT [99652]: FATAL:  the database system is starting up
2021-06-22 11:47:08 GMT [99650]: LOG:  database system is ready to accept connections
2021-06-22 11:47:08 GMT [99659]: LOG:  duration: 0.406 ms  statement: SET datestyle TO ISO;SET client_encoding TO UTF8;SET standard_conforming_strings TO on
2021-06-22 11:47:08 GMT [99660]: LOG:  duration: 0.220 ms  statement: SET datestyle TO ISO;SET client_encoding TO UTF8;SET standard_conforming_strings TO on
2021-06-22 11:47:08 GMT [99660]: LOG:  duration: 0.018 ms  plan:
        Query Text: SELECT 1
        Result  (cost=0.00..0.01 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)
          Output: 1
2021-06-22 11:47:08 GMT [99660]: LOG:  duration: 0.468 ms  statement: SELECT 1
2021-06-22 11:47:08 GMT [99661]: LOG:  duration: 0.398 ms  statement: SET datestyle TO ISO;SET client_encoding TO UTF8;SET standard_conforming_strings TO on
2021-06-22 11:47:08 GMT [99661]: LOG:  duration: 0.034 ms  plan:
        Query Text: SELECT COUNT(*) FROM pg_catalog.pg_database
        Aggregate  (cost=1.02..1.03 rows=1 width=8) (actual time=0.021..0.022 rows=1 loops=1)
          Output: count(*)
          Buffers: shared hit=1
          ->  Seq Scan on pg_catalog.pg_database  (cost=0.00..1.02 rows=2 width=0) (actual time=0.009..0.013 rows=3 loops=1)
                Output: datname, datdba, encoding, datcollate, datctype, datistemplate, datallowconn, datconnlimit, datlastsysoid, datfrozenxid, datminmxid, dattablespace, datacl
                Buffers: shared hit=1
2021-06-22 11:47:08 GMT [99661]: LOG:  duration: 1.901 ms  statement: SELECT COUNT(*) FROM pg_catalog.pg_database
2021-06-22 11:47:08 GMT [99650]: LOG:  received immediate shutdown request
2021-06-22 11:47:08 GMT [99661]: WARNING:  terminating connection because of crash of another server process
2021-06-22 11:47:08 GMT [99661]: DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-06-22 11:47:08 GMT [99661]: HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2021-06-22 11:47:08 GMT [99656]: WARNING:  terminating connection because of crash of another server process
2021-06-22 11:47:08 GMT [99656]: DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-06-22 11:47:08 GMT [99656]: HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2021-06-22 11:47:08 GMT [99650]: LOG:  database system is shut down
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/PG_VERSION' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/PG_VERSION' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/base' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/base' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/global' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/global' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_commit_ts' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_commit_ts' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_dynshmem' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_dynshmem' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_hba.conf' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_hba.conf' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_ident.conf' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_ident.conf' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_logical' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_logical' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_multixact' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_multixact' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_notify' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_notify' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_replslot' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_replslot' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_serial' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_serial' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_snapshots' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_snapshots' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_stat' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_stat' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_stat_tmp' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_stat_tmp' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_subtrans' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_subtrans' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_tblspc' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_tblspc' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_twophase' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_twophase' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_wal' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_wal' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_xact' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/pg_xact' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postgresql.auto.conf' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postgresql.auto.conf' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postgresql.conf' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postgresql.conf' are the same file
cp: '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postmaster.opts' and '/tmp/tmp-postgres-cache-action-9ca9844bca0e8411/cached/postmaster.opts' are the same file
   completeProcessConfigStdOut: HANDLE
    completeProcessConfigStdErr: HANDLE
  completePostgresPlanClientOptions: host=/tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-socket-bdf44945aca4f6f8 dbname=postgres port=53379
completePlanConfig:
  archive_mode=off
  client_min_messages=WARNING
  commit_delay=100000
  fsync=off
  full_page_writes=off
  lc_messages='C'
  listen_addresses='127.0.0.1,::1'
  log_autovacuum_min_duration=0
  log_checkpoints=on
  log_connections=on
  log_disconnections=on
  log_error_verbosity=default
  log_line_prefix='%t [%p]: '
  log_lock_waits=on
  log_min_duration_statement=0
  log_min_error_statement=WARNING
  log_min_messages=WARNING
  log_statement=none
  log_temp_files=0
  max_wal_senders=0
  shared_buffers=12MB
  synchronous_commit=off
  track_io_timing=on
  unix_socket_directories='/tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-socket-bdf44945aca4f6f8'
  wal_level=minimal

completePlanDataDirectory: /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-data-6fa4997f6ca94ed7
The files belonging to this database system will be owned by user "lukasepple".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok

Sync to disk skipped.
The data directory might become corrupt if the operating system crashes.

Success. You can now start the database server using:

    pg_ctl -D '/tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data' -l logfile start

    withDbCacheConfig actually caches the config and cleans up FAILED [11]
    withDbCache seems to work
  fails when
    timesout if the connection parameters are wrong
    does not timeout quickly with an invalid connection and large timeout
    throws StartPostgresFailed if the host does not exist
    throws StartPostgresFailed if the host does not resolve to ip that is local
    throws StartPostgresFailed if the host path does not exist
    No initdb plan causes failure
    initdb with non-empty data directory fails with InitDbFailed
    invalid initdb options cause an error
    invalid createdb plan causes an error
    throws if initdb is not on the path
    throws if createdb is not on the path
withSnapshot
  works FAILED [12]
cacheAction
  creates the cache if it does not exist FAILED [13]
  doesnt create the cache if it exists FAILED [14]
  fails if the cache director and data directory are the same
  works if two threads try to create a cache at the same time
  nested calls don't deadlock FAILED [15]
  doesnt deadlock if the parent directory is missing FAILED [16]
  doesnt deadlock if the parent directory is missing multithreaded version FAILED [17]
stopPostgres cannot be connected to
prettyPrintConfig seems to work
prettyPrintDB seems to work
can support backup and restore

Failures:

  test/Main.hs:258:3: 
  1) withConfig, succeeds with, mempty and extra postgresql.conf
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/mempty and extra postgresql.conf/"

  test/Main.hs:263:3: 
  2) withConfig, succeeds with, optionsToDefaultConfig mempty is the same as mempty Config
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/optionsToDefaultConfig mempty is the same as mempty Config/"

  test/Main.hs:268:3: 
  3) withConfig, succeeds with, postgres db name does not cause createdb failure
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/postgres db name does not cause createdb failure/"

  test/Main.hs:276:3: 
  4) withConfig, succeeds with, template1 db name does not cause createdb failure
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/template1 db name does not cause createdb failure/"

  test/Main.hs:284:3: 
  5) withConfig, succeeds with, specific socket works with optionsToDefaultConfig
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/specific socket works with optionsToDefaultConfig/"

  test/Main.hs:290:3: 
  6) withConfig, succeeds with, filled out optionsToDefaultConfig
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/filled out optionsToDefaultConfig/"

  test/Main.hs:296:3: 
  7) withConfig, succeeds with, default ip option works
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/default ip option works/"

  test/Main.hs:301:3: 
  8) withConfig, succeeds with, specific unix socket works
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/specific unix socket works/"

  test/Main.hs:307:3: 
  9) withConfig, succeeds with, works with the default temporary directory to some degree at least
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/works with the default temporary directory to some degree at least/"

  test/Main.hs:311:3: 
  10) withConfig, succeeds with, works if on non-empty if initdb is disabled
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withConfig/succeeds with/works if on non-empty if initdb is disabled/"

  test/Main.hs:332:3: 
  11) withConfig, succeeds with, withDbCacheConfig actually caches the config and cleans up
       uncaught exception: StartError
       CopyCachedInitDbFailed "cp -Rc /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-cache-380ffd719144095b/11.118Q1aGgGB/e0X1L8Ku8tly57W9yaGIC6fSBIs=/data/* /tmp/tmp-postgres-cache-test-b1187ff0ac3569b3/tmp-postgres-data-6fa4997f6ca94ed7" (ExitFailure 1)

  To rerun use: --match "/withConfig/succeeds with/withDbCacheConfig actually caches the config and cleans up/"

  test/Main.hs:553:3: 
  12) withSnapshot works
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/withSnapshot/works/"

  test/Main.hs:574:3: 
  13) cacheAction creates the cache if it does not exist
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/cacheAction/creates the cache if it does not exist/"

  test/Main.hs:601:3: 
  14) cacheAction doesnt create the cache if it exists
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/cacheAction/doesnt create the cache if it exists/"

  test/Main.hs:651:3: 
  15) cacheAction nested calls don't deadlock
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/cacheAction/nested calls don't deadlock/"

  test/Main.hs:665:3: 
  16) cacheAction doesnt deadlock if the parent directory is missing
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/cacheAction/doesnt deadlock if the parent directory is missing/"

  test/Main.hs:672:3: 
  17) cacheAction doesnt deadlock if the parent directory is missing multithreaded version
       uncaught exception: IOException of type NoSuchThing
       pgrep: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

  To rerun use: --match "/cacheAction/doesnt deadlock if the parent directory is missing multithreaded version/"

Randomized with seed 972093972

Finished in 76.8909 seconds
36 examples, 17 failures
Test suite test: FAIL
Test suite logged to: dist/test/tmp-postgres-1.34.1.0-test.log
0 of 1 test suites (0 of 1 test cases) passed.
sternenseemann commented 3 years ago

Hm, seems like a lot of this is due to missing certain tools, maybe I'll be able to fix this on my own. The problem is most likely that for reproducibilty we try to provide our own environment, but due to licensing issues we have a mixed GNU-darwin-netbsd environment.

sternenseemann commented 3 years ago

Closing this for now, packaging Apple's pgrep is not easy because it depends on proprietary headers…