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

GHA Windows-2022: hsc2hs-0.68.10 fails to build with GHC 8.0 and 8.2 #81

Open
andreasabel opened this issue Sep 28, 2023 · 4 comments
Open

Comments

@andreasabel
Copy link
Member

hsc2hs-0.68.10 fails to build with GHC 8.0 on the windows-2022 github runner.
https://github.com/haskell-hvr/missingh/actions/runs/6343543781/job/17231649304#step:7:149

[12 of 12] Compiling Main             ( src\Main.hs, dist\build\hsc2hs\hsc2hs-tmp\Main.o )
In file included from C:\ghcup\ghc\8.0.2\lib\base-4.9.1.0\include/HsBase.h:29,

                 from cbits\utils.c:9:0: error: 
C:\ghcup\ghc\8.0.2\lib\base-4.9.1.0\include/HsBase.h:545:15: warning: '__p__environ' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  545 | extern char** environ;
      |               ^~~~~~~
Linking dist\build\hsc2hs\hsc2hs.exe ...
dist\build\hsc2hs\hsc2hs-tmp\cbits\utils.o:utils.c:(.text+0x33): undefined reference to `__stdio_common_vswprintf_s'
C:\sr\ghc-8.0.2\process-1.6.11.0-83080639175e64c2523572d20174f475836e04ed\lib/libHSprocess-1.6.11.0-83080639175e64c2523572d20174f475836e04ed.a(runProcess.o):runProcess.c:(.text+0x137): undefined reference to `__stdio_common_vswprintf_s'
andreasabel added a commit to haskell-hvr/missingh that referenced this issue Oct 2, 2023
@andreasabel
Copy link
Member Author

andreasabel commented Oct 2, 2023

This has been actually reported by the AppVeyor CI, but those failures have been ignored for the last 18 months according to https://ci.appveyor.com/project/hvr/hsc2hs/history.
First failed build report was in Spring 2022: https://ci.appveyor.com/project/hvr/hsc2hs/builds/42916119/job/7nomuj2jiar3yg02

@bgamari
Copy link
Contributor

bgamari commented Oct 3, 2023

My understanding is that this isn't an hsc2hs bug at all. Rather, GHC 8.0 simply isn't compatible with headers provided by msys2.

@andreasabel
Copy link
Member Author

It somehow used to work before, maybe upstream upgraded something. E.g. here is some evidence (soon will be scrapped) that hsc-0.68.9 builds fine on Windows with GHC 8.0: https://github.com/haskell-hvr/missingh/actions/runs/5741623308/job/15562101669

0.68.10 works with GHC 8.4 and higher, so maybe the Windows CI should be updated to reflect this.

Maybe the base lower bound for 0.68.10 should be lifted to exclude GHC < 8.4. This could also address the issue, but I am just speculating this based on the evidence I got from these CI runs.

@andreasabel
Copy link
Member Author

andreasabel added a commit to haskell-hvr/windns that referenced this issue Nov 17, 2023
@andreasabel andreasabel changed the title Windows: hsc2hs-0.68.10 fails to build with GHC 8.0 GHA Windows-2022: hsc2hs-0.68.10 fails to build with GHC 8.0 and 8.2 Nov 23, 2023
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

2 participants