RejectedSoftware Forums

Sign up

Vibe.d dub fail

I just updated the dependencies in package.json for a project that I haven't touched in ages.

|> more package.json
{
	"name": "arcamclient",
	"description": "An Arcam AVR600 client using GtkD and Vibe.d.",
	"copyright": "Copyright © 2013, 2014  Russel Winder",
	"authors": ["Russel Winder <russel@winder.org.uk>"],
	"dependencies": {
		"vibe-d": ">=0.7.21",
		"gtk-d:gtkd": ">=2.4.2"
	}
}

and I then get:

|> dub
Target vibe-d 0.7.21 is up to date. Use --force to rebuild.
Target gtk-d:gtkd 2.4.2 is up to date. Use --force to rebuild.
Building arcamclient ~master configuration "application", build type debug.
Compiling using dmd...
Warning: -version=VibeDefaultMain will be required in the future to use vibe.d's default main(). Please update your build scripts.
Linking...
/usr/bin/ld: cannot find -levent
/usr/bin/ld: cannot find -levent_pthreads
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
--- errorlevel 1

which seems totally unfair :-) The executable not running is one thing, but the incorrect compilation is completely unexpected. All the dependent package are installed to ~/.dub:

|> ll
total 28
drwx------.  7 russel russel 4096 Dec 27 18:01 ./
drwx------.  3 russel russel 4096 Dec 21  2013 ../
drwx------  14 russel russel 4096 Dec 27 18:02 gtk-d-2.4.2/
drwx------   4 russel russel 4096 Dec 27 18:01 libev-4.0.0_4.04/
drwx------   4 russel russel 4096 Dec 27 18:01 libevent-2.0.1_2.0.16/
drwx------   4 russel russel 4096 Dec 27 18:01 openssl-1.0.0_1.0.0e/
drwx------   7 russel russel 4096 Dec 27 18:01 vibe-d-0.7.21/

Re: Vibe.d dub fail

On Sat, 27 Dec 2014 18:10:20 GMT, Russel Winder wrote:

|> dub
Target vibe-d 0.7.21 is up to date. Use --force to rebuild.
Target gtk-d:gtkd 2.4.2 is up to date. Use --force to rebuild.
Building arcamclient ~master configuration "application", build type debug.
Compiling using dmd...
Warning: -version=VibeDefaultMain will be required in the future to use vibe.d's default main(). Please update your build scripts.
Linking...
/usr/bin/ld: cannot find -levent
/usr/bin/ld: cannot find -levent_pthreads
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
--- errorlevel 1

It means you don't have the C libraries installed.
You need libevent-dev libssl-dev. See vibe.d's README (additional setup on linux).