On Tue, 23 Sep 2014 16:33:48 GMT, Sönke Ludwig wrote:

On Tue, 23 Sep 2014 16:11:35 GMT, Jan Van Uytven wrote:

I'm pretty new to vibe.d, so maybe this is something obvious. But I can't get a stock dub project with vibe.d to work on my Ubuntu server, though it works just fine on my OS X development machine. Any help in fixing this would be appreciated!

➜ ~ dub init test-vibe vibe.d
Successfully created an empty project in '/home/ysgard/test-vibe'.

➜ ~ cd test-vibe

➜ test-vibe dub
vibe-d: ["vibe-d", "libevent", "openssl"]
test-vibe: ["test-vibe", "vibe-d", "libevent", "openssl"]
Building vibe-d configuration "libevent", build type debug.
Running dmd...
FAIL ../.dub/packages/vibe-d-0.7.20/.dub/build/libevent-debug-linux.posix-x86_64-dmd-AB0707232CA963B5DA23C2232BBED51B vibe-d staticLibrary
Error executing command run: DMD compile run failed with exit code -9

This looks a lot like the infamous out-of-memory issue. Unfortunately DMD uses up a lot of RAM during compilation, so on systems with less than about 2 GB of RAM it usually fails. With the most recent version of DUB (0.9.22) you should be able to work around it using the --build-mode=singleFile switch, though, at the expense of longer compile times.

The vibe.d version coming after 0.7.21 will also be separated into multiple sub packages, so that it may consist of small enough chunks that the issue will go away without single file compilation, too. I've also heard that the most recent DMD (the latest DMD beta may apply) uses up quite a bit less memory, so that might help too.

I've setup an EC2 "micro" VM on the free plan (1cpu, 1G ram) and tried putting my project on it.

Even using singeFile I still have memory issues.

vibe.d is 0.7.21-rc.4

After building all the files:

Compiling ../../.dub/packages/vibe-d-0.7.21-rc.4/source/vibe/web/web.d...<br>Linking...<br>Error: out of memory<br>FAIL ../../.dub/packages/vibe-d-0.7.21-rc.4/.dub/build/libevent-debug-linux.posix-x86_64-dmd_2066-2161C57E83B1803FA54B8BBD5FBBBAA1/ vibe-d staticLibrary<br>Error executing command run: dmd failed with exit code 1.

Thoughts? Or will I just have to build this on another VM somewhere else and copy things over?

Thanks!

-brian