Skip to content

GHC 9.4 fails with c2hs #1805

Closed
Closed
@guibou

Description

@guibou

Describe the bug

c2hs calls fails with GHC 9.4 with the following:

<command-line>: fatal error: ghcplatform.h: No such file or directory

To Reproduce

Build c2hs files with GHC 9.4.

Expected behavior

It should not fail.

Environment

  • OS name + version: Linux / nixos
  • Bazel version: 4.2.2
  • Version of the rules: 977216c

Additional context

The following diff:

diff --git a/haskell/c2hs.bzl b/haskell/c2hs.bzl
index 2bb2c25f..ff728739 100644
--- a/haskell/c2hs.bzl
+++ b/haskell/c2hs.bzl
@@ -40,8 +40,6 @@ def _c2hs_library_impl(ctx):
 
     args.add("-C-E")
     args.add_all(["--cpp", cc.tools.cpp])
-    args.add("-C-includeghcplatform.h")
-    args.add("-C-includeghcversion.h")
     args.add_all(["-C" + x for x in cc.cpp_flags])
     args.add_all(["-C" + x for x in cc.include_args])
     args.add_all(ctx.attr.extra_args)

Fixed the build in my context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions