Error Message "ModuleInfo class is incorrect"

Mike none at none.com
Thu Dec 5 05:26:39 PST 2013


On Thursday, 5 December 2013 at 07:06:48 UTC, Kai Nacke wrote:
> Hi Mike!
>
> On Thursday, 5 December 2013 at 01:11:13 UTC, Mike wrote:
>> I'm trying to port the D Runtime, incrementally, to the ARM 
>> Cortex-M (thumb2) platform.  But after bringing object.d in, 
>> I'm getting this error message:
>>
>> "object.d ModuleInfo class is incorrect"
>>
>> Looking through LDC's source code, I found the following in 
>> toobj.cpp
>>
>> // check for patch
>> else
>> {
>> #if DMDV2
>> 	unsigned sizeof_ModuleInfo = 16 * PTRSIZE;
>> #else
>> 	unsigned sizeof_ModuleInfo = 14 * PTRSIZE;
>> #endif
>> 	if (sizeof_ModuleInfo != moduleinfo->structsize)
>> 	{
>> 	error("object.d ModuleInfo class is incorrect");
>> 	fatal();
>> 	}
>> }
>
> Are you sure you are looking at a LDC source file? 
> driver/toobj.cpp does not contain this piece of code. The error 
> message is produced in gen/module.cpp.
>
>> I'm not sure if PTRSIZE is not properly defined for my 
>> platform, or if I need to make changes to ModuleInfo, or some 
>> other problem.
>>
>> Please advise.
>
> Did you change object.d_/object.di? Is the file really read? 
> (use -v) If you could post a command line then I could try to 
> figure out what is happening here.
>
> Regards,
> Kai

Well, I sat down today and ran the same build script I wrote last 
night, and the error is gone.  I can't even figure out how to get 
it to reappear.  I must have done something stupid.

I'm sorry for the distraction.


More information about the digitalmars-d-ldc mailing list