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

Problems building with network dependency on Windows (GHC 9.6.1/Cabal 3.10.1.0) #544

Closed
mpilgrem opened this issue Mar 24, 2023 · 12 comments

Comments

@mpilgrem
Copy link
Contributor

The GitHub-hosted runner for Windows currently comes with GHC 9.6.1 and Cabal 3.10.1.0. The tests part of the Hpack CI is falling over with some strange output that looks like it is related to network-3.1.2.8. Details are at sol/hpack#548 (comment), but flitering the CI log for other interleaved messages, the log looks like this:

[25 of 53] Compiling Hpack.Defaults   ( src\Hpack\Defaults.hs, D:\\a\hpack\hpack\dist-newstyle\build\x86_64-windows\ghc-9.6.1\hpack-0.35.2\t\spec\build\spec\spec-tmp\Hpack\Defaults.o )
...
2023-03-22T18:25:24.4876444Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\network-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c\lib\libHSnetwork-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c.a: unknown symbol `__mingw_vsprintf'
2023-03-22T18:25:24.4878193Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\network-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c\lib\libHSnetwork-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c.a: unknown symbol `getWSErrorDescr'
2023-03-22T18:25:24.4883582Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\network-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c\lib\libHSnetwork-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c.a: unknown symbol `networkzm3zi1zi2zi8zma94109d985a3fd357964536a98a836f98063395c_NetworkziSocketziInternal_withSocketsInit_closure'
2023-03-22T18:25:24.4886599Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\network-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c\lib\libHSnetwork-3.1.2.8-a94109d985a3fd357964536a98a836f98063395c.a: unknown symbol `networkzm3zi1zi2zi8zma94109d985a3fd357964536a98a836f98063395c_NetworkziSocketziBuffer_zdwsendBuf_closure'
2023-03-22T18:25:24.4890594Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\tls-1.6.0-7469c75440b0f5a3c4f86b6656eebeb1e2602c71\lib\libHStls-1.6.0-7469c75440b0f5a3c4f86b6656eebeb1e2602c71.a: unknown symbol `networkzm3zi1zi2zi8zma94109d985a3fd357964536a98a836f98063395c_NetworkziSocketziByteStringziIO_zdwrecv_closure'
2023-03-22T18:25:24.4894576Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\tls-1.6.0-7469c75440b0f5a3c4f86b6656eebeb1e2602c71\lib\libHStls-1.6.0-7469c75440b0f5a3c4f86b6656eebeb1e2602c71.a: unknown symbol `tlszm1zi6zi0zm7469c75440b0f5a3c4f86b6656eebeb1e2602c71_NetworkziTLSziBackend_zdtcBackend_closure'
2023-03-22T18:25:24.4898783Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\connection-0.3.1-644b48b4c7eedf60f5f889483800658cde602d9b\lib\libHSconnection-0.3.1-644b48b4c7eedf60f5f889483800658cde602d9b.a: unknown symbol `tlszm1zi6zi0zm7469c75440b0f5a3c4f86b6656eebeb1e2602c71_NetworkziTLSziContextziInternal_zdtcContext_closure'
2023-03-22T18:25:24.4903236Z ghc-9.6.1.exe:  | C:\cabal\store\ghc-9.6.1\http-client-t_-0.3.6.1-d7c73eb524e98153a6dfec921b441b65244eec1e\lib\libHShttp-client-t_-0.3.6.1-d7c73eb524e98153a6dfec921b441b65244eec1e.a: unknown symbol `connectionzm0zi3zi1zm644b48b4c7eedf60f5f889483800658cde602d9b_NetworkziConnectionziTypes_SockSettingsSimple_con_info'
2023-03-22T18:25:24.4907091Z ghc-9.6.1.exe:  | D:\a\hpack\hpack\dist-newstyle\build\x86_64-windows\ghc-9.6.1\hpack-0.35.2\t\spec\build\spec\spec-tmp\Hpack\Defaults.o: unknown symbol `httpzmclientzmtzuzm0zi3zi6zi1zmd7c73eb524e98153a6dfec921b441b65244eec1e_NetworkziHTTPziClientziTLS_tlsManagerSettings_closure'
2023-03-22T18:25:24.4908827Z ghc-9.6.1.exe: Could not load Object Code D:\a\hpack\hpack\dist-newstyle\build\x86_64-windows\ghc-9.6.1\hpack-0.35.2\t\spec\build\spec\spec-tmp\Hpack\Defaults.o.
2023-03-22T18:25:24.4909260Z 
2023-03-22T18:25:24.5055664Z 
2023-03-22T18:25:24.5056064Z <no location info>: error: 
2023-03-22T18:25:25.2910676Z 
2023-03-22T18:25:25.2911713Z Access violation in generated code when reading 0x20
2023-03-22T18:25:25.2912161Z 
2023-03-22T18:25:25.2912421Z  Attempting to reconstruct a stack trace...
2023-03-22T18:25:25.2912700Z 
2023-03-22T18:25:25.3743412Z    Frame	Code address
2023-03-22T18:25:25.4276447Z  * 0x2271efd930	0x7ff76c5b34f6 C:\ghcup\ghc\9.6.1\bin\ghc-9.6.1.exe+0x42834f6
2023-03-22T18:25:25.4279779Z  * 0x2271efd9b0	0x7ff76b28bc1f C:\ghcup\ghc\9.6.1\bin\ghc-9.6.1.exe+0x2f5bc1f
2023-03-22T18:25:25.4283374Z  * 0x2271efd9e0	0x7ff76b28c6b8 C:\ghcup\ghc\9.6.1\bin\ghc-9.6.1.exe+0x2f5c6b8
2023-03-22T18:25:25.4286173Z  * 0x2271efd9e8	0x7ff76bd2f68f C:\ghcup\ghc\9.6.1\bin\ghc-9.6.1.exe+0x39ff68f
2023-03-22T18:25:25.4290688Z  * 0x2271efd9f0	0x7ef468b285d0
2023-03-22T18:25:25.4295193Z  * 0x2271efd9f8	0x18d15e6d090
2023-03-22T18:25:25.4299565Z  * 0x2271efda00	0x49d6d
2023-03-22T18:25:25.4303964Z  * 0x2271efda08	0x7ef464870cb8
2023-03-22T18:25:25.4304165Z 
2023-03-22T18:25:25.5388898Z Error: cabal-3.10.1.0.exe: Failed to build test:spec from hpack-0.35.2. The
2023-03-22T18:25:25.5389829Z build process terminated with exit code 11

I wondered if you could make any sense of that output?

@andreasabel
Copy link
Member

Currently CI here does not test this setup:

@kazu-yamamoto
Copy link
Collaborator

#547 has been merged.

See https://github.com/haskell/network/actions/runs/4604677054/jobs/8135848818?pr=547

I don't see this issue in this log. What is different?

@kazu-yamamoto
Copy link
Collaborator

@mpilgrem Gentle ping.

@mpilgrem
Copy link
Contributor Author

mpilgrem commented Apr 7, 2023

Sorry, @kazu-yamamoto, I had not appreciated your question was for me. I don't know what is different. I can build network-3.1.2.8 on Windows with Stack and resolver ghc-9.6.1, the problem seems to be related with packages that depend on it.

It looks like the Cabal project may be experiencing something similar: see haskell/cabal#8858 (cabal-testsuite fails early on with linker error on Windows since GHC 9.6). That says 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'

which looks similar to the first line above.

Also, I am currently trying to get Stack itself to build with GHC 9.6.1. That falls over when the Pantry dependency is built and again with messages that refer to network and missing symbols. However, I am still investigating that.

@mpilgrem
Copy link
Contributor Author

mpilgrem commented Apr 7, 2023

The experience of trying to build pantry with Stack 2.9.3 and resolver ghc-9.6.1 on Windows locally (having built dependency network-3.1.2.8 without an error) fails with (extracts), which have similarities with the CI experiences above:

pantry                       > configure (lib)
Configuring pantry-0.8.1...
pantry                       > build (lib)
Preprocessing library for pantry-0.8.1..
Building library for pantry-0.8.1..
[ 1 of 19] Compiling Pantry.Internal.AesonExtended
...
[19 of 19] Compiling Pantry
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\network-3.1.2.8-5DV0dwervpqBgBVxbTLy29\libHSnetwork-3.1.2.8-5DV0dwervpqBgBVxbTLy29.a: unknown symbol `__mingw_vsprintf'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\network-3.1.2.8-5DV0dwervpqBgBVxbTLy29\libHSnetwork-3.1.2.8-5DV0dwervpqBgBVxbTLy29.a: unknown symbol `getWSErrorDescr'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\network-3.1.2.8-5DV0dwervpqBgBVxbTLy29\libHSnetwork-3.1.2.8-5DV0dwervpqBgBVxbTLy29.a: unknown symbol `networkzm3zi1zi2zi8zm5DV0dwervpqBgBVxbTLy29_NetworkziSocketziInternal_withSocketsInit_closure'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\network-3.1.2.8-5DV0dwervpqBgBVxbTLy29\libHSnetwork-3.1.2.8-5DV0dwervpqBgBVxbTLy29.a: unknown symbol `networkzm3zi1zi2zi8zm5DV0dwervpqBgBVxbTLy29_NetworkziSocketziBuffer_zdwsendBuf_closure'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\tls-1.6.0-CrWF7OFxhbqLHF8HiGY3fu\libHStls-1.6.0-CrWF7OFxhbqLHF8HiGY3fu.a: unknown symbol `networkzm3zi1zi2zi8zm5DV0dwervpqBgBVxbTLy29_NetworkziSocketziByteStringziIO_zdwrecv_closure'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\tls-1.6.0-CrWF7OFxhbqLHF8HiGY3fu\libHStls-1.6.0-CrWF7OFxhbqLHF8HiGY3fu.a: unknown symbol `tlszm1zi6zi0zmCrWF7OFxhbqLHF8HiGY3fu_NetworkziTLSziBackend_zdtcBackend_closure'
ghc-9.6.1.exe:  | C:\sr\snapshots\ecdc2256\lib\x86_64-windows-ghc-9.6.1\connection-0.3.1-7QJojCN0rmM7xonhLaML2p\libHSconnection-0.3.1-7QJojCN0rmM7xonhLaML2p.a: unknown symbol `tlszm1zi6zi0zmCrWF7OFxhbqLHF8HiGY3fu_NetworkziTLSziContextziInternal_zdtcContext_closure'
ghc-9.6.1.exe:  | C:\sr\snapshots\7343158f\lib\x86_64-windows-ghc-9.6.1\http-client-tls-0.3.6.1-KlIhomfRwtxD3BUUe10WJA\libHShttp-client-tls-0.3.6.1-KlIhomfRwtxD3BUUe10WJA.a: unknown symbol `connectionzm0zi3zi1zm7QJojCN0rmM7xonhLaML2p_NetworkziConnectionziTypes_SockSettingsSimple_con_info'
ghc-9.6.1.exe:  | C:\sr\snapshots\7343158f\lib\x86_64-windows-ghc-9.6.1\casa-client-0.0.1-7RpAkiiNynm6g3NsiM0efJ\libHScasa-client-0.0.1-7RpAkiiNynm6g3NsiM0efJ.a: unknown symbol `httpzmclientzmtlszm0zi3zi6zi1zmKlIhomfRwtxD3BUUe10WJA_NetworkziHTTPziClientziTLS_globalManager_closure'
ghc-9.6.1.exe: ^^ Could not load 'casazmclientzm0zi0zi1zm7RpAkiiNynm6g3NsiM0efJ_CasaziClient_thParserCasaRepo_closure', dependency unresolved. See top entry above.


