Skip to content

Unable to use c2hs in project #6852

@poscat0x04

Description

@poscat0x04

Describe the bug
Whenever I try to build project with c2hs in build-tools the build process got cutoff for some reason

Resolving dependencies...
Build profile: -w ghc-8.8.3 -O2
In order, the following will be built (use -v for more details):
 - c2hs-0.28.6 (exe:c2hs) (requires build)
 - tdlib-0.1.0 (lib:tdlib, test:tdlib-test) (configuration changed)
Starting     c2hs-0.28.6 (exe:c2hs)
Building     c2hs-0.28.6 (exe:c2hs)
Haddock      c2hs-0.28.6 (exe:c2hs)
Warning: Failed to build documentation for exe:c2hs from c2hs-0.28.6 (which is
required by tdlib-0.1.0).
<End>

cabal exited without failures but the project never gets built. Also cabal seems to be compiling c2hs over and over again instead of using the cached c2hs.

To Reproduce

  • add c2hs to build-tools
  • cabal-build
$ cabal v2-build ...

Please use version-prefixed commands (e.g. v2-build or v1-build) to avoid ambiguity.

Expected behavior
The project

System information

  • Operating system: nixos
  • cabal, ghc versions
    cabal 3.2.0.0
    ghc 8.8.3

Additional context

the cabal file

cabal-version: 1.24

-- This file has been generated from package.yaml by hpack version 0.33.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: 26c54ea1e72cfdc61a6daaf86b5a1c793157e1f003db426405ef86c0b0c4a196

name:           tdlib
version:        0.1.0
description:    Please see the README on GitHub at <https://github.com/poscat0x04/tdlib#readme>
homepage:       https://github.com/poscat0x04/tdlib#readme
bug-reports:    https://github.com/poscat0x04/tdlib/issues
author:         Poscat
maintainer:     [email protected]
copyright:      (c) 2020 Poscat
license:        BSD3
license-file:   LICENSE
build-type:     Custom
extra-source-files:
    README.md
    CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/poscat0x04/tdlib

custom-setup
  setup-depends:
      Cabal
    , base
    , chs-cabal

library
  exposed-modules:
      Tdlib.A
      Tdlib.Tdjson
  other-modules:
      Paths_tdlib
  hs-source-dirs:
      src
  default-extensions: OverloadedStrings FlexibleInstances FlexibleContexts FunctionalDependencies InstanceSigs ConstraintKinds DeriveGeneric DeriveFunctor DeriveFoldable DeriveTraversable TypeOperators TypeApplications TypeFamilies KindSignatures PartialTypeSignatures DataKinds StarIsType ScopedTypeVariables ExplicitForAll ViewPatterns BangPatterns LambdaCase TupleSections EmptyCase MultiWayIf UnicodeSyntax PatternSynonyms RecordWildCards
  extra-libraries:
      tdjson
  build-tools:
      c2hs
  build-depends:
      base >=4.10 && <5
  default-language: Haskell2010

test-suite tdlib-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Paths_tdlib
  hs-source-dirs:
      test
  default-extensions: OverloadedStrings FlexibleInstances FlexibleContexts FunctionalDependencies InstanceSigs ConstraintKinds DeriveGeneric DeriveFunctor DeriveFoldable DeriveTraversable TypeOperators TypeApplications TypeFamilies KindSignatures PartialTypeSignatures DataKinds StarIsType ScopedTypeVariables ExplicitForAll ViewPatterns BangPatterns LambdaCase TupleSections EmptyCase MultiWayIf UnicodeSyntax PatternSynonyms RecordWildCards
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  extra-libraries:
      tdjson
  build-tools:
      c2hs
  build-depends:
      base >=4.10 && <5
    , tdlib
  default-language: Haskell2010

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions