Menu

#283 symbol lookup error at runtime

v1.1.3
closed
5
2014-08-06
2013-11-19
Digi
No

I'm running ubuntu (12.04) desktop for development and server for deployment. I'm using static libraries and I've got log4cplus installed on both sides. I didn't modify the install scrippt on either, just "sudo make install".

When I run my app on the server using the library built there I get this error (via stderr, not in the log):

./eventlistener: symbol lookup error: ./eventlistener: undefined symbol: _ZN9log4cplus6LoggeraSEOS0_

But if I copy the liblog4cplus.so from my dev machine (unlinking, so I have the actual file) it works. It also works on my dev machine.

(also, where should I look for support. I asked on StackOverflow since there are some other questions and wiix answered one), but haven't had a response -> http://stackoverflow.com/questions/19849731/log4cplus-how-do-i-change-the-log-file-name-at-runtime)

Thanks
Ӎσᶎ

Discussion

  • Václav Haisman

    Václav Haisman - 2013-11-19
    • assigned_to: Václav Zeman
     
  • Václav Haisman

    Václav Haisman - 2013-11-19

    The _ZN9log4cplus6LoggeraSEOS0_ symbol demangles to log4cplus::Logger::operator=(log4cplus::Logger&&). I think that somehow log4cplus has been compiled without C++11 support support/switches and your application is compiled with C++11 support/switches. Make sure you are consistent with this.

     
  • Václav Haisman

    Václav Haisman - 2013-11-19
    • labels: --> build, v1.1.2
    • Group: v1.1.2 --> v1.1.3
     
  • Digi

    Digi - 2013-11-19

    doing "export CXXFLAGS=-std=c++11" then uninstalling and re-making worked, so you're right. I thought log4cplus required C++11 so this wouldn't be an issue.

    I think it would be worth adding that to the default makefile, just so people like me with a default g++ install don't have this problem.

    thanks for the fast solution
    Ӎσᶎ

     

    Last edit: Digi 2013-11-19
  • Václav Haisman

    Václav Haisman - 2013-11-19

    Adding the switch by default would break builds for other people. This issue is covered in README:

    log4cplus contains small amount of code that uses C++11 (ISO/IEC 14882:2011 standard) language features. C++11 features are used only if C++11 support is detected during compile time. Compiling log4cplus with C++11 compiler and standard library and using it with C++03 (ISO/IEC 14882:2003 standard) application is not supported.

     
  • Václav Haisman

    Václav Haisman - 2013-11-19
    • status: open --> closed
     

Log in to post a comment.