error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Guillaume Chatelet
I'm trying to build the following helloworld on Linux Gentoo :

 import std.stdio;

void main ()

{

writefln(hello world !!);

}


invoking 'dmd hello.d -v' gives

 parse hello

semantic  hello

importobject(/opt/dmd/src/phobos/object.d)

importstd.stdio (/opt/dmd/src/phobos/std/stdio.d)

importstd.c.stdio   (/opt/dmd/src/phobos/std/c/stdio.d)

importstd.c.stddef  (/opt/dmd/src/phobos/std/c/stddef.d)

importstd.c.stdarg  (/opt/dmd/src/phobos/std/c/stdarg.d)

importstd.format(/opt/dmd/src/phobos/std/format.d)

importstd.stdarg(/opt/dmd/src/phobos/std/stdarg.d)

importstd.utf   (/opt/dmd/src/phobos/std/utf.d)

importstd.contracts (/opt/dmd/src/phobos/std/contracts.d)

importstd.conv  (/opt/dmd/src/phobos/std/conv.d)

/opt/dmd/src/phobos/std/conv.d(1468): number is not representable

importstd.string(/opt/dmd/src/phobos/std/string.d)

importstd.c.stdlib  (/opt/dmd/src/phobos/std/c/stdlib.d)

importstd.c.string  (/opt/dmd/src/phobos/std/c/string.d)

importstd.uni   (/opt/dmd/src/phobos/std/uni.d)

importstd.array (/opt/dmd/src/phobos/std/array.d)

importstd.ctype (/opt/dmd/src/phobos/std/ctype.d)

importstd.typetuple (/opt/dmd/src/phobos/std/typetuple.d)

importstd.traits(/opt/dmd/src/phobos/std/traits.d)

importstd.math  (/opt/dmd/src/phobos/std/math.d)

/opt/dmd/src/phobos/std/math.d(703): number is not representable

importstd.c.math(/opt/dmd/src/phobos/std/c/math.d)

importstd.system(/opt/dmd/src/phobos/std/system.d)

importstd.gc(/opt/dmd/src/phobos/std/gc.d)

importgcstats   (/opt/dmd/src/phobos/gcstats.d)

importstd.file  (/opt/dmd/src/phobos/std/file.d)

importstd.path  (/opt/dmd/src/phobos/std/path.d)

importstd.c.linux.linux (/opt/dmd/src/phobos/std/c/linux/linux.d)

importstd.c.linux.linuxextern
 (/opt/dmd/src/phobos/std/c/linux/linuxextern.d)

importstd.c.linux.pthread   (/opt/dmd/src/phobos/std/c/linux/pthread.d)

importstd.intrinsic (/opt/dmd/src/phobos/std/intrinsic.d)

/opt/dmd/src/phobos/std/c/linux/linux.d(444): Error: Integer constant
 expression expected instead of _SIGSET_NWORDS

/opt/dmd/src/phobos/std/c/linux/linux.d(444): Error: Integer constant
 expression expected instead of _SIGSET_NWORDS

/opt/dmd/src/phobos/std/c/linux/linux.d(444): Error: Integer constant
 expression expected instead of _SIGSET_NWORDS

/opt/dmd/src/phobos/std/c/linux/linux.d(444): Error: Integer constant
 expression expected instead of _SIGSET_NWORDS

importstd.outofmemory   (/opt/dmd/src/phobos/std/outofmemory.d)

importstd.regexp(/opt/dmd/src/phobos/std/regexp.d)

importstd.outbuffer (/opt/dmd/src/phobos/std/outbuffer.d)

importstd.bitmanip  (/opt/dmd/src/phobos/std/bitmanip.d)

importstd.metastrings   (/opt/dmd/src/phobos/std/metastrings.d)


DMD version is v2.008, gentoo ebuild is dev-lang/dmd-bin-2.008-r1

The relevant lines in linux.d file are, l.444 is 'uint[_SIGSET_NWORDS]
__val;'

 extern (C)

{

/* from pwd.h

 */


 struct passwd

{

char *pw_name;

char *pw_passwd;

uid_t pw_uid;

gid_t pw_gid;

char *pw_gecos;

char *pw_dir;

char *pw_shell;

}


 const size_t _SIGSET_NWORDS = 1024 / (8 * uint.sizeof);

struct sigset_t

{

uint[_SIGSET_NWORDS] __val;

}


 int getpwnam_r(const(char)*, passwd*, void*, size_t, passwd**);

passwd* getpwnam(in char*);

passwd* getpwuid(uid_t);

int getpwuid_r(uid_t, passwd*, char*, size_t, passwd**);

int kill(pid_t, int);

int sem_close(sem_t*);

int sigemptyset(sigset_t*);

int sigfillset(sigset_t*);

int sigismember(sigset_t*, int);

int sigsuspend(sigset_t*);

}


My linux kernel version is 2.6.35-gentoo-r10, the _SIGSET_NWORDS constant is
defined in '/usr/include/bits/sigset.h' and value is

 # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))


Is it serious doc ?

Guillaume Chatelet


Re: error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Don

Guillaume Chatelet wrote:

Alright my first post is almost unreadable so restarting with the http 
version...
Hope it's going to be better.


Why are you using version 2.008??? It was one of the first 'proof of 
concept' alpha test versions. It wasn't intended for serious use. Any 
version prior to about 2.040 was useful only for finding the most severe 
compiler bugs.


Re: error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Guillaume Chatelet
On Sat, Oct 30, 2010 at 3:33 PM, Don nos...@nospam.com wrote:

 Guillaume Chatelet wrote:

 Alright my first post is almost unreadable so restarting with the http
 version...
 Hope it's going to be better.


 Why are you using version 2.008??? It was one of the first 'proof of
 concept' alpha test versions. It wasn't intended for serious use. Any
 version prior to about 2.040 was useful only for finding the most severe
 compiler bugs.


Thx Don for the reply. It actually is the only version available for Gentoo
right now, so I'm going to see if anyone's interested in bringing a more
recent version of DMD for this distribution.


Re: error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Jonathan M Davis
On Saturday 30 October 2010 07:33:05 Guillaume Chatelet wrote:
 On Sat, Oct 30, 2010 at 3:33 PM, Don nos...@nospam.com wrote:
  Guillaume Chatelet wrote:
  Alright my first post is almost unreadable so restarting with the http
  version...
  Hope it's going to be better.
  
  Why are you using version 2.008??? It was one of the first 'proof of
  concept' alpha test versions. It wasn't intended for serious use. Any
  version prior to about 2.040 was useful only for finding the most severe
  compiler bugs.
 
 Thx Don for the reply. It actually is the only version available for Gentoo
 right now, so I'm going to see if anyone's interested in bringing a more
 recent version of DMD for this distribution.

Just download the zip file. It's easy to to just put it in your home directory 
somewhere and use it. Sure, it would be great if gentoo got a more up-to-date 
version, but you can just download it yourself and use it quite easily, and 
it's 
self-contained if you don't copy the files to /usr/bin and the like, so 
uninstalling it later is a breeze.

- Jonathan M Davis

P.S. The Bug listed isn't really intended to be posted to. The bug tracker 
sends 
notifications to this list and you sign up for the list if you want those 
notifications. You should be posting to one of the other lists like Learn or D. 
And if you have a bug that you want to report rather than looking for help on 
something, you can just report it to the tracker: http://d.puremagic.com/issues/


Re: error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Guillaume Chatelet
Thx a lot Jonathan for all the good news.
I thought only the rpms were actually containing the binaries and the zip only 
a source archive for people to build
locally. As you might know rpms are not really the Gentoo's philosophy so I 
wanted to stick to Gentoo's portage. I
just gave a try to the zip and you're right, it's working like a breeze : )

I'm a newcomer to D and actually enjoying Andrei's book. Right now it feels to 
me like the language I'm dreaming of
for years : terse, expressive, efficient. Let's see if it's true in the long 
run.

Thanks also for pointing out the bug reporting strategy, I noticed the way my 
messages appeared in the list was
quite different from the other and I was telling to myself I was surely out the 
normal path.

Guillaume