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

Win32-extras won't build with Win32-2.5.0.0 or later #111

Closed
RyanGlScott opened this issue Jul 29, 2017 · 8 comments
Closed

Win32-extras won't build with Win32-2.5.0.0 or later #111

RyanGlScott opened this issue Jul 29, 2017 · 8 comments

Comments

@RyanGlScott
Copy link

Win32-2.5.0.0 merged in the entire contents of the Win32-extras library. However, Win32-extras has not updated to re-export the appropriate modules from Win32. Now if you build Win32-extras, it will fail with:

$ cabal install Win32-extras
Resolving dependencies...
Configuring Win32-extras-0.2.0.1...
Building Win32-extras-0.2.0.1...
Failed to install Win32-extras-0.2.0.1
Build log ( C:\Users\RyanGlScott\AppData\Roaming\cabal\logs\ghc-8.2.1\Win32-extras-0.2.0.1-GgY9z3kq5Ze8KnzSXTMG6U.log ):
Preprocessing library for Win32-extras-0.2.0.1..
LayeredWindow.hsc:21:0: warning: "_WIN32_WINNT" redefined
In file included from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/crtdefs.h:10:0,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/stddef.h:7,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/lib/gcc/x86_64-w64-mingw32/6.2.0/include/stddef.h:1,
                 from C:\Users\RyanGlScott\Software\ghc-8.2.1/lib/template-hsc.h:4,
                 from dist\build\Graphics\Win32\LayeredWindow_hsc_make.c:1:
C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/_mingw.h:225:0: note: this is the location of the previous definition
 #define _WIN32_WINNT 0x502

Computer.hsc:67:0: warning: "_WIN32_WINNT" redefined
In file included from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/crtdefs.h:10:0,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/stddef.h:7,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/lib/gcc/x86_64-w64-mingw32/6.2.0/include/stddef.h:1,
                 from C:\Users\RyanGlScott\Software\ghc-8.2.1/lib/template-hsc.h:4,
                 from dist\build\System\Win32\Info\Computer_hsc_make.c:1:
C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/_mingw.h:225:0: note: this is the location of the previous definition
 #define _WIN32_WINNT 0x502

Version.hsc:30:0: warning: "_WIN32_WINNT" redefined
In file included from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/crtdefs.h:10:0,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/stddef.h:7,
                 from C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/lib/gcc/x86_64-w64-mingw32/6.2.0/include/stddef.h:1,
                 from C:\Users\RyanGlScott\Software\ghc-8.2.1/lib/template-hsc.h:4,
                 from dist\build\System\Win32\Info\Version_hsc_make.c:1:
C:/Users/RyanGlScott/Software/ghc-8.2.1/mingw/x86_64-w64-mingw32/include/_mingw.h:225:0: note: this is the location of the previous definition
 #define _WIN32_WINNT 0x502

Building library for Win32-extras-0.2.0.1..
[ 1 of 26] Compiling Graphics.Win32.GDI.AlphaBlend ( dist\build\Graphics\Win32\GDI\AlphaBlend.hs, dist\build\Graphics\Win32\GDI\AlphaBlend.o )
[ 2 of 26] Compiling Graphics.Win32.Window.ForegroundWindow ( Graphics\Win32\Window\ForegroundWindow.hs, dist\build\Graphics\Win32\Window\ForegroundWindow.o )
[ 3 of 26] Compiling System.Win32.Encoding ( System\Win32\Encoding.hs, dist\build\System\Win32\Encoding.o )
[ 4 of 26] Compiling System.Win32.Error ( dist\build\System\Win32\Error.hs, dist\build\System\Win32\Error.o )

System\Win32\Error.hsc:25:5: error:
    Ambiguous occurrence `eRROR_INSUFFICIENT_BUFFER'
    It could refer to either `System.Win32.Types.eRROR_INSUFFICIENT_BUFFER',
                             imported from `System.Win32.Types' at System\Win32\Error.hsc:31:1-25
                          or `System.Win32.Error.eRROR_INSUFFICIENT_BUFFER',
                             defined at System\Win32\Error.hsc:43:1
   |
25 |   , eRROR_INSUFFICIENT_BUFFER
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

System\Win32\Error.hsc:26:5: error:
    Ambiguous occurrence `eRROR_MOD_NOT_FOUND'
    It could refer to either `System.Win32.Types.eRROR_MOD_NOT_FOUND',
                             imported from `System.Win32.Types' at System\Win32\Error.hsc:31:1-25
                          or `System.Win32.Error.eRROR_MOD_NOT_FOUND',
                             defined at System\Win32\Error.hsc:46:1
   |
26 |   , eRROR_MOD_NOT_FOUND
   |     ^^^^^^^^^^^^^^^^^^^

System\Win32\Error.hsc:27:5: error:
    Ambiguous occurrence `eRROR_PROC_NOT_FOUND'
    It could refer to either `System.Win32.Types.eRROR_PROC_NOT_FOUND',
                             imported from `System.Win32.Types' at System\Win32\Error.hsc:31:1-25
                          or `System.Win32.Error.eRROR_PROC_NOT_FOUND',
                             defined at System\Win32\Error.hsc:49:1
   |
27 |   , eRROR_PROC_NOT_FOUND
   |     ^^^^^^^^^^^^^^^^^^^^

I've opened an issue at https://hub.darcs.net/shelarcy/Win32-extras/issue/2, but received no response.

cc @shelarcy

@bergmark
Copy link
Member

bergmark commented Aug 2, 2017

I don't have an environment where I can test this, does any of the trustees?

@hvr
Copy link
Contributor

hvr commented Aug 2, 2017

I don't have such an environment at my disposal, but I'd be inclined to trust @RyanGlScott's judgement here

@phadej
Copy link
Member

phadej commented Aug 2, 2017

I'd trust @RyanGlScott as well. I'll eventually get Windows PC, but I just hadn't time to order a game PC! (and it feels I don't have time to play either so...)

@hvr
Copy link
Contributor

hvr commented Aug 9, 2017

@RyanGlScott I've set upper bounds to Win32-extras. I think at this point it'd be best to simply deprecate the package in favour of Win32 proper, rather than messing with reexports (you'd need to set rather tight bounds on Win32 to do this in proper compliance with the PVP, and that's IMO not worth the effort).

@RyanGlScott
Copy link
Author

@hvr, thanks! I'd be fine with deprecating Win32-extras if you feel that would be the best course of action. (I'm not using Win32-extras directly myself, I just happened to notice that it broke when trying to build a library which depended on it.)

@hvr
Copy link
Contributor

hvr commented Aug 9, 2017

@RyanGlScott was that package by any chance git-annex? :-) http://packdeps.haskellers.com/reverse/Win32-extras

@RyanGlScott
Copy link
Author

That's some fine detective work, @hvr ;)

Yep, I was indeed trying to install git-annex.

@RyanGlScott
Copy link
Author

Given that the original problem is fixed (Win32-extras having too permissive of upper version bounds on Win32), I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants