RejectedSoftware Forums

Sign up

Getting started with vibe.d

Hello,

I'm trying to get started with vibe.d using the ldc compiler but having some trouble -- this post is copied over from d.learn:

I'm on Ubuntu 14.04/x86_64, using the latest stable dub (0.9.21).
I can create a new dub project:

$ dub init test vibe.d
Successfully created an empty project in 
'/home/csaunders/devel/csaunders/mongoSB/test'


...but then I'm having trouble building:

$ cd test
$ dub build --compiler=ldc2
vibe-d: ["vibe-d", "libevent", "openssl"]
test: ["test", "vibe-d", "libevent", "openssl"]
Building vibe-d configuration "libevent", build type debug.
FAIL 
../../../../.dub/packages/vibe-d-0.7.19/.dub/build/libevent-debug-linux.posix-x86_64-ldc2-0C180158569265198380A4CE65BB2C41 
vibe-d staticLibrary
Error executing command build: No LDC static libraries supported

...I've tried a few variations on this but haven't had any luck.
This is using the latest ldc:

$ ldc2 --version
LDC - the LLVM D compiler (0.12.1):
  based on DMD v2.063.2 and LLVM 3.3.1
  Default target: x86_64-unknown-linux-gnu
  Host CPU: corei7
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

Any pointers? libevent and libevent-dev (2.0) packages are already installed

Re: Getting started with vibe.d

On Tue, 03 Jun 2014 19:03:20 GMT, Chris Saunders wrote:

Hello,

I'm trying to get started with vibe.d using the ldc compiler but having some trouble -- this post is copied over from d.learn:

I'm on Ubuntu 14.04/x86_64, using the latest stable dub (0.9.21).

DUB 0.9.21 still has quite limited support for GDC/LDC and in particular doesn't support building static libraries. There are currently two ways to work around this:

  • Use either the --combined, or the --rdmd switch when invoking DUB. This will cause the application and vibe.d to be built in one step instead of building vibe.d as a static library.

  • Or get the latest GIT master version of DUB, which includes support for building static libraries. There will also be a new beta version of DUB 0.9.22 in the coming days, but the existing beta 1 also doesn't include the support, yet.

Re: Getting started with vibe.d

Thanks, the '--combined' argument worked and got things going with dmd 2.064+. I will revisit ldc when either the next ldc or dub versions are available.