-
Notifications
You must be signed in to change notification settings - Fork 81
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
C libraries with deps don't seem to work well with TH / repl #1696
Comments
@jcpetruzza Thank you for the detailed repro! I suspect this is related to how Bazel does dynamic linking and how GHC does dynamic loading.
That library does not declare its dependency I can get your repro to build successfully by adding a
Unfortunately, I'm not sure if we can do much about this in rules_haskell. If the above is correct, then this is really a consequence of Bazel doing under-linking and GHC loading in local mode. |
Come to think of it, I think this is a duplicate of #720. |
Describe the bug
It doesn't seem to be possible to build a package if these conditions are met:
Moreover, even if TH is not in use, then the
@repl
target for a haskell library with such a dependency will fail to load for the same reasons.To Reproduce
tests/data:ourclibrary
so that it know has an additional dep.bazel test tests/binary-indirect-cbits:all
, which depends ontests/data:ourclibrary
still works (no TH).bazel test tests/template-haskell-with-cbits
, which also depends ontests/data:ourclibrary
but uses TH. It now fails with:bazel run tests/library-with-cbits:library-with-cbits@repl
and verify it fails with the same error.DIFF
Expected behavior
The test should build and pass.
Environment
Additional context
I don't currently have a workaround for this. I initially suspected it could be a problem in the order the libraries are being given with
-l
, but after reversing the order, the issue persists.The text was updated successfully, but these errors were encountered: