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

Inappropriate dependency on libgcc_s #497

Closed
bgamari opened this issue Mar 8, 2022 · 8 comments · Fixed by #500
Closed

Inappropriate dependency on libgcc_s #497

bgamari opened this issue Mar 8, 2022 · 8 comments · Fixed by #500
Labels
Milestone

Comments

@bgamari
Copy link
Contributor

bgamari commented Mar 8, 2022

It appears that bytestring-0.11.3.0 exhibits the same behavior that text exhibited which lead to https://gitlab.haskell.org/ghc/ghc/-/issues/20878. Unfortunately, this means that 9.2.2 is currently broken on Windows. In text this was fixed by haskell/text#403.

@Bodigrim
Copy link
Contributor

Bodigrim commented Mar 8, 2022

Could someone please contribute a CI job, covering this configuration? We have Windows build, but it succeeds.

@sjakobi
Copy link
Member

sjakobi commented Mar 8, 2022

I assume this is the problematic bit in bytestring.cabal:

bytestring/bytestring.cabal

Lines 134 to 138 in ea3d88a

-- Required, due to the following issues:
-- * https://gitlab.haskell.org/ghc/ghc/-/issues/20525#note_385580
-- * https://gitlab.haskell.org/ghc/ghc/-/issues/19417
if os(windows)
extra-libraries: gcc_s gcc

Unfortunately I don't know how to fix it.

@bgamari
Copy link
Contributor Author

bgamari commented Mar 8, 2022

I believe that dropping gcc_s from extra libraries should do the trick.

@bgamari
Copy link
Contributor Author

bgamari commented Mar 8, 2022

Could someone please contribute a CI job, covering this configuration? We have Windows build, but it succeeds.

The only way to test this sort of thing robustly is to run in a clean environment. Unfortunately, I don't think this is possible using GitHub Actions.

@Bodigrim
Copy link
Contributor

Bodigrim commented Mar 8, 2022

@bgamari is it possible to setup such job on GHC side? I'm happy to accept a patch as long as it passes our own CI, but I have no idea whether it is sufficient or not for GHC purposes.

@bgamari
Copy link
Contributor Author

bgamari commented Mar 8, 2022

@bgamari is it possible to setup such job on GHC side?

Yes, I am working on it

@bgamari
Copy link
Contributor Author

bgamari commented Mar 8, 2022

@Bodigrim, on second thought, a "good enough" test might be possible with an approach similar to https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7738/diffs#157f7634c25bc6366cb7c9c9edb48e819dce38db_468_473. That is, just try to run an executable in a subshell with a very minimal PATH (which is what Windows uses as its dynamic library search path).

bgamari added a commit to bgamari/bytestring that referenced this issue Mar 9, 2022
This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.
bgamari added a commit to bgamari/bytestring that referenced this issue Mar 9, 2022
This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.
@sjakobi sjakobi added the Windows label Mar 9, 2022
@hasufell
Copy link
Member

hasufell commented Mar 11, 2022

Could someone please contribute a CI job, covering this configuration? We have Windows build, but it succeeds.

Because you're not requesting 9.2.2, but 9.2 via haskell action, which resolves to 9.2.1 installed via chocolatey (which does not have 9.2.2 yet): https://github.com/haskell/bytestring/runs/5488135060?check_suite_focus=true#step:3:7

hasufell pushed a commit to hasufell/bytestring that referenced this issue Mar 12, 2022
This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.
hasufell pushed a commit to hasufell/bytestring that referenced this issue Mar 12, 2022
This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.
hasufell pushed a commit to hasufell/bytestring that referenced this issue Mar 12, 2022
This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.
@Bodigrim Bodigrim linked a pull request Mar 12, 2022 that will close this issue
Bodigrim pushed a commit that referenced this issue Mar 13, 2022
* Test gcc_s error wrt #498

The windows test should fail here.

* Eliminate redundant dependency on libgcc_s on Windows

This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes #497.

Co-authored-by: Ben Gamari <[email protected]>
Bodigrim pushed a commit to Bodigrim/bytestring that referenced this issue Mar 22, 2022
* Test gcc_s error wrt haskell#498

The windows test should fail here.

* Eliminate redundant dependency on libgcc_s on Windows

This dependency causes an unnecessary dynamic dependency on Windows,
resulting in GHC #21196.

Fixes haskell#497.

Co-authored-by: Ben Gamari <[email protected]>
@Bodigrim Bodigrim added this to the 0.11.3.1 milestone Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants