wofan / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

glog doesn't compile #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile glog without changes in libmv with CMake and no special flags.

What is the expected output? What do you see instead?

It doesn't compile. Here are some of the errors:

{{{
/home/keir/wrk/libmv2/src/third_party/glog/src/glog/raw_logging.h:179:
error: declaration ‘struct tm’ does not declare anything
compilation terminated due to -Wfatal-errors.
cc1plus: warnings being treated as errors

/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler.cc: In
function ‘void google::<unnamed>::InvokeDefaultSignalHandler(int)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler.cc:235: error:
missing initializer for member ‘sigaction::__sigaction_handler’
compilation terminated due to -Wfatal-errors.

In file included from
/home/keir/wrk/libmv2/src/third_party/glog/src/utilities.h:69,
                 from
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h:38,
                 from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:39:
/home/keir/wrk/libmv2/src/third_party/glog/src/base/mutex.h:75:1: error:
"_XOPEN_SOURCE" redefined
In file included from /usr/include/c++/4.3/i486-linux-gnu/bits/os_defines.h:44,
                 from /usr/include/c++/4.3/i486-linux-gnu/bits/c++config.h:40,
                 from /usr/include/c++/4.3/iostream:44,
                 from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:34:

In file included from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:39:
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h: In function
‘std::string google::Munge(const std::string&)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h:442: error:
format ‘%p’ expects type ‘void*’, but argument 3 has type ‘int’
compilation terminated due to -Wfatal-errors.

cc1plus: warnings being treated as errors
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler_unittest.cc:
In function ‘void* DieInThread(void*)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler_unittest.cc:51: 
error:
control reaches end of non-void function
compilation terminated due to -Wfatal-errors.
make[2]: ***
[third_party/glog/src/CMakeFiles/signalhandler_unittest.dir/signalhandler_unitte
st.o]
Error 1
make[1]: ***
[third_party/glog/src/CMakeFiles/signalhandler_unittest.dir/all] Error 2
make: *** [all] Error 2

/home/keir/wrk/libmv2/src/third_party/glog/src/symbolize_unittest.cc: In
function ‘const char* SymbolizeStackConsumption(void*, int*)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/symbolize_unittest.cc:196:
error: missing initializer for member ‘sigaltstack::ss_sp’
compilation terminated due to -Wfatal-errors.
make[2]: ***
[third_party/glog/src/CMakeFiles/symbolize_unittest.dir/symbolize_unittest.o]
Error 1
}}}

What version of the product are you using? On what operating system?

0.2.1, on Ubuntu 9.04

Please provide any additional information below.

We use glog for libmv, but include it directly in third_party. I have
attached a patch that fixes most of these issues. The only one where I am
not sure what the right fix is for the struct tm.

If you apply this patch, then the diff between libmv's glog and upstream
can shrink. Thanks!

Original issue reported on code.google.com by mie...@gmail.com on 5 Jul 2009 at 10:50

Attachments:

GoogleCodeExporter commented 8 years ago
I think this was fixed.

Original comment by shinichi...@gmail.com on 11 Nov 2009 at 9:14