Skip to content

Unable to build hackage package derive-storable-plugin #879

Closed
@hhefesto

Description

@hhefesto

Firstly, hello and thank you for your time on this. I really like haskell.nix: it has make a lot of things simpler. <3

To the business in hand:
Currently unable to build derive-storable-plugin

Compile error:

src/Foreign/Storable/Generic/Plugin/Internal/Compile.hs:110:45: error:
    • Couldn't match type ‘ghci-8.8.4:GHCi.RemoteTypes.ForeignRef
                             ghci-8.8.4:GHCi.RemoteTypes.HValue’
                     with ‘ForeignRef a0’
      NB: ‘ForeignRef’
            is defined in ‘GHCi.RemoteTypes’ in package ‘ghci-8.8.4’
          ‘ghci-8.8.4:GHCi.RemoteTypes.ForeignRef’
            is defined in ‘GHCi.RemoteTypes’ in package ‘ghci-8.8.4’
      Expected type: ForeignRef a0
        Actual type: ghci-8.8.4:GHCi.RemoteTypes.ForeignHValue
    • In the first argument of ‘withForeignRef’, namely ‘foreign_hval’
      In the second argument of ‘($)’, namely
        ‘withForeignRef foreign_hval localRef’
      In a stmt of a 'do' block:
        hval <- liftIO $ withForeignRef foreign_hval localRef
    |
110 |     hval         <- liftIO $ withForeignRef foreign_hval localRef
    |                                             ^^^^^^^^^^^^

builder for '/nix/store/m65kr0fwh12ap1wb0dmmvfa35x0azhi4-derive-storable-plugin-lib-derive-storable-plugin-0.2.3.0.drv' failed with exit code 1

Warning worth noting:

Warning:
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package ghc (ghc-8.8.4) requires ghci-8.8.4
      package derive-storable-plugin (derive-storable-plugin-0.2.3.0) requires ghci-8.8.4-Auiqaz0h7Fj7dVgubAzoqP

Got the same error trying to build another project with a local reference to this package in project.cabal

Successful ways of building this package:

On channel nixos-20.09:

git clone https://github.com/mkloczko/derive-storable-plugin.git
cd derive-storable-plugin
nix-shell -p haskell.compiler.ghc884 haskellPackages.Cabal_3_2_0_0 cabal-install --pure
cabal new-build

Was also able to build using a standard nix-shell provided by haskell.nix with cabal new-build

Was also able to build with nix-build using pkgs.haskellPackages.callPackage on the output of cabal2nix cabal://derive-storable-plugin-0.2.3.0 on channel nixos-20.03

Also tried with ghc865 and cabal 3.0.0.0 and with derive-storable-plugin-0.2.2.0 (channel nixos-20.03)

If I'm interpreting this right, hackage also marks it as healthy: https://matrix.hackage.haskell.org/#/package/derive-storable-plugin

Thanks!

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