- 
                Notifications
    You must be signed in to change notification settings 
- Fork 86
Open
Labels
Description
Problem
Can't build SDL2.
Description
I tried to build this library using Haskell Stack on Windows 11, but encountered a problem:
sdl2> C://Users//vashu//AppData//Local//Programs//stack//x86_64-windows//ghc-9.2.5//mingw//bin/ld.exe: C:\Users\vashu\AppData\Local\Programs\stack\x86_64-windows\msys2-20220904\mingw64\lib/libSDL2main.a(SDL_windows_main.c.obj):(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_chk_guard]+0x0): undefined reference to `__stack_chk_guard'
sdl2> collect2.exe: error: ld returned 1 exit status
(full logs are here: log.txt)
As far as I can tell, this should be a problem with the SDL2 from MinGW64 repository. Sadly, I don't know how to contact its maintainers.
Steps to reproduce:
- Install Stack: https://docs.haskellstack.org/en/stable/#how-to-install-stack
- Execute:
stack exec -- pacman -Syu
stack exec -- pacman -S msys2-keyring
stack exec -- pacman -S mingw64-w64-x86_64-pkg-config mingw64-w64-x86_64-SDL2
- Try to install SDL2:
stack install sdl2
Workaround solution
idea by @toolcreator: #277 (comment)
the newest working version found by @jship: #277 (comment)
wkoiking, jtnuttall, Sorokin-Anton, SturdyPose and Lev135