www.digitalmars.com         C & C++   DMDScript  

D.gnu - 64-bit gdc on AMD Opteron?

reply dslate patrec.com writes:
I am trying to build a D compiler using gcc-3.4.3 and gdc-0.10.  I
seem to have it working on a Pentium-III machine running Redhat 7.2
(it compiles and runs sieve.d), but am having problems building a
64-bit version on an AMD Opteron workstation running SUSE Professional
Linux 9.1.  Various assertions are failing in the phobos build, and I
did find a message from David Friedman dated last October about gdc
not being 64-bit clean.  Does David or anyone else know what the
current status is of gdc on the AMD-64 (or x86-64) architecture?

P.S. I am an experienced C programmer who is looking for something
better.  C++ is too complicated for my tastes, and while I like
Python, it's way too slow for my applications.  D looks pretty good,
and I wish the developers best of luck in getting it widely adopted.

Thanks,

-- Dave Slate
dslate patrec.com

Dave Slate
dslate patrec.com
Mar 26 2005
next sibling parent Manfred Hansen <manfred toppoint.de> writes:
dslate patrec.com wrote:

 I am trying to build a D compiler using gcc-3.4.3 and gdc-0.10.  I
 seem to have it working on a Pentium-III machine running Redhat 7.2
 (it compiles and runs sieve.d), but am having problems building a
 64-bit version on an AMD Opteron workstation running SUSE Professional
 Linux 9.1.  Various assertions are failing in the phobos build, and I
 did find a message from David Friedman dated last October about gdc
 not being 64-bit clean.  Does David or anyone else know what the
 current status is of gdc on the AMD-64 (or x86-64) architecture?
 
 P.S. I am an experienced C programmer who is looking for something
 better.  C++ is too complicated for my tastes, and while I like
 Python, it's way too slow for my applications.  D looks pretty good,
 and I wish the developers best of luck in getting it widely adopted.
 
 Thanks,
 
 -- Dave Slate
 dslate patrec.com
 
 Dave Slate
 dslate patrec.com
I have only successful compiled gdc in a chroot environment on a AMD-64 Machine. Here is my configure ../gcc-3.4.3/configure --enable-languages=c,d,c++ --prefix=/usr/local/gcc-3.4.3 --target=i686-pc-linux-gnu --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --enable-shared Phobos compiled without any problems in the chroot environment. Manfred
Mar 27 2005
prev sibling next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Dave Slate wrote:

 I am trying to build a D compiler using gcc-3.4.3 and gdc-0.10.  I
 seem to have it working on a Pentium-III machine running Redhat 7.2
 (it compiles and runs sieve.d), but am having problems building a
 64-bit version on an AMD Opteron workstation running SUSE Professional
 Linux 9.1.  Various assertions are failing in the phobos build, and I
 did find a message from David Friedman dated last October about gdc
 not being 64-bit clean.  Does David or anyone else know what the
 current status is of gdc on the AMD-64 (or x86-64) architecture?
I believe that DMD and Phobos itself is *not* 64-bit clean, and GDC is merely echoing this fact when building the front-end/runtime-lib. Trying to get a PPC64 build going myself, but I need a fully 64 OS first (at the moment I only have 32-bit Mac OS X and 32-bit Linux) But I do think it's upstream (too) ? --anders
Mar 27 2005
parent reply Benjamin Herr <ben 0x539.de> writes:
Anders F Björklund wrote:
 I believe that DMD and Phobos itself is *not* 64-bit clean, and GDC
 is merely echoing this fact when building the front-end/runtime-lib.
I think that gdc is actually very close to being clean, "fixing" only <built-dir>/gcc/d/dmd/lexer.c:1533 and <built-dir>/gcc/d/dmd/aggregate.h:197 got it to compile here. However Phobos seems very "broken". Would it not be easier to maintain Phobos if we finally reorganised the standard library after all these years, so the things that are vital to the language and required to compile simple programs are separated from tools and convenience wrappers?
 Trying to get a PPC64 build going myself, but I need a fully 64 OS
 first (at the moment I only have 32-bit Mac OS X and 32-bit Linux)
Gentoo has quite cool 64bit support.
 --anders
--funroll-loops
Mar 28 2005
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Benjamin Herr wrote:

 Gentoo has quite cool 64bit support.
