Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Building Log4cplus fails with "ld: Unsatisfied symbol virtual table of"

 
SOLVED
Go to solution
Highlighted
Visitor

Re: Building Log4cplus fails with "ld: Unsatisfied symbol virtual table of"


Dennis Handly wrote:

>how would this help? The ClientThread class in question does not use any of it. It is declared and defined wholly in the same TU.

 

Because it does?  ;-)

The construction vtables must reference vtables in the base classes.  And it need to reference AbstractThread::start.

__declspec is confusing the compiler.


I am sorry but "don't do it" is not a helpful answer to this problem. Either it is the code that has some kind of problem. If it is the code, then it should be diagnosed and fixed. Or it is the compiler that is buggy and then it should be diagnosed, acknowledge by HP and fixed. And I do not think this problem is in log4cplus' code. Especially since the same code works with HP-PA HP-UX aCC just fine.

 

Advisor

Re: Building Log4cplus fails with "ld: Unsatisfied symbol virtual table of"

There is definetely problem with those exports

As I mentioned above, if I change either configure or ConfigureChecks.cmake file to not define LOG4CPLUS_DECLSPEC_EXPORT it builds just fine (both autotools and cmake)

Also all the tests pass

 

So for now, fastest solution for me is to add special if to cmake checker

Highlighted

Re: Building Log4cplus fails with "ld: Unsatisfied symbol virtual table of"

>syntax error near unexpected token `('

 

Hmm, it worked for me but I put it on the compile line and perhaps you need more levels of quoting?

 

>I am sorry but "don't do it" is not a helpful answer to this problem.

 

In this case it was.  Pinkerik was able to build the app.

BTY, it took me a long time to figure this out.

 

>If it is the code, then it should be diagnosed and fixed. Or it is the compiler that is buggy and then it should be diagnosed

 

I don't disagree.  If you have a support contract, please contact the Response Center and file a bug.

 

>Especially since the same code works with aCC3 just fine.

 

Because there is minimal support for declspec.  If you are dumb, there are less things to go wrong.  :-)

Highlighted
Advisor

Re: Building Log4cplus fails with "ld: Unsatisfied symbol virtual table of"

Ok we can close this solution as compiler bug
Workaround was provided, so at least something

Thank you for your help