static-haskell-nix icon indicating copy to clipboard operation
static-haskell-nix copied to clipboard

Postgresql tests fail

Open pranaysashank opened this issue 4 years ago • 1 comments
trafficstars

When I try to build postgresql (version 13), two tests collate.icu.utf8 and foreigndata fail.

I noticed that the alpine repos have a patch to disable the collate.icu.utf8 which is perhaps relevant.

pranaysashank avatar Aug 24 '21 19:08 pranaysashank

I applied the patch mentioned above and it makes postgres build. For packages that depend on postgres it looks like I also need to pass the following configure flags in addition to libpq.

--ld-option=-lpgcommon --ld-option=-lpgport

So for example to get a statically build executable for tmp-postgres, I'd need to change the definition in survey to

 tmp-postgres =
                appendConfigureFlag (addStaticLinkerFlagsWithPkgconfig
                  super.tmp-postgres
                  [ final.openssl final.postgresql ]
                  "--libs openssl libpq")
                  ["--ld-option=-lpgcommon --ld-option=-lpgport"];

Can anyone else reproduce this and is there a way to avoid adding them manually.

  • nixpkgs commit: 14b0f20fa1f56438b74100513c9b1f7c072cf789 with patches to disable LTO for python3 and the above mentioned patch for postgresql.
  • static-haskell-nix: from master
  • compiler : ghc-8.10.4

pranaysashank avatar Aug 27 '21 07:08 pranaysashank