Yeah, I'm installing Gentoo 2005.0 in a chroot on my Yellow Dog Linux... Then you can bet I'll "emerge gdc" ;-) http://bugs.gentoo.org/show_bug.cgi?id=48136 Although, all my regular work is done in Mac OS X. Linux is just through dual-boot. --anders
Mar 28 2005
prev sibling parent "Charlie" <charles jwavro.com> writes:
 Would it not be easier to maintain Phobos if we finally reorganised the
 standard library after all these years, so the things that are vital to
 the language and required to compile simple programs are separated from
 tools and convenience wrappers?
Lord yes :). Have you tried ares : http://dsource.org/forums/viewforum.php?f=31&sid=1477845bd29cc3dbe8fa2fcb462 02d83 , its a re-write / re-organization of phobos, I imagine making phobos 64 bit compatibile would be much easier from this. Charlie "Benjamin Herr" <ben 0x539.de> wrote in message news:d29231$2009$1 digitaldaemon.com...
 Anders F Björklund wrote:
 I believe that DMD and Phobos itself is *not* 64-bit clean, and GDC
 is merely echoing this fact when building the front-end/runtime-lib.
I think that gdc is actually very close to being clean, "fixing" only <built-dir>/gcc/d/dmd/lexer.c:1533 and <built-dir>/gcc/d/dmd/aggregate.h:197 got it to compile here. However Phobos seems very "broken". Would it not be easier to maintain Phobos if we finally reorganised the standard library after all these years, so the things that are vital to the language and required to compile simple programs are separated from tools and convenience wrappers?
 Trying to get a PPC64 build going myself, but I need a fully 64 OS
 first (at the moment I only have 32-bit Mac OS X and 32-bit Linux)
Gentoo has quite cool 64bit support.
 --anders
--funroll-loops
Mar 28 2005
prev sibling parent reply dslate patrec.com writes:
Question for Benjamin Herr:

My gdc line numbers appear to be different from yours.
I presume you are referring to this line in lexer.c:

assert(sizeof(long) == 4); // some dependencies

which I "fixed" to:

assert(sizeof(long) >= 4); // some dependencies

Is this correct?

In aggregate.h the "offending line" seems to be:

#define CLASSINFO_SIZE  0x3C            // value of ClassInfo.size

I wasn't sure exactly what to do with this.  Please post your diffs.

Thanks,

-- Dave Slate
dslate patrec.com

On Mon, 28 Mar 2005 Benjamin Herr wrote:

 Anders F Björklund wrote:
 I believe that DMD and Phobos itself is *not* 64-bit clean, and GDC
 is merely echoing this fact when building the front-end/runtime-lib.
I think that gdc is actually very close to being clean, "fixing" only <built-dir>/gcc/d/dmd/lexer.c:1533 and <built-dir>/gcc/d/dmd/aggregate.h:197 got it to compile here. However Phobos seems very "broken". Would it not be easier to maintain Phobos if we finally reorganised the standard library after all these years, so the things that are vital to the language and required to compile simple programs are separated from tools and convenience wrappers?
 Trying to get a PPC64 build going myself, but I need a fully 64 OS
 first (at the moment I only have 32-bit Mac OS X and 32-bit Linux)
Gentoo has quite cool 64bit support.
 --anders
--funroll-loops
Mar 28 2005
parent Benjamin Herr <ben 0x539.de> writes:
dslate patrec.com wrote:
 Question for Benjamin Herr:
 
 My gdc line numbers appear to be different from yours.
Yes, mine are quite outdated.
 I presume you are referring to this line in lexer.c:
 
 assert(sizeof(long) == 4); // some dependencies
 
 which I "fixed" to:
 
 assert(sizeof(long) >= 4); // some dependencies
 
 Is this correct?
I did indeed refer to this line. I do not know whether changing the assert will eventually destroy the world, though.
 In aggregate.h the "offending line" seems to be:
 
 #define CLASSINFO_SIZE  0x3C            // value of ClassInfo.size
 
 I wasn't sure exactly what to do with this.  Please post your diffs.
I think my guesswork eventually lead me to use #define CLASSINFO_SIZE \ (sizeof(void*)*2 * 4 + sizeof(void*)*5 + sizeof(int)*2)
 
 Thanks,
 
 -- Dave Slate
 dslate patrec.com
I hope that my very unscientific hacks are of any use, -- Benjamin Herr
Mar 29 2005