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

cabal-testsuite fails early on with linker error on Windows since GHC 9.6 #8858

Closed
ulysses4ever opened this issue Mar 16, 2023 · 9 comments · Fixed by #9886
Closed

cabal-testsuite fails early on with linker error on Windows since GHC 9.6 #8858

ulysses4ever opened this issue Mar 16, 2023 · 9 comments · Fixed by #9886

Comments

@ulysses4ever
Copy link
Collaborator

ulysses4ever commented Mar 16, 2023

Describe the bug
Here's a failed run for example. The salient bit is:

C:\sr\ghc-9.6.1\network-3.1.2.8-47daa736ec70bcbdeddd189bd8a4e60d34db9fe7\lib\libHSnetwork-3.1.2.8-47daa736ec70bcbdeddd189bd8a4e60d34db9fe7.a: unknown symbol `__mingw_vsprintf'

To Reproduce
This needs to be investigated but generally speaking, our validate.sh -s lib-suite on Windows.

Expected behavior
No failure.

System information

  • Operating system: Windows
  • cabal, ghc: 3.8.1.0 and 9.6.1

Additional context

Sadly enough, we'll have to disable a big chunk of CI on Windows for GHC 9.6.1 if this is not fixed.

/cc @Mistuke @jneira

@mpilgrem
Copy link
Collaborator

mpilgrem commented Apr 25, 2023

Is this a Cabal library bug? I have just tried to build Stack (with Stack) on Windows 11 with the new snapshot for GHC 9.4.5 (Stackage Nightly nightly-2023-04-25) and it fails with a similar sort of message (again, complaining about 'unknown symbols') [EDIT GHC 9.4.4 works fine]:

pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\network-3.1.2.8-DIslA85FC627S0eMFb26Fp\libHSnetwork-3.1.2.8-DIslA85FC627S0eMFb26Fp.a: unknown symbol `__mingw_vsprintf'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\network-3.1.2.8-DIslA85FC627S0eMFb26Fp\libHSnetwork-3.1.2.8-DIslA85FC627S0eMFb26Fp.a: unknown symbol `getWSErrorDescr'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\network-3.1.2.8-DIslA85FC627S0eMFb26Fp\libHSnetwork-3.1.2.8-DIslA85FC627S0eMFb26Fp.a: unknown symbol `networkzm3zi1zi2zi8zmDIslA85FC627S0eMFb26Fp_NetworkziSocketziInternal_withSocketsInit_closure'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\network-3.1.2.8-DIslA85FC627S0eMFb26Fp\libHSnetwork-3.1.2.8-DIslA85FC627S0eMFb26Fp.a: unknown symbol `networkzm3zi1zi2zi8zmDIslA85FC627S0eMFb26Fp_NetworkziSocketziBuffer_zdwsendBuf_closure'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\tls-1.6.0-L7vOrX5PXtxCYn6XOlo0lf\libHStls-1.6.0-L7vOrX5PXtxCYn6XOlo0lf.a: unknown symbol `networkzm3zi1zi2zi8zmDIslA85FC627S0eMFb26Fp_NetworkziSocketziByteStringziIO_zdwrecv_closure'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\tls-1.6.0-L7vOrX5PXtxCYn6XOlo0lf\libHStls-1.6.0-L7vOrX5PXtxCYn6XOlo0lf.a: unknown symbol `tlszm1zi6zi0zmL7vOrX5PXtxCYn6XOlo0lf_NetworkziTLSziBackend_zdtcBackend_closure'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\connection-0.3.1-6Q8NoORXRD3cfhY8fQImM\libHSconnection-0.3.1-6Q8NoORXRD3cfhY8fQImM.a: unknown symbol `tlszm1zi6zi0zmL7vOrX5PXtxCYn6XOlo0lf_NetworkziTLSziContextziInternal_zdtcContext_closure'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\http-client-tls-0.3.6.1-1irORuvOSZS7lk0vW4RHCH\libHShttp-client-tls-0.3.6.1-1irORuvOSZS7lk0vW4RHCH.a: unknown symbol `connectionzm0zi3zi1zm6Q8NoORXRD3cfhY8fQImM_NetworkziConnectionziTypes_SockSettingsSimple_con_info'
pantry> ghc-9.4.5.exe:  | C:\sr\snapshots\0f744d27\lib\x86_64-windows-ghc-9.4.5\casa-client-0.0.1-CluYGfz85ea6VJMUkpqtF2\libHScasa-client-0.0.1-CluYGfz85ea6VJMUkpqtF2.a: unknown symbol `httpzmclientzmtlszm0zi3zi6zi1zm1irORuvOSZZS7lk0vW4RHCH_NetworkziHTTPziClientziTLS_globalManager_closure'
pantry> ghc-9.4.5.exe: ^^ Could not load 'casazmclientzm0zi0zi1zmCluYGfzz85ea6VJMUkpqtF2_CasaziClient_thParserCasaRepo_closure', dependency unresolved. See top entry above.
pantry>
pantry>
pantry> <no location info>: error:
pantry>
pantry> GHC.ByteCode.Linker.lookupCE
pantry> During interactive linking, GHCi couldn't find the following symbol:
pantry>   casazmclientzm0zi0zi1zmCluYGfzz85ea6VJMUkpqtF2_CasaziClient_thParserCasaRepo_closure
pantry> This may be due to you not asking GHCi to load extra object files,
pantry> archives or DLLs needed by your current session.  Restart GHCi, specifying
pantry> the missing library using the -L/path/to/object/dir and -lmissinglibname
pantry> flags, or simply by naming the relevant files on the GHCi command line.
pantry> Alternatively, this link failure might indicate a bug in GHCi.
pantry> If you suspect the latter, please report this as a GHC bug:
pantry>   https://www.haskell.org/ghc/reportabug
pantry>

I asked at the network repository (previously) and it was suggested there that the bug is not in network or GHC. By a process of elimination that suggests it might be Cabal (the library).

@gbaz
Copy link
Collaborator

gbaz commented Apr 26, 2023

I don't think Kazu's comment rules out ghc. I agree it seems unlikely to specifically be a network issue. It could well be a build-environment issue -- perhaps the mingw libraries shipped with ghc 9.6.1 are not in the same path, or perhaps the path needs further configuration (in the cabal.config file) to accurately locate those dirs, or perhaps all that is correct and the regression is cabal isn't handling those paths in the same way?

Note that if this is 9.6 specific it seems unlikely to be a cabal issue, since for ghc 9.4, the windows action (which succeeds, I believe) uses the same version of cabal. So if the choice of ghc version rather than the choice of cabal version triggers this, then something about ghc -- perhaps the distribution and not the compiler itself -- would be at issue.

A further differential diagnosis could come from seeing if this only occurs with chocolatey installs of ghc (as in the actions) or also from ghcup ones, or just "raw" ones from the official distribution from ghchq itself.

@mpilgrem
Copy link
Collaborator

If it is GHC, it is affecting the binary versions that are published via https://www.haskell.org/ghc/download.html and both the new GHC 9.4.5 and 9.6.1. I'll raise a GHC issue.

@jasagredo
Copy link
Collaborator

I don't think this is happening anymore, is it?

@ulysses4ever
Copy link
Collaborator Author

@jasagredo could you reference a successful CI run that runs the tests on Windows? And maybe a commit that unlocks the tests.

@jasagredo
Copy link
Collaborator

The CI workflow has been updated to 9.6.3, so 9.6.1+Windows is no longer an exercised combination. The comment is outdated.

https://github.com/haskell/cabal/blob/master/.github/workflows/validate.yml#L166-L170

@ulysses4ever
Copy link
Collaborator Author

Looks like it. Would be nice to remove the comment before closing the ticket I guess

andreasabel added a commit that referenced this issue Apr 11, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- closes #8858: deleted comment
- closes #9858 by dropping container and use ghcup to setup ghcs
@andreasabel andreasabel self-assigned this Apr 11, 2024
@andreasabel
Copy link
Member

I am removing the comment in:

andreasabel added a commit that referenced this issue Apr 12, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.
@ulysses4ever
Copy link
Collaborator Author

Good! I guess we can close optimistically.

Mikolaj pushed a commit that referenced this issue Apr 15, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.
erikd pushed a commit to erikd/cabal that referenced this issue Apr 22, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes haskell#8858: deleted comment
- closes haskell#9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.
mergify bot pushed a commit that referenced this issue Apr 29, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.

(cherry picked from commit 29dc53c)

# Conflicts:
#	.github/workflows/validate.yml
geekosaur pushed a commit that referenced this issue Apr 29, 2024
Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.

(cherry picked from commit 29dc53c)

# Conflicts:
#	.github/workflows/validate.yml
Mikolaj added a commit that referenced this issue May 1, 2024
3.12 changelog fixup (#9922)

* Incorporate Brandon’s suggestions

See #9920.

* Incorporate Artem’s suggestions

See #9920.

* Do not repeat yourself

* Fix release notes grammar (#9924)

* Fix release notes grammar

See #9920.

* Fix whitespace

* Support GHC 9.12

(cherry picked from commit da6bdef)

* Fix changelog/readme (backport #9935) (#9936)

* Fix changelog/readme

(cherry picked from commit ea0f464)

* Remove previous release date

---------

Co-authored-by: Francesco Ariis <fa-ml@ariis.it>

* Tell zlib not to use pkg-config in GitLab CI.

(cherry picked from commit 62c74fe)

* Revert "Mark ForeignLibs test as broken with ghc-8.4.4"

This reverts commit a90d44f.

(cherry picked from commit d0a690b)

* CI: drop validation of GHC 7

Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.

(cherry picked from commit 29dc53c)

# Conflicts:
#	.github/workflows/validate.yml

* fix validate.yml conflicts

How is this backport conflicting with _itself_?

* copy an import list from #9551

because `System.Process.Internals` just (like, within the past
hour or so) started exporting a name we are using.

* CI: force MacOS jobs to use Intel runners (macos-13) (backport #9949) (#9956)

* CI: force MacOS jobs to use Intel runners (`macos-13`)

GitHub just switched macos-latest to the ARM chips (now alisasing
`macos-14`), and it brings a bunch of problems.

- First of all, GHC's 8.8 and 8.6 don't exist there.
- ghcup and llvm are unavailable

For the time being, lets stay on the previous version of the runner.

(cherry picked from commit d36e0d0)

* CI: GitHub MacOS runners lost ghcup since 2024-04-27, so use haskell-action/setup instead

(cherry picked from commit 082d952)

* fixup! more compat with new macos runners

(cherry picked from commit 326a1f6)

* !fixup resolve conflicts

* copy an import list from #9551

because `System.Process.Internals` just (like, within the past
hour or so) started exporting a name we are using.

---------

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>

* Merge branch '3.12' into mergify/bp/3.12/pr-9886

* Update validate.yml

github nicely decided to ~revert~ the OS X validate fix when I rebased on top of it.

* make validate.yml consistent with master
mergify bot added a commit that referenced this issue May 1, 2024
3.12 changelog fixup (#9922)

* Incorporate Brandon’s suggestions

See #9920.

* Incorporate Artem’s suggestions

See #9920.

* Do not repeat yourself

* Fix release notes grammar (#9924)

* Fix release notes grammar

See #9920.

* Fix whitespace

* Support GHC 9.12

(cherry picked from commit da6bdef)

* Fix changelog/readme (backport #9935) (#9936)

* Fix changelog/readme

(cherry picked from commit ea0f464)

* Remove previous release date

---------

Co-authored-by: Francesco Ariis <fa-ml@ariis.it>

* Tell zlib not to use pkg-config in GitLab CI.

(cherry picked from commit 62c74fe)

* Revert "Mark ForeignLibs test as broken with ghc-8.4.4"

This reverts commit a90d44f.

(cherry picked from commit d0a690b)

* CI: drop validation of GHC 7

Changes:
- bump GHC_FOR_RELEASE to 9.4.8
- bump action versions
- uniform quoting style
- satisfy actionlint
- fix order: setup Haskell before cache restore (uses setup.haskell-outputs)
- use `--ignore-project` in `cabal install hackage-repo-tool`
- use GHC_FOR_RELEASE also in validate-old-ghcs
- closes #8858: deleted comment
- closes #9858 by dropping container and using ghcup to setup ghcs

GHCs that do not install on ubuntu-22.04 with GHCup are dropped, meaning we only keep GHC 8.0.2 and up.

(cherry picked from commit 29dc53c)

# Conflicts:
#	.github/workflows/validate.yml

* fix validate.yml conflicts

How is this backport conflicting with _itself_?

* copy an import list from #9551

because `System.Process.Internals` just (like, within the past
hour or so) started exporting a name we are using.

* CI: force MacOS jobs to use Intel runners (macos-13) (backport #9949) (#9956)

* CI: force MacOS jobs to use Intel runners (`macos-13`)

GitHub just switched macos-latest to the ARM chips (now alisasing
`macos-14`), and it brings a bunch of problems.

- First of all, GHC's 8.8 and 8.6 don't exist there.
- ghcup and llvm are unavailable

For the time being, lets stay on the previous version of the runner.

(cherry picked from commit d36e0d0)

* CI: GitHub MacOS runners lost ghcup since 2024-04-27, so use haskell-action/setup instead

(cherry picked from commit 082d952)

* fixup! more compat with new macos runners

(cherry picked from commit 326a1f6)

* !fixup resolve conflicts

* copy an import list from #9551

because `System.Process.Internals` just (like, within the past
hour or so) started exporting a name we are using.

---------

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>

* Merge branch '3.12' into mergify/bp/3.12/pr-9886

* Update validate.yml

github nicely decided to ~revert~ the OS X validate fix when I rebased on top of it.

* make validate.yml consistent with master

Co-authored-by: Mikolaj <281893+Mikolaj@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

5 participants