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

Help build gi-gtk #1752

Closed
nishanthkarthik opened this issue Jun 2, 2022 · 3 comments · Fixed by #2062
Closed

Help build gi-gtk #1752

nishanthkarthik opened this issue Jun 2, 2022 · 3 comments · Fixed by #2062

Comments

@nishanthkarthik
Copy link

Describe the bug
I am not able to build @stackage//:gi-gtk. I am not sure what I am doing wrong here. Any help is appreciated :)

To Reproduce

rules_haskell_toolchains(
    version = "8.10.7",
)

stack_snapshot(
    name = "stackage",
    packages = [
        "base",
        "random",
        "mtl",
        "gi-gtk",
        "haskell-gi-base",
    ],
    verbose = True,
    snapshot = "lts-18.18",
    stack_snapshot_json = "//tooling:stackage_snapshot.json",
)

Running bazel build @stackage//:gi-gtk errors out

ERROR: /home/x/.cache/bazel/x/598407688b5c09d02ba743fe2c7b1b19/external/stackage/BUILD.bazel:492:22: output 'external/stackage/haskell-gi-overloading-1.0/_install/lib/libHShaskell-gi-overloading-1.0.a' was not created
ERROR: /home/x/.cache/bazel/x/598407688b5c09d02ba743fe2c7b1b19/external/stackage/BUILD.bazel:492:22: output 'external/stackage/haskell-gi-overloading-1.0/_install/haskell-gi-overloading-1.0_haddock/haskell-gi-overloading.haddock' was not created
ERROR: /home/x/.cache/bazel/x/598407688b5c09d02ba743fe2c7b1b19/external/stackage/BUILD.bazel:492:22: output 'external/stackage/haskell-gi-overloading-1.0/_install/lib/libHShaskell-gi-overloading-1.0-ghc8.10.7.so' was not created
ERROR: /home/x/.cache/bazel/x/598407688b5c09d02ba743fe2c7b1b19/external/stackage/BUILD.bazel:492:22: HaskellCabalLibrary @stackage//:haskell-gi-overloading failed: not all outputs were created or valid

Expected behavior
Building gi-gtk should finish. I am not sure if I am building this package correctly with rules_haskell.

Environment

  • OS name + version: ArchLinux
  • Bazel version: 5.1.1
  • Version of the rules: a7241fa
@avdv
Copy link
Member

avdv commented Nov 29, 2023

It seems haskell-gi-overloading is a bit weird library since it contains no source files as it is only used as a marker to enable / disable overloading. Hence cabal does not build any libraries which is something rules_haskell relies on.

You could work around that by replacing the library with your own version using the vendored_packages attribute for stack_snapshot. If you still need help with this (after all this time), just write here and I can fill in more details.

@aherrmann
Copy link
Member

@avdv Thanks for looking into this. IIUC this means that that package would belong into the empty packages list:

# Some old packages are empty compatibility shims. Empty packages

Does that make sense?

@avdv
Copy link
Member

avdv commented Nov 30, 2023

Oh, yes. Thank you, @aherrmann that looks like a sensible thing to do. I'll prepare a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants