Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix build fails around autogen modules and unportable paths #130

Closed
avanov opened this issue Mar 9, 2023 · 6 comments · Fixed by #131
Closed

Nix build fails around autogen modules and unportable paths #130

avanov opened this issue Mar 9, 2023 · 6 comments · Fixed by #131

Comments

@avanov
Copy link

avanov commented Mar 9, 2023

$ nix log /nix/store/9zvyslhrzxf895z8njxs2gjaircsci7g-codd-0.1.1.drv
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/6ljrfqa8gf8d6ifdhmj2k8zm4810zfrj-codd-0.1.1-src
source root is codd-0.1.1-src
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-codd-0.1.1.drv-0/tmp.aiKzA4NXZe/setup-package.conf.d -j8 -threaded -rtsopts
[1 of 2] Compiling Main             ( Setup.hs, /private/tmp/nix-build-codd-0.1.1.drv-0/tmp.aiKzA4NXZe/Main.o )
[2 of 2] Linking Setup
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configureFlags: --verbose --prefix=/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --with-gcc=clang --package-db=/priva>
Using Parsec parser
Configuring codd-0.1.1...
Dependency aeson: using aeson-2.1.1.0
Dependency attoparsec: using attoparsec-0.14.4
Dependency base: using base-4.17.0.0
Dependency bytestring: using bytestring-0.11.3.1
Dependency containers: using containers-0.6.6
Dependency filepath: using filepath-1.4.2.2
Dependency hashable: using hashable-1.4.1.0
Dependency haxl: using haxl-2.4.0.0
Dependency monad-logger: using monad-logger-0.3.37
Dependency mtl: using mtl-2.2.2
Dependency network-uri: using network-uri-2.6.4.1
Dependency postgresql-libpq: using postgresql-libpq-0.9.4.3
Dependency postgresql-simple: using postgresql-simple-0.6.4
Dependency resourcet: using resourcet-1.2.6
Dependency streaming: using streaming-0.2.3.1
Dependency text: using text-2.0.1
Dependency time: using time-1.12.2
Dependency transformers: using transformers-0.5.6.2
Dependency unliftio: using unliftio-0.2.23.0
Dependency unliftio-core: using unliftio-core-0.2.0.1
Dependency unordered-containers: using unordered-containers-0.2.19.1
Dependency vector: using vector-0.12.3.1
Dependency base: using base-4.17.0.0
Dependency codd: using codd-0.1.1
Dependency monad-logger: using monad-logger-0.3.37
Dependency optparse-applicative: using optparse-applicative-0.17.0.0
Dependency postgresql-simple: using postgresql-simple-0.6.4
Dependency text: using text-2.0.1
Dependency time: using time-1.12.2
Source component graph:
    component lib
    component exe:codd dependency lib
Configured component graph:
    component codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        include aeson-2.1.1.0-1secJlu6A7zJoKre11Gfro
        include attoparsec-0.14.4-KsrA4coSKLcCjXhaOEmBWz
        include base-4.17.0.0
        include bytestring-0.11.3.1
        include containers-0.6.6
        include filepath-1.4.2.2
        include hashable-1.4.1.0-Eou5dPIckWPA0pQsoBBLCk
        include haxl-2.4.0.0-Bz0yf6NQmkbqcXM8dkbt1
        include monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        include mtl-2.2.2
        include network-uri-2.6.4.1-1Oed2g4X2jEAT61rXfOED
        include postgresql-libpq-0.9.4.3-LFqPaXTMS1NIdaqCVGEVvE
        include postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        include resourcet-1.2.6-1doXwSrmDMYJqADjXzqYVa
        include streaming-0.2.3.1-9lQ8M0DRvovGrvDW8IyDa5
        include text-2.0.1
        include time-1.12.2
        include transformers-0.5.6.2
        include unliftio-0.2.23.0-L5liJhdzGgdCCikuAKk30H
        include unliftio-core-0.2.0.1-Kd7IyaAwS5V4BppR0qwIai
        include unordered-containers-0.2.19.1-EqJag4pS1bACdwuWg6f2gp
        include vector-0.12.3.1-9lFlhfyfhD49ptojK2c1M7
    component codd-0.1.1-4eGloP6YkdhKsUGud5Dvng-codd
        include base-4.17.0.0
        include codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        include monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        include optparse-applicative-0.17.0.0-ALoG2VmvrbWCkdPlSJMrBF
        include postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        include text-2.0.1
        include time-1.12.2
Linked component graph:
    unit codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        include aeson-2.1.1.0-1secJlu6A7zJoKre11Gfro
        include attoparsec-0.14.4-KsrA4coSKLcCjXhaOEmBWz
        include base-4.17.0.0
        include bytestring-0.11.3.1
        include containers-0.6.6
        include filepath-1.4.2.2
        include hashable-1.4.1.0-Eou5dPIckWPA0pQsoBBLCk
        include haxl-2.4.0.0-Bz0yf6NQmkbqcXM8dkbt1
        include monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        include mtl-2.2.2
        include network-uri-2.6.4.1-1Oed2g4X2jEAT61rXfOED
        include postgresql-libpq-0.9.4.3-LFqPaXTMS1NIdaqCVGEVvE
        include postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        include resourcet-1.2.6-1doXwSrmDMYJqADjXzqYVa
        include streaming-0.2.3.1-9lQ8M0DRvovGrvDW8IyDa5
        include text-2.0.1
        include time-1.12.2
        include transformers-0.5.6.2
        include unliftio-0.2.23.0-L5liJhdzGgdCCikuAKk30H
        include unliftio-core-0.2.0.1-Kd7IyaAwS5V4BppR0qwIai
        include unordered-containers-0.2.19.1-EqJag4pS1bACdwuWg6f2gp
        include vector-0.12.3.1-9lFlhfyfhD49ptojK2c1M7
        Codd=codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK:Codd,Codd.Analysis=codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK:Codd.Analysis,Codd.AppCommands=codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK:Codd.AppCommands,C>
    unit codd-0.1.1-4eGloP6YkdhKsUGud5Dvng-codd
        include base-4.17.0.0
        include codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        include monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        include optparse-applicative-0.17.0.0-ALoG2VmvrbWCkdPlSJMrBF
        include postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        include text-2.0.1
        include time-1.12.2
Ready component graph:
    definite codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        depends aeson-2.1.1.0-1secJlu6A7zJoKre11Gfro
        depends attoparsec-0.14.4-KsrA4coSKLcCjXhaOEmBWz
        depends base-4.17.0.0
        depends bytestring-0.11.3.1
        depends containers-0.6.6
        depends filepath-1.4.2.2
        depends hashable-1.4.1.0-Eou5dPIckWPA0pQsoBBLCk
        depends haxl-2.4.0.0-Bz0yf6NQmkbqcXM8dkbt1
        depends monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        depends mtl-2.2.2
        depends network-uri-2.6.4.1-1Oed2g4X2jEAT61rXfOED
        depends postgresql-libpq-0.9.4.3-LFqPaXTMS1NIdaqCVGEVvE
        depends postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        depends resourcet-1.2.6-1doXwSrmDMYJqADjXzqYVa
        depends streaming-0.2.3.1-9lQ8M0DRvovGrvDW8IyDa5
        depends text-2.0.1
        depends time-1.12.2
        depends transformers-0.5.6.2
        depends unliftio-0.2.23.0-L5liJhdzGgdCCikuAKk30H
        depends unliftio-core-0.2.0.1-Kd7IyaAwS5V4BppR0qwIai
        depends unordered-containers-0.2.19.1-EqJag4pS1bACdwuWg6f2gp
        depends vector-0.12.3.1-9lFlhfyfhD49ptojK2c1M7
    definite codd-0.1.1-4eGloP6YkdhKsUGud5Dvng-codd
        depends base-4.17.0.0
        depends codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
        depends monad-logger-0.3.37-8f6UWJggXmVHuX30KaYwv4
        depends optparse-applicative-0.17.0.0-ALoG2VmvrbWCkdPlSJMrBF
        depends postgresql-simple-0.6.4-IptYoKDChob9RNIAMHeG0K
        depends text-2.0.1
        depends time-1.12.2
