www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Getting started with vibe.d

reply "Chris Saunders" <sencha gmail.com> writes:
I've made my first attempt to use dub/vibe.d and I'm running into 
some issues I can't find on the list.

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-0C1801585692
5198380A4CE65BB2C41 
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?
Jun 03 2014
parent reply "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Tuesday, 3 June 2014 at 16:16:10 UTC, Chris Saunders wrote:
 I've made my first attempt to use dub/vibe.d and I'm running 
 into some issues I can't find on the list.

 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-0C1801585692
5198380A4CE65BB2C41 
 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?
Just curious, can you get it to work with DMD? Also, you might consider posting on the Rejected Software forums (although this forum isn't a bad idea). http://forum.rejectedsoftware.com/
Jun 03 2014
parent reply "Chris Saunders" <sencha gmail.com> writes:
Thanks, I somehow missed the vibe.d forums...

I'd need an ldc solution in the end, but trying dmd is a good 
idea. The result is some kind of link error to libevent?:

"""
  dub build
vibe-d: ["vibe-d", "libevent", "openssl"]
test: ["test", "vibe-d", "libevent", "openssl"]
Target is up to date. Using existing build in 
/home/csaunders/.dub/packages/vibe-d-0.7.19/.dub/build/libevent-debug-linux.posix-x86_64-dmd-AB0707232CA963
5DA23C2232BBED51B/. 
Use --force to force a rebuild.
Building test configuration "application", build type debug.
Compiling...
Linking...
.dub/build/application-debug-linux.posix-x86_64-dmd-6EEB0831D66A347BFD0076DC383B442F/test.o:(.data._D162TypeInfo_S3std8typecons130__T5TupleTS3std9container54__T5ArrayTS4vibe4core7drivers9libevent212TimeoutEntryZ5ArrayVAyaa6_5f73746f7265TmVAyaa7_5f6c656e677468Z5
uple6__initZ+0x60): 
undefined reference to 
`_D3std8typecons130__T5TupleTS3std9container54__T5ArrayTS4vibe4core7drivers9libevent212TimeoutEntryZ5ArrayVAyaa6_5f73746f7265TmVAyaa7_5f6c656e677468Z5Tuple15__fieldPostBlitMFZv'
collect2: error: ld returned 1 exit status
--- errorlevel 1
FAIL 
.dub/build/application-debug-linux.posix-x86_64-dmd-6EEB0831D66A
47BFD0076DC383B442F 
test executable
Error executing command build: Link command failed with exit code 
1
"""
Jun 03 2014
parent "Craig Dillabaugh" <craig.dillabaugh gmail.com> writes:
On Tuesday, 3 June 2014 at 17:41:27 UTC, Chris Saunders wrote:
 Thanks, I somehow missed the vibe.d forums...

 I'd need an ldc solution in the end, but trying dmd is a good 
 idea. The result is some kind of link error to libevent?:

 """
  dub build
 vibe-d: ["vibe-d", "libevent", "openssl"]
 test: ["test", "vibe-d", "libevent", "openssl"]
 Target is up to date. Using existing build in 
 /home/csaunders/.dub/packages/vibe-d-0.7.19/.dub/build/libevent-debug-linux.posix-x86_64-dmd-AB0707232CA963
5DA23C2232BBED51B/. 
 Use --force to force a rebuild.
 Building test configuration "application", build type debug.
 Compiling...
 Linking...
 .dub/build/application-debug-linux.posix-x86_64-dmd-6EEB0831D66A347BFD0076DC383B442F/test.o:(.data._D162TypeInfo_S3std8typecons130__T5TupleTS3std9container54__T5ArrayTS4vibe4core7drivers9libevent212TimeoutEntryZ5ArrayVAyaa6_5f73746f7265TmVAyaa7_5f6c656e677468Z5
uple6__initZ+0x60): 
 undefined reference to 
 `_D3std8typecons130__T5TupleTS3std9container54__T5ArrayTS4vibe4core7drivers9libevent212TimeoutEntryZ5ArrayVAyaa6_5f73746f7265TmVAyaa7_5f6c656e677468Z5Tuple15__fieldPostBlitMFZv'
 collect2: error: ld returned 1 exit status
 --- errorlevel 1
 FAIL 
 .dub/build/application-debug-linux.posix-x86_64-dmd-6EEB0831D66A
47BFD0076DC383B442F 
 test executable
 Error executing command build: Link command failed with exit 
 code 1
 """
Just a guess, but do you have the dev libraries for libevent installed?
Jun 03 2014