stub: fix build with ghc-9.10 RC
The ghc-debug-stub-0.6.0.0
release does not build with the GHC 9.10 RC. It looks like whatever change 225d177a was working around made it into 9.10, so the CPP needs to be tweaked.
The error is:
Build profile: -w ghc-9.10.0.20240426 -O1
In order, the following will be built (use -v for more details):
- ghc-debug-convention-0.6.0.0 (lib) (first run)
- ghc-debug-stub-0.6.0.0 (lib) (first run)
Configuring library for ghc-debug-convention-0.6.0.0...
Preprocessing library for ghc-debug-convention-0.6.0.0...
Building library for ghc-debug-convention-0.6.0.0...
[1 of 1] Compiling GHC.Debug.Convention ( src/GHC/Debug/Convention.hs, /home/adam/Documents/Well-Typed/Code/ghc-debug/dist-newstyle/build/x86_64-linux/ghc-9.10.0.20240426/ghc-debug-convention-0.6.0.0/build/GHC/Debug/Convention.o, /home/adam/Documents/Well-Typed/Code/ghc-debug/dist-newstyle/build/x86_64-linux/ghc-9.10.0.20240426/ghc-debug-convention-0.6.0.0/build/GHC/Debug/Convention.dyn_o )
Configuring library for ghc-debug-stub-0.6.0.0...
Preprocessing library for ghc-debug-stub-0.6.0.0...
Building library for ghc-debug-stub-0.6.0.0...
[1 of 1] Compiling GHC.Debug.Stub ( src/GHC/Debug/Stub.hs, /home/adam/Documents/Well-Typed/Code/ghc-debug/dist-newstyle/build/x86_64-linux/ghc-9.10.0.20240426/ghc-debug-stub-0.6.0.0/build/GHC/Debug/Stub.o, /home/adam/Documents/Well-Typed/Code/ghc-debug/dist-newstyle/build/x86_64-linux/ghc-9.10.0.20240426/ghc-debug-stub-0.6.0.0/build/GHC/Debug/Stub.dyn_o )
In file included from cbits/stub.cpp:19:0: error:
cbits/trace.h:4:42: error:
warning: ‘PRINTF’ is an unrecognized format function type [-Wformat=]
4 | __attribute__((format (PRINTF, 1, 2)));
| ^
|
4 | __attribute__((format (PRINTF, 1, 2)));
| ^
cbits/stub.cpp: In function ‘int handle_command(Socket&, const char*, uint32_t)’:
cbits/stub.cpp:747:38: error:
error: too few arguments to function ‘bool lookupIPE(const StgInfoTable*, InfoProvEnt*)’
747 | InfoProvEnt * elt = lookupIPE(info_table);
| ~~~~~~~~~^~~~~~~~~~~~
|
747 | InfoProvEnt * elt = lookupIPE(info_table);
| ^
In file included from /home/adam/.ghcup/ghc/9.10.0.20240426/lib/ghc-9.10.0.20240426/lib/../lib/x86_64-linux-ghc-9.10.0.20240426/rts-1.0.2/include/Rts.h:282,
from cbits/stub.cpp:17:0: error:
/home/adam/.ghcup/ghc/9.10.0.20240426/lib/ghc-9.10.0.20240426/lib/../lib/x86_64-linux-ghc-9.10.0.20240426/rts-1.0.2/include/rts/IPE.h:93:6: error:
note: declared here
93 | bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out);
| ^~~~~~~~~
|
93 | bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out);
| ^
`g++' failed in phase `C++ Compiler'. (Exit code: 1)
Error: [Cabal-7125]
Failed to build ghc-debug-stub-0.6.0.0.