dmd out of memory compiling vibed project
krzaq
dlangmailinglist at krzaq.cc
Wed May 22 15:54:39 UTC 2019
On Wednesday, 22 May 2019 at 14:11:07 UTC, Anonymouse wrote:
> On Wednesday, 22 May 2019 at 13:25:00 UTC, krzaq wrote:
>> On Wednesday, 22 May 2019 at 13:09:37 UTC, Suliman wrote:
>>> Absolutely same problem. -lowmem did not get any affect on my
>>> VPS (1GB ram). I was able to compile project only in
>>> singleFile mode.
>>
>> In those situations you can go with a swapfile.
>
> Does it circumvent process memory limits? Regardless it's not
> an option if you're dealing with CI and you don't have the
> neccessary permissions.
>
> $ dub build
> Performing "debug" build using /usr/bin/dmd for x86_64.
> cachetools 0.1.2: building configuration "library"...
> requests 1.0.8: building configuration "std"...
> kameloso 1.1.3+commit.66.g4c07959f: building configuration
> "posix"...
> Killed
> /usr/bin/dmd failed with exit code 137.
>
> $ fallocate -l 4G /tmp/swapfile
> $ chmod 600 /tmp/swapfile
> $ mkswap /tmp/swapfile
> Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
> no label, UUID=7112294b-812a-4765-a3b9-41aa545daa70
> $ sudo swapon /tmp/swapfile
> swapon: /tmp/swapfile: insecure file owner 3434, 0 (root)
> suggested.
> swapon: /tmp/swapfile: swapon failed: Operation not permitted
Unless it's a 32-bit process, then it should help. That's what I
did when I built geordi on a 512MB DigitalOcean droplet, and it
allowed me to have a successful compilation.
As for CI - I have no suggestions outside of "get a beefier one".
More information about the Digitalmars-d
mailing list