D compiler is eating all the memory when compiling and then out of memory!
dangbinghoo
dangbinghoo at gmail.com
Sat May 9 03:54:29 UTC 2020
hi,
I have tried to build the hunt-sql package on Windows 7
32bit(with 3GB RAM), dmd and ldc2 both failed with default option
"out of memory".
And after trying with `dub build-mode=singleFile`, dmd compiles
all the .d file, but "out of memory" when linking. and ldc2 says
'single linking is not supported'.
we should at least compiles the program, we need to use memory
the OS gived to US, not just "out of memory" and then quit.
and I tried to supply gc options to dmd and ldc2 it self, has no
effects at all.
detailed err info:
----------------------------------------------------------------------------------------------------
dub build hunt-sql --build-mode=singleFile --compile=dmd
Compiling
..\AppData\Local\dub\packages\hunt-sql-1.0.7\hunt-sql\source\hunt\sql\visitor\functions\Ucase.d...
Compiling
..\AppData\Local\dub\packages\hunt-sql-1.0.7\hunt-sql\source\hunt\sql\visitor\functions\Unhex.d...
Compiling
..\AppData\Local\dub\packages\hunt-sql-1.0.7\hunt-sql\source\hunt\sql\visitor\functions\package.d...
Compiling
..\AppData\Local\dub\packages\hunt-sql-1.0.7\hunt-sql\source\hunt\sql\visitor\package.d...
Linking...
---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the
information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help
with the reduction.
---
DMD v2.087.1
predefs DigitalMars Windows CRuntime_Microsoft
CppRuntime_Microsoft LittleEndian D_Version2 all D_InlineAsm
D_InlineAsm_X86 X86 Win32 assert D_ModuleInfo D_Exceptions
D_TypeInfo D_HardFloat
binary C:\D\dmd2\windows\bin\dmd.exe
version v2.087.1
config C:\D\dmd2\windows\bin\sc.ini
DFLAGS -IC:\D\dmd2\windows\bin\..\..\src\phobos
-IC:\D\dmd2\windows\bin\..\..\src\druntime\import -lowmem
'--DRT-gcopt=profile:1 maxPoolSize:1024' -L/OPT:NOICF
---
core.exception.OutOfMemoryError at src\core\exception.d(702): Memory
allocation failed
----------------
0x005F7DBC
0x005956FC
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
----------------------------------------------------------------------------------------------------
dub build hunt-sql --build-mode=singleFile --compiler=ldc2
Compiling
..\AppData\Local\dub\packages\hunt-sql-1.0.7\hunt-sql\source\hunt\sql\visitor\package.d...
Linking...
Separate linking not implemented for LDC
# ldc2 --version
LDC - the LLVM D compiler (1.17.0):
based on DMD v2.087.1 and LLVM 8.0.1
built with LDC - the LLVM D compiler (1.17.0)
Thanks!
~~~~~
binghoo dang
More information about the Digitalmars-d
mailing list