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

Fix using the single threaded RTS lib #2202

Merged
merged 3 commits into from
Jun 19, 2024
Merged

Conversation

avdv
Copy link
Member

@avdv avdv commented May 30, 2024

Since GHC 9.4.1, the rts package has hs-libraries: HSrts-1.0.2 Cffi in its package config.

We have special handling for HSrts (and Cffi) but that fails due to the name change.

This caused the build on Bazel CI to fail since the single threaded rts library
was symlinked into the solib directory instead of the multi threaded variant:

libHSrts-1.0.2_thr-ghc9.4.6.so: cannot open shared object file: No such file or directory

Fixes #2188


Note: Bazel CI is green on this branch: https://buildkite.com/bazel/rules-haskell-haskell/builds/2032

avdv added 2 commits May 30, 2024 15:36
Since GHC 9.4.1, the rts library has `hs-libraries: HSrts-1.0.2 Cffi` in the package config.

We have special handling for HSrts (and Cffi) but that fails due to the name change.
@avdv avdv force-pushed the cb/fix-threaded-so-symlink branch from 9f7ae19 to 4e7d45d Compare June 13, 2024 14:02
According to the cabal docs, the `hs-libraries` entries of a package config
needs to comply to specific file naming conventions, see [1].

Only names starting with `HS` or `C` are allowed and dynamic libs prefixed with
`C` need to be handled specially as the "C" prefix should be stripped.

The "rts" hs-libraries also exist in all configured GHC ways, single/multi
threaded and debug/non-debug variants.

Before, only rts's Cffi was handled correctly but other C libs were not.

[1]: https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-extra-bundled-libraries
@avdv avdv force-pushed the cb/fix-threaded-so-symlink branch from 4e7d45d to ea41a91 Compare June 17, 2024 07:19
@avdv avdv requested a review from ylecornec June 17, 2024 11:04
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thank you!

@avdv avdv added the merge-queue merge on green CI label Jun 19, 2024
@mergify mergify bot merged commit 9c4e23c into master Jun 19, 2024
49 checks passed
@mergify mergify bot deleted the cb/fix-threaded-so-symlink branch June 19, 2024 15:22
@mergify mergify bot removed the merge-queue merge on green CI label Jun 19, 2024
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

Successfully merging this pull request may close these issues.

[Bazel CI] library tests are failing with Bazel@HEAD
2 participants