RejectedSoftware Forums

Sign up

is subConfigurations working?

I keep getting errors with this:

(DMD 2.063, OSX 10.7)

{
"description": "An example project skeleton",
"authors": [
    "Your Name"
],
"subConfigurations": {"vibe-d": "libevent"},
"dependencies": {
    "vibe-d": "==0.7.15"
},
"homepage": "http://example.org",
"name": "test_http_hi",
"copyright": "Copyright © 2000, Your Name"
}

It complains that "No event driver is available. Please specify a -version=Vibe*Driver..., even though it's specified in the package.json.

When I try the command line with --config=libevent:

Error: opApply may only be called on objects, not Array.

How can I get vibe.d to work?
Thanks,
NMS

Re: is subConfigurations working?

Am 08.06.2013 21:29, schrieb Nathan M. Swan:

I keep getting errors with this:

(DMD 2.063, OSX 10.7)

{
"description": "An example project skeleton",
"authors": [
    "Your Name"
],
"subConfigurations": {"vibe-d": "libevent"},
"dependencies": {
    "vibe-d": "==0.7.15"
},
"homepage": "http://example.org",
"name": "test_http_hi",
"copyright": "Copyright © 2000, Your Name"
}

It complains that "No event driver is available. Please specify a -version=Vibe*Driver..., even though it's specified in the package.json.

It's supposed to be working (assuming you are using DUB to build and not
"$ vibe"). Can you paste the output of "dub build -v"?

When I try the command line with --config=libevent:

Error: opApply may only be called on objects, not Array.


Using DUB master, I get "Error: Unknown build configuration: libevent".
This is the expected behavior now since a while, as only the
configurations of the root package are available for selection (a
convenient way to forward all configurations of a dependency is planned,
though).

If you haven't already, I would try to "./build.sh" the git master
version of DUB and try with that. But I'll also put out a new release
shortly and test everything again.

Re: is subConfigurations working?

On Sat, 15 Jun 2013 18:38:20 +0200, Sönke Ludwig wrote:

Am 08.06.2013 21:29, schrieb Nathan M. Swan:

I keep getting errors with this:

(DMD 2.063, OSX 10.7)

{
"description": "An example project skeleton",
"authors": [
    "Your Name"
],
"subConfigurations": {"vibe-d": "libevent"},
"dependencies": {
    "vibe-d": "==0.7.15"
},
"homepage": "http://example.org",
"name": "test_http_hi",
"copyright": "Copyright © 2000, Your Name"
}

It complains that "No event driver is available. Please specify a -version=Vibe*Driver..., even though it's specified in the package.json.

It's supposed to be working (assuming you are using DUB to build and not
"$ vibe"). Can you paste the output of "dub build -v"?

When I try the command line with --config=libevent:

Error: opApply may only be called on objects, not Array.


Using DUB master, I get "Error: Unknown build configuration: libevent".
This is the expected behavior now since a while, as only the
configurations of the root package are available for selection (a
convenient way to forward all configurations of a dependency is planned,
though).

If you haven't already, I would try to "./build.sh" the git master
version of DUB and try with that. But I'll also put out a new release
shortly and test everything again.

Using build.sh, the following happens:

Nathans-MacBook-Pro:test_http_hi nathanmswan$ dub build -v
Using dub registry url 'http://registry.vibed.org/'
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/nathanmswan/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/nathanmswan/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/nathanmswan/.dub/packages/
Looking for local package map at /var/lib/dub/packages/
Looking for local package map at /Users/nathanmswan/.dub/packages/
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/Users/nathanmswan/Source/test_http_hi/.git'

Failed to determine version of package test_http_hi at /Users/nathanmswan/Source/test_http_hi. Assuming ~master.
Collecting dependencies for test_http_hi
Found dependency vibe-d ~master: true
Collecting dependencies for vibe-d
Found dependency libevent ~master: true
Collecting dependencies for libevent
Found dependency libev ~master: true
Collecting dependencies for libev
Found dependency openssl ~master: true
Collecting dependencies for openssl
Checking dependencies in '/Users/nathanmswan/Source/test_http_hi'
dub initialized
Required package 'libevent' found with version '~master'
Required package 'vibe-d' found with version '~master'
Required package 'libev' found with version '~master'
Required package 'openssl' found with version '~master'
Generating using build
Using config application for test_http_hi
Using config libevent for vibe-d
Using config library for libevent
Using config library for libev
Using config library for openssl
Building configuration "application", build type debug
Application output name is '/Users/nathanmswan/Source/test_http_hi/test_http_hi'
Trying to use pkg-config to resolve library flags for ["event", "event_pthreads", "ev", "ssl", "crypto"].
pkg-config failed: pkg-config exited with error code 1
Falling back to direct -lxyz flags.
Trying to use pkg-config to resolve library flags for [].
pkg-config failed: pkg-config exited with error code 1
Falling back to direct -lxyz flags.
Running dmd (compile)...
dmd -w -g -debug -c -of/Users/nathanmswan/Source/test_http_hi/temp.o -version=VibeLibeventDriver -version=LIBEV4 -version=Have_vibe_d -version=Have_libevent -version=Have_libev -version=Have_openssl -I/Users/nathanmswan/Source/test_http_hi/source -I/Users/nathanmswan/.dub/packages/vibe-d-master/source -I/Users/nathanmswan/.dub/packages/libevent-master -I/Users/nathanmswan/.dub/packages/libev-master -I/Users/nathanmswan/.dub/packages/openssl-master -J/Users/nathanmswan/Source/test_http_hi/views source/app.d ../../.dub/packages/vibe-d-master/source/vibe/appmain.d ../../.dub/packages/vibe-d-master/source/vibe/core/args.d ../../.dub/packages/vibe-d-master/source/vibe/core/concurrency.d ../../.dub/packages/vibe-d-master/source/vibe/core/connectionpool.d ../../.dub/packages/vibe-d-master/source/vibe/core/core.d ../../.dub/packages/vibe-d-master/source/vibe/core/driver.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/libev.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/libevent2.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/libevent2_tcp.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/threadedfile.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/win32.d ../../.dub/packages/vibe-d-master/source/vibe/core/drivers/winrt.d ../../.dub/packages/vibe-d-master/source/vibe/core/file.d ../../.dub/packages/vibe-d-master/source/vibe/core/log.d ../../.dub/packages/vibe-d-master/source/vibe/core/net.d ../../.dub/packages/vibe-d-master/source/vibe/core/stream.d ../../.dub/packages/vibe-d-master/source/vibe/core/sync.d ../../.dub/packages/vibe-d-master/source/vibe/core/task.d ../../.dub/packages/vibe-d-master/source/vibe/crypto/passwordhash.d ../../.dub/packages/vibe-d-master/source/vibe/d.d ../../.dub/packages/vibe-d-master/source/vibe/data/bson.d ../../.dub/packages/vibe-d-master/source/vibe/data/json.d ../../.dub/packages/vibe-d-master/source/vibe/data/utils.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/client.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/collection.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/connection.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/cursor.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/database.d ../../.dub/packages/vibe-d-master/source/vibe/db/mongo/mongo.d ../../.dub/packages/vibe-d-master/source/vibe/db/redis/redis.d ../../.dub/packages/vibe-d-master/source/vibe/http/auth/basic_auth.d ../../.dub/packages/vibe-d-master/source/vibe/http/client.d ../../.dub/packages/vibe-d-master/source/vibe/http/common.d ../../.dub/packages/vibe-d-master/source/vibe/http/dist.d ../../.dub/packages/vibe-d-master/source/vibe/http/fileserver.d ../../.dub/packages/vibe-d-master/source/vibe/http/form.d ../../.dub/packages/vibe-d-master/source/vibe/http/log.d ../../.dub/packages/vibe-d-master/source/vibe/http/proxy.d ../../.dub/packages/vibe-d-master/source/vibe/http/rest.d ../../.dub/packages/vibe-d-master/source/vibe/http/restutil.d ../../.dub/packages/vibe-d-master/source/vibe/http/router.d ../../.dub/packages/vibe-d-master/source/vibe/http/server.d ../../.dub/packages/vibe-d-master/source/vibe/http/session.d ../../.dub/packages/vibe-d-master/source/vibe/http/status.d ../../.dub/packages/vibe-d-master/source/vibe/http/websockets.d ../../.dub/packages/vibe-d-master/source/vibe/inet/message.d ../../.dub/packages/vibe-d-master/source/vibe/inet/mimetypes.d ../../.dub/packages/vibe-d-master/source/vibe/inet/path.d ../../.dub/packages/vibe-d-master/source/vibe/inet/url.d ../../.dub/packages/vibe-d-master/source/vibe/inet/urltransfer.d ../../.dub/packages/vibe-d-master/source/vibe/inet/webform.d ../../.dub/packages/vibe-d-master/source/vibe/internal/std/process.d ../../.dub/packages/vibe-d-master/source/vibe/mail/smtp.d ../../.dub/packages/vibe-d-master/source/vibe/stream/base64.d ../../.dub/packages/vibe-d-master/source/vibe/stream/counting.d ../../.dub/packages/vibe-d-master/source/vibe/stream/memory.d ../../.dub/packages/vibe-d-master/source/vibe/stream/operations.d ../../.dub/packages/vibe-d-master/source/vibe/stream/ssl.d ../../.dub/packages/vibe-d-master/source/vibe/stream/zlib.d ../../.dub/packages/vibe-d-master/source/vibe/templ/diet.d ../../.dub/packages/vibe-d-master/source/vibe/templ/parsertools.d ../../.dub/packages/vibe-d-master/source/vibe/templ/utils.d ../../.dub/packages/vibe-d-master/source/vibe/textfilter/html.d ../../.dub/packages/vibe-d-master/source/vibe/textfilter/markdown.d ../../.dub/packages/vibe-d-master/source/vibe/textfilter/urlencode.d ../../.dub/packages/vibe-d-master/source/vibe/utils/array.d ../../.dub/packages/vibe-d-master/source/vibe/utils/hashmap.d ../../.dub/packages/vibe-d-master/source/vibe/utils/memory.d ../../.dub/packages/vibe-d-master/source/vibe/utils/string.d ../../.dub/packages/vibe-d-master/source/vibe/utils/validation.d ../../.dub/packages/vibe-d-master/source/vibe/vibe.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/dependency.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/installation.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/packagesupplier.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/registry.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/utils.d ../../.dub/packages/vibe-d-master/source/vibe/vpm/vpm.d
Linking...
dmd -of/Users/nathanmswan/Source/test_http_hi/test_http_hi /Users/nathanmswan/Source/test_http_hi/temp.o -L-levent -L-levent_pthreads -L-lev -L-lssl -L-lcrypto -g
ld: library not found for -lev
collect2: ld returned 1 exit status
--- errorlevel 1
Error: Link command failed with exit code 1

Full exception: object.Exception@source/dub/compilers/dmd.d(118): Link command failed with exit code 1
----------------
5   dub                                 0x000000010451be7b pure @safe bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) + 107
6   dub                                 0x0000000104506313 void dub.compilers.dmd.DmdCompiler.invokeLinker(const(dub.compilers.compiler.BuildSettings), const(dub.compilers.compiler.BuildPlatform), immutable(char)[][]) + 987
7   dub                                 0x0000000104509e7e void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings) + 5062
8   dub                                 0x00000001044e75d8 void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings) + 160
9   dub                                 0x00000001044dd60d _Dmain + 6017
10  dub                                 0x00000001045c5ba1 extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain() + 33
11  dub                                 0x00000001045c56ed extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
12  dub                                 0x00000001045c5bed extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll() + 61
13  dub                                 0x00000001045c56ed extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45
14  dub                                 0x00000001045c56a1 _d_run_main + 457
15  dub                                 0x00000001045c54d0 main + 20
16  dub                                 0x00000001044dbe84 start + 52
17  ???                                 0x0000000000000003 0x0 + 3
Run 'dub help' for usage information.

I can wait for the next release; I'm going on a 2-week vacation with no internet (yikes).

Thanks,
NMS

Re: is subConfigurations working?

I've prepared a new DUB release that should fix both issues:

Using build.sh, the following happens:

(...)
ld: library not found for -lev
(...)

This is now fixed for vibe.d master by putting the libev dependency only in the "libev" configuration instead of as a global dependency (new DUB feature). A new tagged release of vibe.d will also be out shortly.

The other issue that seemingly required manually adding the indirect dependencies had, I think, actually a different cause. When I tried to reproduce this, it failed to download the dependency on the first run, but succeeded on the second, no matter if the dependencies were all specified or not. So hopefully this part is also fixed for the latest DUB version.

I can wait for the next release; I'm going on a 2-week vacation with no internet (yikes).

I just came back from such a vacation (albeit just over a week). It was a very relaxing time... that is, until you come back to the work that piled up, of course :)