RejectedSoftware Forums

Sign up

Pages: 1 2

Having problems with building a dub -> vibe.d project

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:

vibe-d: ["vibe-d", "libevent", "openssl"]
dwww: ["dwww", "vibe-d", "libevent", "openssl"]
Building vibe-d configuration "libevent", build type debug.
Running dmd...
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 119, string, string).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(131): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 119, string, string).log' cannot call system function 'std.array.Appender!(string).Appender.data'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(145): Error: template instance vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 119, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(119):        instantiated from here: logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 119, string, string)
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(119): Error: template instance vibe.core.log.logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 119, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 145, string, string, string).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(131): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 145, string, string, string).log' cannot call system function 'std.array.Appender!(string).Appender.data'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(145): Error: template instance vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 145, string, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(145):        instantiated from here: logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 145, string, string, string)
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(145): Error: template instance vibe.core.log.logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 145, string, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 146, string, string, string).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(131): Error: safe function 'vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 146, string, string, string).log' cannot call system function 'std.array.Appender!(string).Appender.data'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(145): Error: template instance vibe.core.log.log!(cast(LogLevel)4, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 146, string, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(146):        instantiated from here: logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 146, string, string, string)
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(146): Error: template instance vibe.core.log.logInfo!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 146, string, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 174, string, string).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(131): Error: safe function 'vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 174, string, string).log' cannot call system function 'std.array.Appender!(string).Appender.data'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(149): Error: template instance vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 174, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(174):        instantiated from here: logError!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 174, string, string)
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(174): Error: template instance vibe.core.log.logError!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 174, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 226, string, string).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(131): Error: safe function 'vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 226, string, string).log' cannot call system function 'std.array.Appender!(string).Appender.data'
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(149): Error: template instance vibe.core.log.log!(cast(LogLevel)6, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 226, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(226):        instantiated from here: logError!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 226, string, string)
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d(226): Error: template instance vibe.core.log.logError!("../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 226, string, string) error instantiating
../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/log.d(129): Error: safe function 'vibe.core.log.log!(cast(LogLevel)3, "../../root/.dub/packages/vibe-d-0.7.20/source/vibe/core/args.d", 235, string, string[]).log' cannot call system function 'std.array.appender!(string, immutable(char)).appender'
FAIL ../../root/.dub/packages/vibe-d-0.7.20/.dub/build/libevent-debug-linux.posix-x86-dmd-EABE55AD321D1A1F9C45B04757FEEB8C vibe-d staticLibrary
Error executing command run: DMD compile run failed with exit code 1

Re: Having problems with building a dub -> vibe.d project

Am 17.07.2014 18:42, schrieb Dimitar Dimitrov:

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:
(...)

Which version of DMD do you have installed? Seems like the code for
appender() differs from the one I'm using.

Re: Having problems with building a dub -> vibe.d project

On Thu, 17 Jul 2014 22:26:43 +0200, Sönke Ludwig wrote:

Am 17.07.2014 18:42, schrieb Dimitar Dimitrov:

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:
(...)

Which version of DMD do you have installed? Seems like the code for
appender() differs from the one I'm using.

DMD32 D Compiler v2.063.2

Re: Having problems with building a dub -> vibe.d project

On Thu, 17 Jul 2014 21:30:26 GMT, Dimitar Dimitrov wrote:

On Thu, 17 Jul 2014 22:26:43 +0200, Sönke Ludwig wrote:

Am 17.07.2014 18:42, schrieb Dimitar Dimitrov:

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:
(...)

Which version of DMD do you have installed? Seems like the code for
appender() differs from the one I'm using.

DMD32 D Compiler v2.063.2

I upgraded to DMD32 D Compiler v2.065

Now i am getting the following:

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

Re: Having problems with building a dub -> vibe.d project

On Fri, 18 Jul 2014 07:16:20 GMT, Dimitar Dimitrov wrote:

On Thu, 17 Jul 2014 21:30:26 GMT, Dimitar Dimitrov wrote:

On Thu, 17 Jul 2014 22:26:43 +0200, Sönke Ludwig wrote:

Am 17.07.2014 18:42, schrieb Dimitar Dimitrov:

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:
(...)

Which version of DMD do you have installed? Seems like the code for
appender() differs from the one I'm using.

DMD32 D Compiler v2.063.2

I upgraded to DMD32 D Compiler v2.065

Now i am getting the following:

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

This indicates that the compiler may have run out of memory. Unfortunately, the build process can be quite memory hungry. A way to work around that would be to get the latest 0.9.22-rc.1 version of DUB here and then use --build-mode=singleFile. Another possibility would be to enable a swap file, if the platform permits it (assuming this is a VM without a swap file).

Re: Having problems with building a dub -> vibe.d project

On Fri, 18 Jul 2014 07:50:01 GMT, Sönke Ludwig wrote:

On Fri, 18 Jul 2014 07:16:20 GMT, Dimitar Dimitrov wrote:

On Thu, 17 Jul 2014 21:30:26 GMT, Dimitar Dimitrov wrote:

On Thu, 17 Jul 2014 22:26:43 +0200, Sönke Ludwig wrote:

Am 17.07.2014 18:42, schrieb Dimitar Dimitrov:

Hello,

I am having troubles running the default vibe.d application on Ubuntu 12.04.

I installed dmd, dub, vibe.d and all dependencies. I tried to compile a "Hello world" application with dmd and it works as expected.

With dub i created a new project dub init <project-name> vibe.d The project is created as expected and when i run 'dub' from project's folder i get the following:
(...)

Which version of DMD do you have installed? Seems like the code for
appender() differs from the one I'm using.

DMD32 D Compiler v2.063.2

I upgraded to DMD32 D Compiler v2.065

Now i am getting the following:

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

This indicates that the compiler may have run out of memory. Unfortunately, the build process can be quite memory hungry. A way to work around that would be to get the latest 0.9.22-rc.1 version of DUB here and then use --build-mode=singleFile. Another possibility would be to enable a swap file, if the platform permits it (assuming this is a VM without a swap file).

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...

Re: Having problems with building a dub -> vibe.d project

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).

Re: Having problems with building a dub -> vibe.d project

Same problem. I decided to try vibed on vps.me and after `dub init web1 vibe.d` it's try to compile but fall at low memory (I have only 384 MB on server).

I tried the single-file compilation mode, it's begin to build all but then fail with error about low memory.

I do not have another copy of linux, and I am afraid that they would be incompatibility, is there other way to run dub on such config?

Re: Having problems with building a dub -> vibe.d project

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

Re: Having problems with building a dub -> vibe.d project

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

Pages: 1 2