internal error toObjFile()

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Mon May 28 03:52:49 PDT 2007


Jay Dresser wrote:
> Since I'm a newbie, I thought I'd ask here before submitting a bug 
> report.  Maybe I'm doing something stupid.
> 
> I just installed and started playing this week.  I have tried dmd and 
> gdc (gdmd) and I apparently cannot use dmd as I am on a amd64 (Opteron) 
> Ubuntu platform.  dmd can't handle the 64bit world yet, so I'm stuck 
> with gdc.

DMD works just fine in a 32-bit chroot on my 64-bit Ubuntu. The Ubuntu 
forums have a thread (I think it's 
http://ubuntuforums.org/showthread.php?t=24575) explaining how to set 
this up. Be sure to install 32-bit gcc etc. in the chroot environment.

> I wanted to do something with popen() so I took some code I found on the 
> newsgroups here for popen.d and compile it into my library.  It will 
> compile with dmd, but then the main program won't link with it if the 
> main program is from gdc (that's expected, right?).
> 
> So when I compile it with gdmd I get this:
> 
> gdmd -c -I/home/jay/Ddev/src/phobos -I/home/jay/Ddev/src/phobos/std 
> -L-L/home/jay/Ddev/lib popen.d
> cc1d: ../../gcc-4.1.1/gcc/d/dmd/toobj.c:417: virtual void 
> ClassDeclaration::toObjFile(): Assertion `classinfo->structsize == 
> CLASSINFO_SIZE' failed.
> popen.d:97: internal compiler error: Aborted
[snip]

Looks like you're using the wrong version of Phobos with your gdmd. 
(Likely DMD's version)
I'm pretty sure you shouldn't need to specify include paths for phobos, 
GDC should know where gphobos (the version of Phobos it comes with) is 
installed.


More information about the Digitalmars-d-learn mailing list