<no location info>: error:

GHC.ByteCode.Linker.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
  casazmclientzm0zi0zi1zm7RpAkiiNynm6g3NsiM0efJ_CasaziClient_thParserCasaRepo_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
  https://www.haskell.org/ghc/reportabug

Completed 150 action(s).

@mpilgrem mpilgrem changed the title Problem building on GitHub-hosted runner for Windows (GHC 9.6.1/Cabal 3.10.1.0) Problems building with network dependency on Windows (GHC 9.6.1/Cabal 3.10.1.0) Apr 7, 2023
@kazu-yamamoto
Copy link
Collaborator

I can build network with GHC 9.6.1 on my local Windows 11.
I don't use Stack.

@mpilgrem
Copy link
Contributor Author

mpilgrem commented Apr 7, 2023

@kazu-yamamoto, I can also build network with GHC 9.6.1 on Windows. The problem seems to be that what is built can't be used by packages that depend on it, in some way. I think we can rule out Stack as the problem, because the Cabal project is experiencing it. We can also rule out GitHub hosted runners as the problem, because it also happens locally.

@kazu-yamamoto
Copy link
Collaborator

In my impression, this is not an issue for network. May I close this issue?

@mpilgrem
Copy link
Contributor Author

mpilgrem commented Apr 7, 2023

@kazu-yamamoto, if it is not network related, then this issue can be closed here, but do you suspect it is GHC 9.6.1 itself? If so, I will raise an issue there.

@kazu-yamamoto
Copy link
Collaborator

I don't suspect GHC 9.6.1 nor network.

@mpilgrem
Copy link
Contributor Author

I did ask at GHC's repository: https://gitlab.haskell.org/ghc/ghc/-/issues/23309

@kazu-yamamoto
Copy link
Collaborator

Fixed via #552.

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

No branches or pull requests

3 participants