Skip to content

Bad header file: Cannot find a definition for grpc_server_add_insecure_http2_port and grpc_insecure_channel_create in the header file. #156

@FabianVegaA

Description

@FabianVegaA

I have tried to install grpc-haskell using NixOS, with the next command:

nix-shell \
  -p cabal-install \
  -p haskell.compiler.ghc90 \
  -p zlib \
  -p grpc \
  --run "cabal install --minimize-conflict-set"

but I get

...
Failed to build grpc-haskell-core-0.1.0.
Build log (
/home/fabian/.cache/cabal/logs/ghc-9.0.2/grpc-haskell-core-0.1.0-0dac2d8993a1e282a5e9409b216420f37cedc942cda2c0e88d7d24087f3963a1.log
):
Configuring library for grpc-haskell-core-0.1.0..
Preprocessing library for grpc-haskell-core-0.1.0..
c2hs: Errors during expansion of binding hooks:

src/Network/GRPC/Unsafe.chs:262: (column 7) [ERROR]  >>> Unknown identifier!
  Cannot find a definition for `grpc_server_add_insecure_http2_port' in the header file.
src/Network/GRPC/Unsafe.chs:198: (column 7) [ERROR]  >>> Unknown identifier!
  Cannot find a definition for `grpc_insecure_channel_create' in the header file.

Error: cabal: Failed to build grpc-haskell-core-0.1.0 (which is required by
exe:myProject from myProject-0.0.0.0). See the build log above for
details.

With this cabal file

cabal-version:      3.0
name:               myProject
version:            0.0.0.0
license:            BSD-3-Clause
license-file:       LICENSE
author:             Fabián
maintainer:         na
category:           Codec
build-type:         Simple
extra-doc-files:    CHANGELOG.md

common warnings
    ghc-options: -Wall

executable interpreter
    import:           warnings
    main-is:          Main.hs
    other-modules:    Schema
    default-language: Haskell2010
    hs-source-dirs:   app
    build-depends:
        base
      , proto3-wire
      , grpc-haskell ^>=0.1.0

I'm using NixOS 23.05 in x86_64

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