[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Building CERTI on Ubuntu 15.10 (64bit)

From: Sebastien Mamessier
Subject: Re: [certi-dev] Building CERTI on Ubuntu 15.10 (64bit)
Date: Mon, 11 Apr 2016 11:04:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

It looks like RTIfedTime.cc defines methods whose declaration include `throw` of RTI::Exception types. Therefore, linker is looking for the typeinfo (as I read in https://gcc.gnu.org/wiki/Visibility) and doesn't find it as the RTI-> FedTime dependency is not explicitely made in the CMake file (I understood this was made on purpose to avoid a circular dependency).

As explained here (https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html), in GCC, the typeinfo object (for polymorphic classes) is written in the translation unit of the definition of the first non-inline virtual method. (which is the RTI::Exception destructor in this case (baseTypes.hh/line 31: virtual ~Exception();)

Since the definition of RTI::Exception destructor is in RTITypes.cc, I assume typeinfo objects are only in libRTI.so.

So we need to force the compiler to transfer the RTI::Exception typeinfo to libFedTime (if you want to keep those signatures as such).

2-character solution
Make RTI::Exception destructor purely virtual (This way, there is no non-inline virtual function and so GCC seems to copy the typeinfo object to libFedTime - as it does not assume it must be somewhere else -)

2-line solution
Copy the destructor definition to RTIfedTime.cc
    if (NULL!=_reason) {

I tested with GCC only, they both work.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]