Closed kazu-yamamoto closed 1 year ago
@Mistuke If you agree, I will implement socketPair
based on AF_UNIX
for Windows.
@kazu-yamamoto yeah that looks like a good workaround. Sorry I had missed that you had assigned this to me.
Can I clarify, is network-3.1.3.0
broken on Windows? I tried moving the Stack project from lts-20.21
(network-3.1.2.9
) to lts-20.22
(network-3.1.3.0
) and it now it fails to build with:
persistent-sqlite> ghc-9.2.7.exe: | C:\sr\snapshots\1cf8fbfe\lib\x86_64-windows-ghc-9.2.7\network-3.1.3.0-whnRyKC8v07Jg7Mne1eCa\HSnetwork-3.1.3.0-whnRyKC8v07Jg7Mne1eCa.o: unknown symbol `socketpair'
persistent-sqlite> ghc-9.2.7.exe: Could not load Object Code C:\sr\snapshots\1cf8fbfe\lib\x86_64-windows-ghc-9.2.7\network-3.1.3.0-whnRyKC8v07Jg7Mne1eCa\HSnetwork-3.1.3.0-whnRyKC8v07Jg7Mne1eCa.o.
persistent-sqlite>
persistent-sqlite> ghc-9.2.7.exe: unable to load unit `network-3.1.3.0'
Searching, I came across this issue.
@mpilgrem What about network-3.1.4.0?
@kazu-yamamoto, thanks - all good with network-3.1.4.0
. I'll wait for Stackage's LTS-20 series to catch up.
How did it happen though? c_socketpair
is only defined on !windows.
I'm also confused how the CI didn't catch it. Looks like the error is from the runtime linker, so I guess we didn't have a socketpair test?
@mpilgrem Nice! Sorry for your inconvenience. @Mistuke I guess #556 fixes that.
@Misuke
socketPair
callerror
since Windows does not providesocketpair(2)
. The following code could emulatesocketPair
on Windows when we supportAF_UNIX
. What do you think?