Skip to content

OpenGLRaw fails to build with 'split-sections: True' on Windows/amd64 10

I've tried to compile OpenGLRaw v3.3.4.0 (cabal install OpenGL-3.0.2.2) using GHC and Cabal, with split-sections: True enabled on cabal/config in Windows/amd64 v10, but the process fails with the following message (similar in both versions of GHC/Cabal used):

[...]
[617 of 617] Compiling Graphics.GL      ( src\Graphics\GL.hs, dist\build\Graphics\GL.o )
C:\Program Files\GHC-8.6.5\lib\../mingw/bin\ld.exe: dist\build\HSOpenGLRaw-3.3.4.0-LbLzAQRjVYc4uE4RgrZjxe.o: too many sections (67760)
C:\Program Files\GHC-8.6.5\lib\../mingw/bin\ld.exe: final link failed: File too big
cabal: Leaving directory 'C:\Users\<user>\AppData\Local\Temp\cabal-tmp-3204\OpenGLRaw-3.3.4.0'
cabal.exe: Error: some packages failed to install:
GLURaw-2.0.0.4-10KgZckuPJf43gcTUy3nI3 depends on GLURaw-2.0.0.4 which failed to install.
OpenGL-3.0.2.2-OUWLGivwn055CFreNyTxD depends on OpenGL-3.0.2.2 which failed to install.
OpenGLRaw-3.3.4.0-LbLzAQRjVYc4uE4RgrZjxe failed during the building phase. The exception was:
ExitFailure 1

The same problem also appears using the last Haskell Platform installer (HaskellPlatform-8.6.5-core-x86_64-setup.exe).

Software used:

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information