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

Missing (or bad) header file: include/grpc_haskell.h #101

Open
TimWSpence opened this issue Feb 7, 2020 · 2 comments
Open

Missing (or bad) header file: include/grpc_haskell.h #101

TimWSpence opened this issue Feb 7, 2020 · 2 comments

Comments

@TimWSpence
Copy link

I'm getting the following:

[nix-shell:/mnt]# cabal build
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - grpc-haskell-core-0.0.0.0 (lib) (first run)
 - grpc-haskell-0.0.1.0 (lib) (first run)
Configuring library for grpc-haskell-core-0.0.0.0..
cabal: Missing dependencies on foreign libraries:
* Missing (or bad) header file: include/grpc_haskell.h
* Missing (or bad) C libraries: grpc, gpr

Context: I'm trying to build this on MacOS and hence (post the MacOS Catalina debacle) running in Docker for Mac. I've had to make the following change (as per #59) to disable tests as some of them try to create ipv6 localhost sockets and that doesn't seem to be supported on docker for Mac

diff --git a/release.nix b/release.nix
index 34fa7f0..199f255 100644
--- a/release.nix
+++ b/release.nix
@@ -204,10 +204,13 @@ let
               (haskellPackagesNew.callPackage ./nix/proto3-suite.nix {});
 
           grpc-haskell-core =
-            pkgs.haskell.lib.buildFromSdist (usesGRPC
-              (pkgs.haskell.lib.overrideCabal
-                (haskellPackagesNew.callPackage ./core { })
-                (_: { buildDepends = [ haskellPackagesNew.c2hs ]; })));
+            usesGRPC (pkgs.haskell.lib.dontCheck (haskellPackagesNew.callPackage ./core { }));
+
+          #grpc-haskell-core =
+          #  pkgs.haskell.lib.buildFromSdist (usesGRPC
+          #    (pkgs.haskell.lib.overrideCabal
+          #      (haskellPackagesNew.callPackage ./core { })
+          #      (_: { buildDepends = [ haskellPackagesNew.c2hs ]; })));
 
           grpc-haskell-no-tests =
             pkgs.haskell.lib.buildFromSdist (usesGRPC

Following that, the steps to reproduce are the following (from the root dir of a clone of this repo):

docker run --rm -ti -v $PWD:/mnt nixos/nix:2.3 sh
cd /mnt
nix-env -i curl cabal-install #cabal seems to be broken otherwise as it will try to use busybox wget
cabal update
nix-shell release.nix -A grpc-haskell-no-tests.env
cabal configure
cabal build

Sorry, that's a lot of text! But should give full steps to reproduce. I'm afraid my nix knowledge is still a little lacking so for my own edification: will the above result in cabal using haskell packages provided by nix rather than from hackage? Obviously that is normally what we want when using nix but I wasn't clear on how the cabal nix-support works

@GulinSS
Copy link

GulinSS commented Jun 6, 2021

I am experiencing same

@GulinSS
Copy link

GulinSS commented Jun 6, 2021

If you are trying to build it at MacOS and use macports, try the following:

$ sudo port install grpc
stack build --extra-lib-dirs=/opt/local/lib --extra-include-dirs=/opt/local/include

RichardWarfield pushed a commit to litxio/gRPC-haskell that referenced this issue Apr 25, 2023
Hackage rejects uploading any package with the `-Werror` flag since it
becomes likely to break due to non-breaking changes in dependencies
RichardWarfield pushed a commit to litxio/gRPC-haskell that referenced this issue Apr 25, 2023
This is the same as awakesecurity#101, except I realized that there was more than one
`-Werror` in the `proto3-suite.cabal` file
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

No branches or pull requests

2 participants