google / glog

C++ implementation of the Google logging module
http://google.github.io/glog/
BSD 3-Clause "New" or "Revised" License
7.01k stars 2.05k forks source link

HAVE_SYMBOLIZE not defined when HAVE_LINK_H is #1085

Closed wzheng21 closed 1 month ago

wzheng21 commented 6 months ago

Fixing issue #1084 . We are trying to bump glog up to latest version using bazel in our project.

In glog.bzl, there's HAVE_LINK_H defined. However, in symbolize.h, it doesn't lead to defining HAVE_SYMBOLIZE, resulting in the error

warning: Symbolize functionality is not available for target platform: stack dump will contain empty frames. [-W#pragma-messages]
#  pragma message( \
          ^
1 warning generated.
wzheng21 commented 6 months ago

Thanks for the PR.

What you are seeing is not an error but a warning. Please also make sure to modify Bazel files only if the CMake build is not affected to avoid side effects.

That makes sense. Sorry it's a warning. Actually we declared things like InstallSymbolizeCallback in our implementation, then we actually get linking error with the new version of glog. (which makes sense since there's no HAVE_SYMBOLIZE anymore, so the function definition is never compiled into the library)

jms13 commented 6 months ago

Alternative solution with "bazel only changes": add -DHAVE_SYMBOLIZE to bazel/glog.bzl in linux_only_copts.

sergiud commented 1 month ago

Fixed by #1116.