Using Cabal-3.8.1.0 compiled by ghc-9.4
Using compiler: ghc-9.4.4
Using install prefix: /nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1
Executables installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/bin
Libraries installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/lib/ghc-9.4.4/aarch64-osx-ghc-9.4.4/codd-0.1.1-J7jEWMBIEXZ35gdQDTylvK
Dynamic Libraries installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/lib/ghc-9.4.4/aarch64-osx-ghc-9.4.4
Private executables installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/libexec/aarch64-osx-ghc-9.4.4/codd-0.1.1
Data files installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/share/aarch64-osx-ghc-9.4.4/codd-0.1.1
Documentation installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/share/doc/aarch64-osx-ghc-9.4.4/codd-0.1.1
Configuration files installed in:
/nix/store/szz5x2lkdl6q7wdpwmlyy1sjwzq1flb1-codd-0.1.1/etc
No alex found
Using ar found on system at:
/nix/store/dkmq62ibx58cmci1nq1rbwsc0y067r85-cctools-binutils-darwin-973.0.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 11.1.0 given by user at:
/nix/store/fb4rdxr69sy1vsi98z3njxjzdq3rj3ah-clang-wrapper-11.1.0/bin/clang
Using ghc version 9.4.4 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/ghc
Using ghc-pkg version 9.4.4 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/ghc-pkg-9.4.4
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.27.0 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/haddock-ghc-9.4.4
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/hpc
Using hsc2hs version 0.68.8 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/hsc2hs
No hscolour found
No jhc found
Using ld found on system at:
/nix/store/kvqy6garv73hnn6iiaparwicvskacflp-cctools-binutils-darwin-wrapper-973.0.1/bin/ld
No pkg-config found
Using runghc version 9.4.4 found on system at:
/nix/store/rlfrdlgbf8favrxnzwp5j2s34w64b0xw-ghc-native-bignum-9.4.4/bin/runghc-9.4.4
Using strip found on system at:
/nix/store/fb4rdxr69sy1vsi98z3njxjzdq3rj3ah-clang-wrapper-11.1.0/bin/strip
Using tar found on system at:
/nix/store/qzg00x5x31hh6khy493m8iyn5ikirg3r-gnutar-1.34/bin/tar
No uhc found
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Preprocessing library for codd-0.1.1..
Building library for codd-0.1.1..
[ 1 of 28] Compiling Codd.Logging     ( src/Codd/Logging.hs, dist/build/Codd/Logging.o, dist/build/Codd/Logging.dyn_o )
[ 2 of 28] Compiling Codd.Parsing     ( src/Codd/Parsing.hs, dist/build/Codd/Parsing.o, dist/build/Codd/Parsing.dyn_o )
[ 3 of 28] Compiling Codd.Analysis    ( src/Codd/Analysis.hs, dist/build/Codd/Analysis.o, dist/build/Codd/Analysis.dyn_o )
[ 4 of 28] Compiling Codd.Prelude     ( src/Codd/Prelude.hs, dist/build/Codd/Prelude.o, dist/build/Codd/Prelude.dyn_o )
[ 5 of 28] Compiling Codd.Query       ( src/Codd/Query.hs, dist/build/Codd/Query.o, dist/build/Codd/Query.dyn_o )
[ 6 of 28] Compiling Codd.Representations.Database.Model ( src/Codd/Representations/Database/Model.hs, dist/build/Codd/Representations/Database/Model.o, dist/build/Codd/Representation>
[ 7 of 28] Compiling Codd.Representations.Database.SqlGen ( src/Codd/Representations/Database/SqlGen.hs, dist/build/Codd/Representations/Database/SqlGen.o, dist/build/Codd/Representat>
[ 8 of 28] Compiling Codd.Representations.Types ( src/Codd/Representations/Types.hs, dist/build/Codd/Representations/Types.o, dist/build/Codd/Representations/Types.dyn_o )
[ 9 of 28] Compiling Codd.Representations.Disk ( src/Codd/Representations/Disk.hs, dist/build/Codd/Representations/Disk.o, dist/build/Codd/Representations/Disk.dyn_o )
[10 of 28] Compiling Codd.Types       ( src/Codd/Types.hs, dist/build/Codd/Types.o, dist/build/Codd/Types.dyn_o )
[11 of 28] Compiling Codd.Representations.Database.Pg10 ( src/Codd/Representations/Database/Pg10.hs, dist/build/Codd/Representations/Database/Pg10.o, dist/build/Codd/Representations/D>
[12 of 28] Compiling Codd.Representations.Database.Pg11 ( src/Codd/Representations/Database/Pg11.hs, dist/build/Codd/Representations/Database/Pg11.o, dist/build/Codd/Representations/D>
[13 of 28] Compiling Codd.Representations.Database.Pg12 ( src/Codd/Representations/Database/Pg12.hs, dist/build/Codd/Representations/Database/Pg12.o, dist/build/Codd/Representations/D>
[14 of 28] Compiling Codd.Representations.Database.Pg13 ( src/Codd/Representations/Database/Pg13.hs, dist/build/Codd/Representations/Database/Pg13.o, dist/build/Codd/Representations/D>
[15 of 28] Compiling Codd.Representations.Database.Pg14 ( src/Codd/Representations/Database/Pg14.hs, dist/build/Codd/Representations/Database/Pg14.o, dist/build/Codd/Representations/D>
[16 of 28] Compiling Codd.Representations.Database.Pg15 ( src/Codd/Representations/Database/Pg15.hs, dist/build/Codd/Representations/Database/Pg15.o, dist/build/Codd/Representations/D>
[17 of 28] Compiling Codd.Internal.Retry ( src/Codd/Internal/Retry.hs, dist/build/Codd/Internal/Retry.o, dist/build/Codd/Internal/Retry.dyn_o )
[18 of 28] Compiling Codd.Internal.MultiQueryStatement ( src/Codd/Internal/MultiQueryStatement.hs, dist/build/Codd/Internal/MultiQueryStatement.o, dist/build/Codd/Internal/MultiQueryS>
[19 of 28] Compiling Codd.Environment ( src/Codd/Environment.hs, dist/build/Codd/Environment.o, dist/build/Codd/Environment.dyn_o )
[20 of 28] Compiling Codd.Representations.Database ( src/Codd/Representations/Database.hs, dist/build/Codd/Representations/Database.o, dist/build/Codd/Representations/Database.dyn_o )
[21 of 28] Compiling Codd.Representations ( src/Codd/Representations.hs, dist/build/Codd/Representations.o, dist/build/Codd/Representations.dyn_o )
[22 of 28] Compiling Codd.Internal    ( src/Codd/Internal.hs, dist/build/Codd/Internal.o, dist/build/Codd/Internal.dyn_o )
[23 of 28] Compiling Codd.AppCommands.WriteSchema ( src/Codd/AppCommands/WriteSchema.hs, dist/build/Codd/AppCommands/WriteSchema.o, dist/build/Codd/AppCommands/WriteSchema.dyn_o )
[24 of 28] Compiling Codd.AppCommands.VerifySchema ( src/Codd/AppCommands/VerifySchema.hs, dist/build/Codd/AppCommands/VerifySchema.o, dist/build/Codd/AppCommands/VerifySchema.dyn_o )
[25 of 28] Compiling Codd             ( src/Codd.hs, dist/build/Codd.o, dist/build/Codd.dyn_o )
[26 of 28] Compiling Codd.AppCommands ( src/Codd/AppCommands.hs, dist/build/Codd/AppCommands.o, dist/build/Codd/AppCommands.dyn_o )
[27 of 28] Compiling Codd.AppCommands.AddMigration ( src/Codd/AppCommands/AddMigration.hs, dist/build/Codd/AppCommands/AddMigration.o, dist/build/Codd/AppCommands/AddMigration.dyn_o )
[28 of 28] Compiling Paths_codd       ( dist/build/autogen/Paths_codd.hs, dist/build/Paths_codd.o, dist/build/Paths_codd.dyn_o )
Preprocessing executable 'codd' for codd-0.1.1..
Building executable 'codd' for codd-0.1.1..

<built-in>:16:10: error:
     error: non-portable path to file '"dist/build/Codd/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
#include "dist/build/codd/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Codd/autogen/cabal_macros.h"
1 error generated.

dist/build/codd/autogen/Paths_codd.hs:1:1: error:
    `cc' failed in phase `C pre-processor'. (Exit code: 1)
  |
1 | {-# LANGUAGE CPP #-}
  | 

I'm using my own Nix API with callCabal2Nix that aren't part of IOHK setup for Haskell, but I think there shouldn't be difference as the package being built adheres to the layout of a Hackage artifact (contains cabal file, the sources and the setup entrypoint).

@avanov avanov changed the title Nix buiulds fail around autogen modules and unportable paths Nix build fails around autogen modules and unportable paths Mar 9, 2023
@mzabani
Copy link
Owner

mzabani commented Mar 10, 2023

Thanks for reporting this. Is there a reproducible .nix file that I can use to test this?

Also, I'm not sure if it helps, but we do provide a cabal2nix derivation in the repository. If you clone the repository you can build it with nix-build ./nix/install-codd-nixpkgs.nix -A codd.

@avanov
Copy link
Author

avanov commented Mar 11, 2023

@mzabani thanks for looking at it. I extracted the following snippet from my project that I'm able to reproduce the error with:

{   
    haskellCompiler ? "ghc944"
    # this affects static linking as well as licensing mode,
    # GMP assumes GPL license for the entire project if linked statically
,   withGMP         ? false
}:

let

common-src = builtins.fetchTarball {
    name = "common-2023-01-03";
    url = https://github.com/avanov/nix-common/archive/26fc569bfd9871906cbbb57f2151c19753894620.tar.gz;
    # Hash obtained using `nix-prefetch-url --unpack <url>`
    sha256 = "sha256:18n9k0qh1dhcp4p6vhlgwz4ps310k9yv5h6snnkjmwnn22wrpzmf";
};

pkgs   = (import common-src { projectOverlays = []; }).pkgs;
ghcEnv = import "${common-src}/ghc-env.nix" {
    pkgs                    = pkgs;
    haskellCompiler         = haskellCompiler;
    isHaskellWithGMP        = withGMP;
    haskellHackageOverrides = self: orig: rec {
        haxl = hsLib.markUnbroken (hsLib.doJailbreak orig.haxl);
        postgresql-simple = hsLib.doJailbreak orig.postgresql-simple;
    };
};

callCabal2Nix = ghcEnv.ghcPkgSetWithOverrides.callCabal2nix;
hsLib         = pkgs.haskell.lib;

coddRepo = builtins.fetchTarball {
    name = "codd-0.1.1-src";
    url = https://github.com/mzabani/codd/archive/3fa043ee28ddb0fa66718815673b09777dd2ff23.tar.gz;
    # Hash obtained using `nix-prefetch-url --unpack <url>`
    sha256 = "sha256:16ba4lckzn63bnzxvd75lv80hfrd7c6l2mk3ig5wq189r6imlybk";
};

codd =
    hsLib.justStaticExecutables
        (hsLib.dontHaddock
            (hsLib.dontCheck
                (callCabal2Nix "codd" coddRepo {
                })
            )
        );
in

{
    inherit codd;
}

I build it with nix-build ./repr.nix -A codd --no-out-link on ARM Mac with case-insensitive filesystem (default for Mac). I also opt for ghc-bignum numeric backend instead of GMP, but afaik this shouldn't cause the error above.

@avanov
Copy link
Author

avanov commented Mar 11, 2023

I really think it has to do with default case-insensitivity of Mac filesystem, because the error suggests this (note the include filepaths):

<built-in>:16:10: error:
     error: non-portable path to file '"dist/build/Codd/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
#include "dist/build/codd/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         "dist/build/Codd/autogen/cabal_macros.h"
1 error generated.

@mzabani
Copy link
Owner

mzabani commented Mar 11, 2023

I tried your Nix file and it builds correctly and outputs an executable for codd that works on my machine (x64-64 linux).
Googled this a bit and found it's a cabal thing, with a possible easy fix.

I pushed to #131 with it. Can you try building the branch in that PR?

@avanov
Copy link
Author

avanov commented Mar 11, 2023

@mzabani thanks for the fix, I can confirm it worked on my end:

$ codd --help
Usage: codd COMMAND

Available options:
  -h,--help                Show this help text

Available commands:
  up                       Applies all pending migrations and possibly compares
                           on-disk schema files to the database's schema
                           afterwards to check whether they match. The default
                           mode of operation when none are provided is
                           lax-checking.
  add                      Adds and applies a SQL migration (and all pending
                           migrations as well), then updates on-disk schema
                           files.
  write-schema             Writes files and folders to the expected schema's
                           folder that represent the DB's current schema
  verify-schema            Verifies that the Database's current schema matches
                           on-disk schema files.

Nice find re. the Cabal issue.

@mzabani
Copy link
Owner

mzabani commented Mar 11, 2023

Great to hear that! I've merged that PR into master. You also reminded me that I need to check if I'm using GMP or not when statically linking.. I'm not sure if IOHK's haskell.nix does the right thing by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants