RejectedSoftware Forums

Sign up

Can't run examples

Hi, i have installed vibed with git clone ...; ./setup-mac.sh and i can't run the examples on my mac. I got:

vela3:rest sin$ pwd
/Users/sin/Projekte/vibe.d/examples/rest

vela3:rest sin$ vibe
/Users/sin/Projekte/vibe.d/bin/../source/vibe/http/fileserver.d(29): Error: undefined identifier hours
Failed: 'dmd' '-g' '-w' '-property' '-version=VibeLibeventDriver' '-I/Users/sin/Projekte/vibe.d/bin/../source' '-L-L/opt/local/lib' '-L-levent_pthreads' '-L-levent' '-L-L/opt/local/lib' '-L-lssl' '-L-lcrypto' '-Jviews' '-Isource' '-v' '-o-' '/tmp/vpm.d' '-I/tmp'

vela3:rest sin$ dmd -v
DMD64 D Compiler v2.062
Copyright (c) 1999-2012 by Digital Mars written by Walter Bright
[cut]

I think this is a version missmatch between dmd and current vibed snapshot. Is this a know issue?

Regards,

Simas

Re: Can't run examples

Am 15.04.2013 15:05, schrieb simas:

Hi, i have installed vibed with git clone ...; ./setup-mac.sh and i can't run the examples on my mac. I got:

vela3:rest sin$ pwd
/Users/sin/Projekte/vibe.d/examples/rest

vela3:rest sin$ vibe
/Users/sin/Projekte/vibe.d/bin/../source/vibe/http/fileserver.d(29): Error: undefined identifier hours
Failed: 'dmd' '-g' '-w' '-property' '-version=VibeLibeventDriver' '-I/Users/sin/Projekte/vibe.d/bin/../source' '-L-L/opt/local/lib' '-L-levent_pthreads' '-L-levent' '-L-L/opt/local/lib' '-L-lssl' '-L-lcrypto' '-Jviews' '-Isource' '-v' '-o-' '/tmp/vpm.d' '-I/tmp'

vela3:rest sin$ dmd -v
DMD64 D Compiler v2.062
Copyright (c) 1999-2012 by Digital Mars written by Walter Bright
[cut]

I think this is a version missmatch between dmd and current vibed snapshot. Is this a know issue?

Regards,

Simas

I couldn't reproduce the specific compiler error with "hours", but
building with "vibe" was generally broken since some days. I've fixed up
the build script now, added a deprecation message (it will hopefully
disappear some time in the coming months) and now it successfully builds
for me.

Can you retest if you still get that error?

Re: Can't run examples

On Tue, 16 Apr 2013 13:17:00 +0200, Sönke Ludwig wrote:

Can you retest if you still get that error?

After an git fetch i got the same error. Then i reinstalled dmd. I use the DMD OSX installer. Now i got a different error message:

vela3:vibe.d sin$ vibe examples/diet/
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

object.Exception@/Users/sin/Projekte/vibe.d/bin/../source/vibe/data/json.d(692): Trying to access JSON of type Int as string.

Can you help me?

Re: Can't run examples

Am 17.04.2013 10:44, schrieb simas:

On Tue, 16 Apr 2013 13:17:00 +0200, Sönke Ludwig wrote:

Can you retest if you still get that error?

After an git fetch i got the same error. Then i reinstalled dmd. I use the DMD OSX installer. Now i got a different error message:

Seems like the installer still doesn't clean up before it extracts new
files, which sometimes causes old files to be picked up. I totally
forgot that this could be the issue, because I routinely uninstall on
Mac now before installing new dmd versions.

vela3:vibe.d sin$ vibe examples/diet/
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

object.Exception@/Users/sin/Projekte/vibe.d/bin/../source/vibe/data/json.d(692): Trying to access JSON of type Int as string.

Can you help me?

Turns out that a few things about privilege lowering were broken, too
(in this case the default /etc/vibe.conf contains numeric user/group IDs
and parsing of those failed). After the next "git pull" everything
should work now.

Re: Can't run examples

On Wed, 17 Apr 2013 11:09:04 +0200, Sönke Ludwig wrote:

Turns out that a few things about privilege lowering were broken, too
(in this case the default /etc/vibe.conf contains numeric user/group IDs
and parsing of those failed). After the next "git pull" everything
should work now.

Next try:

vela3:vibe.d sin$ git pull
Already up-to-date.
vela3:vibe.d sin$ git status
On branch master
nothing to commit (working directory clean)
vela3:vibe.d sin$ vibe examples/diet/
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

Error executing command 'examples/diet/': Command is unknown.

Usage: vibe [<command>] [<vibe options...>] [-- <application options...>]
[CUT]

vela3:vibe.d sin$ vibe run --verbose examples/diet/
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

[0E869E01:00000000 dia] libevent version: 2.0.21-stable
[0E869E01:00000000 dia] libevent is using kqueue for events.
[0E869E01:00000000 dbg] Using vpm registry url 'http://registry.vibed.org/'
[0E869E01:00000000 dbg] Could not open vpm.json: Failed to open file '/Users/sin/Projekte/vibe.d/vpm.json'.
[0E869E01:00000000 dbg] opened file /Users/sin/Projekte/vibe.d/package.json with 1683 bytes as 7
Checking dependencies in '/Users/sin/Projekte/vibe.d'
[0E869E01:00000000 dbg] vpm initialized
[0E869E01:00000000 dbg] Application Name is 'app'
[0E869E01:00000000 dbg] opened file /var/folders/33/d0whv8kn1gb926ng6v6tvsr0000gn/T/vpm.start.XXXXXXXX.91KdmYLS with 0 bytes as 7
Error: cannot read file source/app.d
Failed: 'dmd' '-debug' '-g' '-w' '-property' '-g' '-I/Users/sin/Projekte/vibe.d/source' '-I/Users/sin/Projekte/vibe.d/import' '-Isource' '-Jviews' '-Isource' '-Jviews' '-Iimport' '-Isource' '-L-L/opt/local/lib' '-L-levent
pthreads' '-L-levent' '-L-L/opt/local/lib' '-L-lssl' '-L-lcrypto' '-version=VibeLibeventDriver' '-v' '-o-' 'source/app.d' '-Isource'

Re: Can't run examples

I got it:

vela3:vibe.d sin$ cd examples/diet/
vela3:diet sin$ vibe
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

Checking dependencies in '/Users/sin/Projekte/vibe.d/examples/diet'
Compiling diet template 'diet.dt' (compat)...
Compiling diet template 'diet.dt' (compat)...
Listening for HTTP requests on :::8080
[0C879E01:00000000 WRN] Failed to listen on 0.0.0.0:8080
Running event loop...

Re: Can't run examples

The error message in this run should probably be a lot clearer, but it's
wasted time to replicate that work for VPM, as DUB already gives a
proper error message:

vela3:vibe.d sin$ vibe run --verbose examples/diet/
Notice: This VPM build script is deprecated. It is recommended to
use DUB instead.
See https://github.com/rejectedsoftware/dub

[0E869E01:00000000 dia] libevent version: 2.0.21-stable
[0E869E01:00000000 dia] libevent is using kqueue for events.
[0E869E01:00000000 dbg] Using vpm registry url 'http://registry.vibed.org/'
[0E869E01:00000000 dbg] Could not open vpm.json: Failed to open file '/Users/sin/Projekte/vibe.d/vpm.json'.
[0E869E01:00000000 dbg] opened file /Users/sin/Projekte/vibe.d/package.json with 1683 bytes as 7
Checking dependencies in '/Users/sin/Projekte/vibe.d'
[0E869E01:00000000 dbg] vpm initialized
[0E869E01:00000000 dbg] Application Name is 'app'
[0E869E01:00000000 dbg] opened file /var/folders/33/d0whv8kn1gb926ng6v6tvsr0000gn/T/vpm.start.XXXXXXXX.91KdmYLS with 0 bytes as 7
Error: cannot read file source/app.d
Failed: 'dmd' '-debug' '-g' '-w' '-property' '-g' '-I/Users/sin/Projekte/vibe.d/source' '-I/Users/sin/Projekte/vibe.d/import' '-Isource' '-Jviews' '-Isource' '-Jviews' '-Iimport' '-Isource' '-L-L/opt/local/lib' '-L-levent
pthreads' '-L-levent' '-L-L/opt/local/lib' '-L-lssl' '-L-lcrypto' '-version=VibeLibeventDriver' '-v' '-o-' 'source/app.d' '-Isource'

It should say something like "There was no source/app.d file found,
please run vibe from the root of a package directory".

Glad to see that at least it finally works again now.