On Sat, 22 Nov 2014 20:22:56 GMT, Eric West wrote:

On Fri, 18 Jul 2014 20:56:16 GMT, Sönke Ludwig wrote:

On Fri, 18 Jul 2014 08:41:54 GMT, Dimitar Dimitrov wrote:

I tried both - got DUB 0.9.22-rc.1 and ran dub --build-mode=singleFile It ran out of memory again. Then i created a 4GB swap file and tried with that but again out of memory.

I am using DigitalOcean droplet with 512MB of RAM...

Hmm, I would have expected single-file compilation to work, a 4 GB swap file should also definitely be enough for the normal combined compilation, on 64-bit Linux, it takes about 1.2 GB (just to be sure, did you check with "free" that the swap file got mounted correctly?). But maybe it's something else that causes the process to get killed (exit code -9 indicates that dmd was probably terminated by a SIGKILL, and out-of-memory is just the most common reason). /var/log/kern.log or dmesg might contain additional information.

If nothing else helps, you could of course always compile on a workstation and just upload the binary (which also has the advantage that the application source code can't be leaked, should the server ever be compromised).

I'm just trying to build ddox, and I'm getting the
same error with 32G of memory and 32G of swap.

-Eric

Actually I'm not getting the same error - I'm getting:
Running dmd...
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/core/drivers/libevent2.d(1408): Error: template std.array.split cannot deduce function from argument types !("seconds", "usecs")(Duration, long, long), candidates are:
/opt/dmd/include/d2/std/array.d(1470): std.array.split(S)(S s) if (isSomeString!S)
/opt/dmd/include/d2/std/array.d(1550): std.array.split(R, E)(R r, E delim) if (isForwardRange!R && is(typeof(ElementType!R.init == E.init)))
/opt/dmd/include/d2/std/array.d(1560): std.array.split(R1, R2)(R1 r, R2 delim) if (isForwardRange!R1 && isForwardRange!R2 && is(typeof(ElementType!R1.init == ElementType!R2.init)))
/opt/dmd/include/d2/std/array.d(1571): std.array.split(alias isTerminator, R)(R r) if (isForwardRange!R && is(typeof(unaryFun!isTerminator(r.front))))
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/data/serialization.d(184): Error: static assert "All serializers must support string values."
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/data/serialization.d(115): instantiated from here: serializeImpl!(BsonSerializer, int[string], )
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/data/serialization.d(109): instantiated from here: serialize!(BsonSerializer, int[string])
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/data/bson.d(957): instantiated from here: serialize!(BsonSerializer, int[string], ubyte[])
../../.dub/packages/vibe-d-0.7.21-alpha.4/source/vibe/db/mongo/collection.d(292): instantiated from here: serializeToBson!(int[string])
FAIL ../../.dub/packages/vibe-d-0.7.21-alpha.4/.dub/build/libevent-debug-linux.posix-x8664-dmd2066-4D666FCF51BC4B08EC31C88F12373FF7/ vibe-d staticLibrary
Error executing command run:
dmd failed with exit code 1.

Using: DMD64 D Compiler v2.066-devel-38c5c36

-Eric