Hello!
I'm using d-apt in order to install dmd and vibe (my OS - Debian Squeeze).
Problem:
Vibe refuses to start with the following reason:
/opt/vibe/source/vibe/core/args.d(50): Error: undefined identifier getgrgid, did you mean function getgruid?
Line 50 of args.d looks like:
enforce(getgrgid(gid) !is null, "Invalid group id!");
So i guess, dmd can't find the declaration of getgrgid while it parses this line.
Slightly above in the same module, I found the following:
static if( __traits(compiles, {import core.sys.posix.grp;}) ){ import core.sys.posix.grp; } else { extern(C){ struct group { char* gr_name; char* gr_passwd; gid_t gr_gid; char** gr_mem; } group* getgrgid(gid_t); group* getgrnam(in char*); } }
I can see that static if condition is satisfied and module just imports core.sys.posix.grp, in which i found the commented out declaration of getgrgid() and something :(
/* struct group { char* gr_name; char* gr_passwd; gid_t gr_gid; char** gr_mem; } group* getgrnam(in char*); group* getgrgid(gid_t); */
Question:
This problem can be temporarily resolved in a number of ways (or crutches), but maybe there is already an optimal solution, or "developer recommendations" or just a sensible idea?
Thanks in advance.
P.S. Sorry for my english.