Bug#1007200: pytorch: FTBFS with glog 0.6.0+
Source: pytorch
Version: 1.8.1-4
Severity: normal
Tags: ftbfs sid patch
Hi,
I've already uploaded the new google-glog 0.6.0 release candidate
version to experimental. It makes IsGoogleLoggingInitialized() a
public function. Your package needs to be updated to use it instead of
its hack. Patch is attached.
Please test your package and report back. I would like to start the
transition soon, but not break your package.
Regards,
Laszlo/GCS
Description: move IsGoogleLoggingInitialized() to public API
It was an internal function and project used hacks to reach it. Now it's part
of the public API.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Forwarded: no
Last-Update: 2022-03-08
---
--- pytorch-1.8.1.orig/c10/util/Logging.cpp
+++ pytorch-1.8.1/c10/util/Logging.cpp
@@ -170,23 +170,13 @@ C10_DEFINE_int(
google::GLOG_WARNING,
"The minimum log level that caffe2 will output.");
-// Google glog's api does not have an external function that allows one to check
-// if glog is initialized or not. It does have an internal function - so we are
-// declaring it here. This is a hack but has been used by a bunch of others too
-// (e.g. Torch).
-namespace google {
-namespace glog_internal_namespace_ {
-bool IsGoogleLoggingInitialized();
-} // namespace glog_internal_namespace_
-} // namespace google
-
namespace c10 {
bool InitCaffeLogging(int* argc, char** argv) {
if (*argc == 0)
return true;
#if !defined(_MSC_VER)
// This trick can only be used on UNIX platforms
- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized())
+ if (!::google::IsGoogleLoggingInitialized())
#endif
{
::google::InitGoogleLogging(argv[0]);
Reply to: