Opened 2 years ago

Closed 2 years ago

#10165 closed bug (fixed)

Win32 broken with GHC 7.10 RC3

Reported by: NeilMitchell Owned by:
Priority: highest Milestone: 7.10.1
Component: libraries (other) Version: 7.10.1-rc3
Keywords: Win32 Cc:
Operating System: Windows Architecture: x86
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Using the 32bit Windows build of GHC 7.10 RC3 (ghc-7.10.0.20150316) I can't load the Win32 library. I get the problem:

C:\Neil>ghci
GHCi, version 7.10.0.20150316: http://www.haskell.org/ghc/  :? for help
Prelude> import System.Win32
Prelude System.Win32> wRITE_DAC
<interactive>: C:\ghc\ghc-7.10.0.20150316\lib\Win32_6dnIMpnCmqmCdDB983aKnr\HSWin
32-2.3.1.0-6dnIMpnCmqmCdDB983aKnr.o: unknown symbol `_SetWindowLongPtrW'
ghc.exe: unable to load package `Win32-2.3.1.0'

This seems very serious, and breaks all packages that indirectly depend on the Win32 module (which on Windows is most of them).

Change History (8)

comment:1 Changed 2 years ago by NeilMitchell

I just tried with the 64bit Windows build and that worked fine.

comment:2 Changed 2 years ago by m37

Documentation on MSDN for SetWindowLongPtr https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898%28v=vs.85%29.aspx indicates that SetWindowLongPtrW only exists on 64-bit.

It appears that the win32 library should be fixed to conditionally call SetWindowLongW on 32-bit, and call SetWindowLongPtrW on 64-bit.

Last edited 2 years ago by m37 (previous) (diff)

comment:3 Changed 2 years ago by Kludgy

Untested fix here for review:

https://github.com/Kludgy/win32/commit/9e52103b8b4a9bfb486e2289257ec61ac682eb89

I will submit this as a PR as soon as I am able to verify that it works.

comment:4 Changed 2 years ago by hvr

Milestone: 7.10.1
Priority: normalhighest

let's consider this a blocker until proven otherwise :)

comment:5 Changed 2 years ago by hvr

Component: Compilerlibraries (other)
Keywords: Win32 added

comment:6 Changed 2 years ago by Kludgy

comment:7 Changed 2 years ago by Austin Seipp <austin@…>

In 2ff68c3589af86811f65991c71f33282e0e50778/ghc:

libraries: update win32 submodule

This update fixes #10165.

Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:8 Changed 2 years ago by thoughtpolice

Resolution: fixed
Status: newclosed

Thanks! Merged to both master and ghc-7.10 (via 2ff68c3589af86811f65991c71f33282e0e50778 & 47cd08ab94e0a9bae3d9e966777616230d4fb4ff).

Note: See TracTickets for help on using tickets.