www.digitalmars.com         C & C++   DMDScript  

D.gnu - D on amd64

reply "Alejandro Pulver" <alejandro vanet.biz> writes:
Hello,

I tried to compile the D compiler version 0.15 with GCC sources version  
3.4.5-20050920 on FreeBSD/amd64, and I got the following error:

checking If /work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/gdc  
-B/work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/  
-B/usr/local/x86_64-portbld-freebsd5.4/bin/  
-B/usr/local/x86_64-portbld-freebsd5.4/lib/ -isystem  
/usr/local/x86_64-portbld-freebsd5.4/include -isystem  
/usr/local/x86_64-portbld-freebsd5.4/sys-include can compile D sources...  
Assertion failed: (sizeof(long) == 4), function number, file  
d/dmd/lexer.c, line 1696.
actest.d:0: internal compiler error: Abort trap

Complete log is at:
http://www.ijs.si/~lesi/other/gdc/gdc-0.15_1.log

The same happens on sparc64.

What can I do?

Thanks and Best Regards,
Ale
Oct 13 2005
next sibling parent reply Thomas Kühne <thomas-dloop kuehne.cn> writes:
In article <op.sylfdnftx4us65 phobos.mars.bsd>, Alejandro Pulver says...
Hello,

I tried to compile the D compiler version 0.15 with GCC sources version  
3.4.5-20050920 on FreeBSD/amd64, and I got the following error:

checking If /work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/gdc  
-B/work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/  
-B/usr/local/x86_64-portbld-freebsd5.4/bin/  
-B/usr/local/x86_64-portbld-freebsd5.4/lib/ -isystem  
/usr/local/x86_64-portbld-freebsd5.4/include -isystem  
/usr/local/x86_64-portbld-freebsd5.4/sys-include can compile D sources...  
Assertion failed: (sizeof(long) == 4), function number, file  
d/dmd/lexer.c, line 1696.
actest.d:0: internal compiler error: Abort trap

Complete log is at:
http://www.ijs.si/~lesi/other/gdc/gdc-0.15_1.log

The same happens on sparc64.

What can I do?

Thanks and Best Regards,
Ale
GDC isn't yet 64bit clean. You might try to crosscompile for 32bit and use multilib or equivialent. I am using GDC and DMD on AMD64 (Linux Gentoo). GDC was compiled using gcc32 instead of gcc64. DMD is a bit tricky to setup: 1) extract dmd in /opt 2) fix access rights for /opt/dmd/bin/dmd 3) emerge emul-linux* type "ldd /opt/dmd/bin/dmd" if you are unsure what 32bit libs are still missing 4) use a wrapper script for invoking dmd ---/usr/local/bin/dmd--- PATH=/opt/dmd/bin:$PATH /opt/dmd/bin/dmd $* 4) add a GCC wrapper, so that DMD calls gcc32 and not gcc ---/opt/dmd/bin/gcc--- gcc32 $* 5) DMD should now compile - but remember it will produce 32bit object code. Thomas
Oct 14 2005
parent "Alejandro Pulver" <alejandro vanet.biz> writes:
On Fri, 14 Oct 2005 04:54:39 -0300, Thomas Kühne <thomas-dloop kuehne.cn>  
wrote:

 In article <op.sylfdnftx4us65 phobos.mars.bsd>, Alejandro Pulver says...
 Hello,

 I tried to compile the D compiler version 0.15 with GCC sources version
 3.4.5-20050920 on FreeBSD/amd64, and I got the following error:

 checking If /work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/gdc
 -B/work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/
 -B/usr/local/x86_64-portbld-freebsd5.4/bin/
 -B/usr/local/x86_64-portbld-freebsd5.4/lib/ -isystem
 /usr/local/x86_64-portbld-freebsd5.4/include -isystem
 /usr/local/x86_64-portbld-freebsd5.4/sys-include can compile D  
 sources...
 Assertion failed: (sizeof(long) == 4), function number, file
 d/dmd/lexer.c, line 1696.
 actest.d:0: internal compiler error: Abort trap

 Complete log is at:
 http://www.ijs.si/~lesi/other/gdc/gdc-0.15_1.log

 The same happens on sparc64.

 What can I do?

 Thanks and Best Regards,
 Ale
GDC isn't yet 64bit clean. You might try to crosscompile for 32bit and use multilib or equivialent. I am using GDC and DMD on AMD64 (Linux Gentoo). GDC was compiled using gcc32 instead of gcc64. DMD is a bit tricky to setup: 1) extract dmd in /opt 2) fix access rights for /opt/dmd/bin/dmd 3) emerge emul-linux* type "ldd /opt/dmd/bin/dmd" if you are unsure what 32bit libs are still missing 4) use a wrapper script for invoking dmd ---/usr/local/bin/dmd--- PATH=/opt/dmd/bin:$PATH /opt/dmd/bin/dmd $* 4) add a GCC wrapper, so that DMD calls gcc32 and not gcc ---/opt/dmd/bin/gcc--- gcc32 $* 5) DMD should now compile - but remember it will produce 32bit object code. Thomas
Hello, Thank you for the information, I just wanted to know if GDC was supporting 64-bit target machines. Best Regards, Ale
Oct 14 2005
prev sibling next sibling parent reply David Friedman <d3rdclsmail_a t_earthlink_d.t_net> writes:
Alejandro Pulver wrote:
 Hello,
 
 I tried to compile the D compiler version 0.15 with GCC sources version  
 3.4.5-20050920 on FreeBSD/amd64, and I got the following error:
 
 checking If /work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/gdc  
 -B/work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/  
 -B/usr/local/x86_64-portbld-freebsd5.4/bin/  
 -B/usr/local/x86_64-portbld-freebsd5.4/lib/ -isystem  
 /usr/local/x86_64-portbld-freebsd5.4/include -isystem  
 /usr/local/x86_64-portbld-freebsd5.4/sys-include can compile D 
 sources...  Assertion failed: (sizeof(long) == 4), function number, 
 file  d/dmd/lexer.c, line 1696.
 actest.d:0: internal compiler error: Abort trap
 
 Complete log is at:
 http://www.ijs.si/~lesi/other/gdc/gdc-0.15_1.log
 
 The same happens on sparc64.
 
 What can I do?
 
 Thanks and Best Regards,
 Ale
You can change the assert in lexer.c to be assert(sizeof(long) >= 4). The compiler itself should be able to run as a 64-bit program, but only 32-bit targets are working now. David
Oct 14 2005
parent "Alejandro Pulver" <alejandro vanet.biz> writes:
On Fri, 14 Oct 2005 10:03:55 -0300, David Friedman  
<d3rdclsmail_a t_earthlink_d.t_net> wrote:

 Alejandro Pulver wrote:
 Hello,
  I tried to compile the D compiler version 0.15 with GCC sources  
 version  3.4.5-20050920 on FreeBSD/amd64, and I got the following error:
  checking If /work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/gdc   
 -B/work/a/ports/lang/gdc/work/gcc-3.4-20050920/gcc/   
 -B/usr/local/x86_64-portbld-freebsd5.4/bin/   
 -B/usr/local/x86_64-portbld-freebsd5.4/lib/ -isystem   
 /usr/local/x86_64-portbld-freebsd5.4/include -isystem   
 /usr/local/x86_64-portbld-freebsd5.4/sys-include can compile D  
 sources...  Assertion failed: (sizeof(long) == 4), function number,  
 file  d/dmd/lexer.c, line 1696.
 actest.d:0: internal compiler error: Abort trap
  Complete log is at:
 http://www.ijs.si/~lesi/other/gdc/gdc-0.15_1.log
  The same happens on sparc64.
  What can I do?
  Thanks and Best Regards,
 Ale
You can change the assert in lexer.c to be assert(sizeof(long) >= 4). The compiler itself should be able to run as a 64-bit program, but only 32-bit targets are working now. David
O.K. Thank you for the information. Best Regards, Ale
Oct 14 2005
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"Alejandro Pulver" <alejandro vanet.biz> wrote in message
news:op.sylfdnftx4us65 phobos.mars.bsd...
 Assertion failed: (sizeof(long) == 4), function number, file
 d/dmd/lexer.c, line 1696.
 actest.d:0: internal compiler error: Abort trap
I've fixed the problem in the source, it'll go out in the next update.
 What can I do?
For now, just delete that line. It'll still work.
Oct 17 2005