-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
symbolize_unittest fails with static library (BUILD_SHARED_LIBS=OFF) and disabled usage of gtest (WITH_GTEST=OFF) #630
Comments
Unfortunately, I cannot reproduce the problem. I must assume the test failed prior to the recent |
It seems that this problem was introduced by commit c30896d ("cmake: export symbols selectively"). |
If this is true then the issue is non-critical. I guess the bundled Questions:
|
|
Thanks. After playing around, I could reproduce the issue using GCC 10.2.0. However, only when building a static lib. Would you mind posting the output of In the meantime, you can test the following change: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f68698..957a6f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -672,6 +672,8 @@ if (BUILD_TESTING)
)
target_link_libraries (symbolize_unittest PRIVATE ${_GLOG_TEST_LIBS})
+ set_target_properties (symbolize_unittest PROPERTIES
+ CXX_VISIBILITY_PRESET default)
endif (HAVE_SYMBOLIZE)
add_executable (demangle_unittest With Using host libthread_db library "/usr/lib/libthread_db.so.1". Test case TestWithPCInsideNonInlineFunction passed. F20210401 00:17:20.356626 513648 symbolize_unittest.cc:357] CHECK_STREQ failed: symbol == "main" (google::thread_msg_data vs. main) *** Check failure stack trace: *** @ 0x55555555fcea google::LogMessage::Fail() @ 0x555555562413 google::LogMessage::SendToLog() @ 0x55555555f823 google::LogMessage::Flush() @ 0x5555555629f9 google::LogMessageFatal::~LogMessageFatal() @ 0x55555555ccb9 TestWithReturnAddress() @ 0x55555555b4c1 google::thread_msg_data @ 0x7ffff7a23b25 __libc_start_main @ 0x55555555ca7e _start Program received signal SIGABRT, Aborted. 0x00007ffff7a38ef5 in raise () from /usr/lib/libc.so.6 (gdb) up #1 0x00007ffff7a22862 in abort () from /usr/lib/libc.so.6 (gdb) #2 0x000055555555b3a9 in google::DumpStackTraceAndExit () at ../src/utilities.cc:159 159 abort(); (gdb) bt #0 0x00007ffff7a38ef5 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff7a22862 in abort () from /usr/lib/libc.so.6 #2 0x000055555555b3a9 in google::DumpStackTraceAndExit () at ../src/utilities.cc:159 #3 0x000055555555fcea in google::LogMessage::Fail () at ../src/logging.cc:1878 #4 0x0000555555562413 in google::LogMessage::SendToLog (this=0x7fffffffde90) at ../src/logging.cc:1835 #5 0x000055555555f823 in google::LogMessage::Flush (this=0x7fffffffde90) at ../src/logging.cc:1695 #6 0x00005555555629f9 in google::LogMessageFatal::~LogMessageFatal (this=<optimized out>, __in_chrg=<optimized out>) at ../src/logging.cc:2454 #7 0x000055555555ccb9 in TestWithReturnAddress () at ../src/symbolize_unittest.cc:357 #8 0x000055555555b4c1 in main (argc=<optimized out>, argv=<optimized out>) at ../src/symbolize_unittest.cc:412 Note the difference between function names at |
I confirm that I see |
I believe this is no longer an issue, see #409 (comment). Please do let me know if you observe the problem with glog at head. |
In current trunk of glog, when building with
-DWITH_GTEST=ON
:And with
-DWITH_GTEST=OFF
:The text was updated successfully, but these errors were encountered: