This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

error #713: offset of base class "MStreamable" within class "MultiResContourModelPortDesc" is too large

 

This is cgtools 6.1.19 compiling for 6400+.

I don't have this problem on ports to compilers for other architectures.

It is not clear to me what the solution should be here(other than modifying the class structure)?

Thank You.

  • The bottom line is that class MStreamable uses virtual inheritance, and the size of the class (including all of the members of all base classes) is too large to represent in the encoding the compiler uses for C++ virtual inheritance.  Specifically, the size of MStreamable exceeds 0x7fff bytes (in C6000 COFF ABI) or 0xffffff bytes (in C6000 EABI)

    The limit has to do with virtual inheritance; non-virtual inheritance of a class with virtual functions does not have the problem.

    As far as I can tell, this is just a limitation of COFF ABI: classes which have a virtual base class are limited to 0x7fff bytes per object, including base class size.

    If you need to use virtual inheritance with objects of this size, you will need to use EABI (--abi=eabi) [this option is not available in C6000 until version 7.x].

    [various edits - Archaeologist]

  • Thanks.  Very good answer.  We have many other relatively large classes with a significant inheritance hierarchy as well as

    many virtual and pure virtual methods - so I'm surprised the 0x7fff C6000 COFF ABI limit hasn't been hit elsewhere as well.

    I'm a bit worried more trouble is coming!  I do have the 7.0 toolchain, but I am not able to migrate this particular project onto it

    and the C6000 ELF ABI - unless of course I can make a man-months argument if too many classes end up needing rewriting.

  • For EABI, 7.0.x will work, but I recommend you upgrade to 7.2.x, or better yet the just-released 7.3.x.  EABI support is improved in those releases.