-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A segfault occurs when executing the executable file which bound the log4cplus static lib(log4cplus.a) #512
Comments
I am afraind this is not enough information to go on. Can you start it under GDB and provide a call stack of the failure? |
Thanks for your reply. |
This is static initialization order fiasco. Your library is trying to use log4cplus before some static members have been initialized. |
Thank you very much for your answer, I understand what you mean. I am trying to solve this problem by changing the library link order in the makefile so that the log4cplus library is linked first. But this problem still existed. I am wondering that are there any simpler approches to solve this problem or i have to change the source code of my project. |
Hello,
When I compiling log4cplus, I only generated static library bfiles, the configure option i used was
./configure --prefix=/home/log4cplus --enable-static --disable-shared
After compiling, i got four files: liblog4cplus.a, liblog4cplus.la , liblog4cplusU.a, liblog4cplusU.la
Then I successfully performed static compilation through these library files, but a segmentation error was reported during the execution of the program. The error message is
XXX[55809]: segfault at fffffffffffffff8 ip 00007f60bf23b2bb sp 00007ffde8c6cce0 error 5 in libstdc++.so.6.0.28 [7f60bf157000+1bd000]
And when I dynamically compile log4cplus to generate .so files, my program can be executed correctly. I want to know how to solve this segfault and successfully compile log4cplus staticalto my program
My linux version is Red Hat 4.8.5-4, the log4cplus version is 2.0.5
The text was updated successfully, but these errors were encountered: