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

macOS /usr/include/time.h __attribute__ causes c2hs to fail when building examples #61

Open
dsvensson opened this issue Jun 13, 2018 · 1 comment

Comments

@dsvensson
Copy link

$ nix-shell release.nix -A grpc-haskell.env
...
[nix-shell:~/gRPC-haskell]$ stack build --flag grpc-haskell:with-examples
grpc-haskell-core-0.0.0.0: configure (lib)
aeson-pretty-0.8.5: download
insert-ordered-containers-0.2.1.0: download
grpc-haskell-core-0.0.0.0: build (lib)
aeson-pretty-0.8.5: configure
aeson-pretty-0.8.5: build
insert-ordered-containers-0.2.1.0: configure
insert-ordered-containers-0.2.1.0: build
aeson-pretty-0.8.5: copy/register
insert-ordered-containers-0.2.1.0: copy/register
Log files have been written to: /Users/foo/gRPC-haskell/.stack-work/logs/
Progress: 3/6
--  While building custom Setup.hs for package grpc-haskell-core-0.0.0.0 using:
      /Users/foo/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build lib:grpc-haskell-core --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/foo/gRPC-haskell/.stack-work/logs/grpc-haskell-core-0.0.0.0.log

    Configuring grpc-haskell-core-0.0.0.0...
    Preprocessing library grpc-haskell-core-0.0.0.0...
    c2hs: C header contains errors:

    /usr/include/time.h:153: (column 72) [ERROR]  >>> Syntax error !
      The symbol `__attribute__' does not fit here.
@Gabriella439
Copy link
Contributor

@dsvensson: Sorry for the delay in responding. In general, stack and Nix don't play well with each other because stack does not reuse the Nix logic for building Haskell dependencies (like grpc-haskell-core). I recommend using cabal build instead of stack build. However, if you still run into the same issue when using cabal build then let me know

RichardWarfield pushed a commit to litxio/gRPC-haskell that referenced this issue Apr 25, 2023
…curity#61)

Fixes awakesecurity#60

The `Proto3.Suite.DotProto.Generate` module backported `liftEither` to a
local definition to support older versions of the `mtl` but was missing
a forwards-compatible CPP guard to avoid conflicting with the open import
of `Control.Monad.Except`
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