What steps will reproduce the problem?
1. Attempt to compile glog 0.3.0 with Mingw 4.4.1 (gcc.exe (TDM-2 mingw32)
4.4.1)
What is the expected output? What do you see instead?
Make produces following output:
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I./src -I
./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
-DNDEBUG
-g -O2 -MT libglog_la-logging.lo -MD -MP -MF .deps/libglog_la-logging.Tpo
-c -o
libglog_la-logging.lo `test -f 'src/logging.cc' || echo './'`src/logging.cc
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings
-Woverloaded-virt
ual -Wno-sign-compare -DNDEBUG -g -O2 -MT libglog_la-logging.lo -MD -MP -MF
.dep
s/libglog_la-logging.Tpo -c src/logging.cc -DDLL_EXPORT -DPIC -o
.libs/libglog_
la-logging.o
In file included from src/logging.cc:32:
src/utilities.h:78:19: error: port.h: No such file or directory
src/logging.cc:118: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:135: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:152: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:155: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:165: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:208: warning: 'google::LogMessage::num_messages_' redeclared
with
out dllimport attribute: previous dllimport ignored
src/logging.cc:213: warning: 'google::LogSeverityNames' redeclared without
dllim
port attribute: previous dllimport ignored
src/logging.cc: In function 'const char*
google::GetLogSeverityName(google::LogS
everity)':
src/logging.cc:220: warning: 'const char*
google::GetLogSeverityName(google::Log
Severity)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:227: warning: 'virtual google::base::Logger::~Logger()'
redeclare
d without dllimport attribute: previous dllimport ignored
src/logging.cc:289: warning: 'void google::ReprintFatalMessage()'
redeclared wit
hout dllimport attribute: previous dllimport ignored
src/logging.cc:290: warning: 'google::base::Logger*
google::base::GetLogger(goog
le::LogSeverity)' redeclared without dllimport attribute: previous
dllimport ign
ored
src/logging.cc:291: warning: 'void google::base::SetLogger(google::LogSeverity,
google::base::Logger*)' redeclared without dllimport attribute: previous
dllimpo
rt ignored
src/logging.cc: In member function 'bool
google::<unnamed>::LogFileObject::Creat
eLogfile(const char*)':
src/logging.cc:722: error: 'symlink' was not declared in this scope
src/logging.cc: In member function 'virtual void
google::<unnamed>::LogFileObjec
t::Write(bool, time_t, const char*, int)':
src/logging.cc:764: error: 'localtime_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:906: warning: 'google::LogMessage::kMaxLogMessageLen' redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:923: warning:
'google::LogMessage::fatal_msg_data_exclusive_' red
eclared without dllimport attribute: previous dllimport ignored
src/logging.cc:924: warning: 'google::LogMessage::fatal_msg_data_shared_'
redecl
ared without dllimport attribute: previous dllimport ignored
src/logging.cc:926: warning:
'google::LogMessage::LogMessageData::~LogMessageDat
a()' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc:931: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, int, void (google::LogMessage::*)())' redeclared
without dll
import attribute: previous dllimport ignored
src/logging.cc:937: warning: 'google::LogMessage::LogMessage(const char*,
int, c
onst google::CheckOpString&)' redeclared without dllimport attribute:
previous d
llimport ignored
src/logging.cc:943: warning: 'google::LogMessage::LogMessage(const char*, int)'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc:947: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity)' redeclared without dllimport attribute after being
referenc
ed with dll linkage
src/logging.cc:951: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, google::LogSink*, bool)' redeclared without dllimport
attrib
ute: previous dllimport ignored
src/logging.cc:958: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, std::vector<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<
char>, std::allocator<char> > > >*)' redeclared without dllimport
attribute: pre
vious dllimport ignored
src/logging.cc:964: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, std::string*)' redeclared without dllimport attribute:
previ
ous dllimport ignored
src/logging.cc:970: warning: 'void google::LogMessage::Init(const char*,
int, go
ogle::LogSeverity, void (google::LogMessage::*)())' redeclared without
dllimport
attribute after being referenced with dll linkage
src/logging.cc: In member function 'void google::LogMessage::Init(const
char*, i
nt, google::LogSeverity, void (google::LogMessage::*)())':
src/logging.cc:1010: error: 'localtime_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:1054: warning: 'google::LogMessage::~LogMessage()'
redeclared wit
hout dllimport attribute after being referenced with dll linkage
src/logging.cc:1061: warning: 'void google::LogMessage::Flush()' redeclared
with
out dllimport attribute after being referenced with dll linkage
src/logging.cc:1131: warning: 'void google::LogMessage::SendToLog()' redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:1220: warning: 'void
google::LogMessage::RecordCrashReason(google
::glog_internal_namespace_::CrashReason*)' redeclared without dllimport
attribut
e after being referenced with dll linkage
src/logging.cc:1246: error: definition of 'void (*
google::g_logging_fail_func)(
)volatile' is marked 'dllimport'
src/logging.cc: In function 'void google::InstallFailureFunction(void (*)())':
src/logging.cc:1251: warning: 'void google::InstallFailureFunction(void (*)())'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1255: warning: 'static void google::LogMessage::Fail()'
redeclare
d without dllimport attribute after being referenced with dll linkage
src/logging.cc:1260: warning: 'void google::LogMessage::SendToSink()'
redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:1273: warning: 'void google::LogMessage::SendToSinkAndLog()'
rede
clared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1279: warning: 'void google::LogMessage::SaveOrSendToLog()'
redec
lared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1292: warning: 'void
google::LogMessage::WriteToStringAndLog()' r
edeclared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1305: warning: 'void
google::LogMessage::SendToSyslogAndLog()' re
declared without dllimport attribute: previous dllimport ignored
src/logging.cc:1338: warning: 'static google::int64
google::LogMessage::num_mess
ages(int)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'std::ostream&
google::operator<<(std::ostream&, con
st google::PRIVATE_Counter&)':
src/logging.cc:1345: warning: 'std::ostream&
google::operator<<(std::ostream&, c
onst google::PRIVATE_Counter&)' redeclared without dllimport attribute:
previous
dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1352: warning:
'google::ErrnoLogMessage::ErrnoLogMessage(const ch
ar*, int, google::LogSeverity, int, void (google::LogMessage::*)())' redeclared
without dllimport attribute: previous dllimport ignored
src/logging.cc:1358: warning: 'google::ErrnoLogMessage::~ErrnoLogMessage()'
rede
clared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::FlushLogFiles(google::LogSeverity)':
src/logging.cc:1366: warning: 'void google::FlushLogFiles(google::LogSeverity)'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::FlushLogFilesUnsafe(google::LogSeverit
y)':
src/logging.cc:1370: warning: 'void
google::FlushLogFilesUnsafe(google::LogSever
ity)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetLogDestination(google::LogSeverity,
const char*)':
src/logging.cc:1374: warning: 'void
google::SetLogDestination(google::LogSeverit
y, const char*)' redeclared without dllimport attribute: previous dllimport
igno
red
src/logging.cc: In function 'void
google::SetLogSymlink(google::LogSeverity, con
st char*)':
src/logging.cc:1378: warning: 'void
google::SetLogSymlink(google::LogSeverity, c
onst char*)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1382: warning: 'virtual google::LogSink::~LogSink()'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc:1385: warning: 'virtual void
google::LogSink::WaitTillSent()' red
eclared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1389: warning: 'static std::string
google::LogSink::ToString(goog
le::LogSeverity, const char*, int, const tm*, const char*, size_t)'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::AddLogSink(google::LogSink*)':
src/logging.cc:1418: warning: 'void google::AddLogSink(google::LogSink*)'
redecl
ared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::RemoveLogSink(google::LogSink*)':
src/logging.cc:1422: warning: 'void
google::RemoveLogSink(google::LogSink*)' red
eclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::SetLogFilenameExtension(const
char*)':
src/logging.cc:1426: warning: 'void google::SetLogFilenameExtension(const
char*)
' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetStderrLogging(google::LogSeverity)'
:
src/logging.cc:1430: warning: 'void
google::SetStderrLogging(google::LogSeverity
)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetEmailLogging(google::LogSeverity, c
onst char*)':
src/logging.cc:1434: warning: 'void
google::SetEmailLogging(google::LogSeverity,
const char*)' redeclared without dllimport attribute: previous dllimport
ignore
d
src/logging.cc: In function 'void google::LogToStderr()':
src/logging.cc:1438: warning: 'void google::LogToStderr()' redeclared
without dl
limport attribute: previous dllimport ignored
src/logging.cc: In function 'bool google::SendEmail(const char*, const
char*, co
nst char*)':
src/logging.cc:1513: warning: 'bool google::SendEmail(const char*, const char*,
const char*)' redeclared without dllimport attribute: previous dllimport
ignored
src/logging.cc: In function 'const std::vector<std::basic_string<char,
std::char
_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, st
d::char_traits<char>, std::allocator<char> > > >&
google::GetLoggingDirectories(
)':
src/logging.cc:1568: warning: 'const std::vector<std::basic_string<char,
std::ch
ar_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >&
google::GetLoggingDirectorie
s()' redeclared without dllimport attribute after being referenced with dll
link
age
src/logging.cc: In function 'void
google::GetExistingTempDirectories(std::vector
<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::al
locator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >
>*)':
src/logging.cc:1598: warning: 'void
google::GetExistingTempDirectories(std::vect
or<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::
allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >
> >*)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::TruncateLogFile(const char*,
google::i
nt64, google::int64)':
src/logging.cc:1612: warning: 'void google::TruncateLogFile(const char*,
google:
:int64, google::int64)' redeclared without dllimport attribute: previous
dllimpo
rt ignored
src/logging.cc: In function 'void google::TruncateLogFile(const char*,
google::i
nt64, google::int64)':
src/logging.cc:1621: error: 'O_NOFOLLOW' was not declared in this scope
src/logging.cc:1631: error: 'truncate' was not declared in this scope
src/logging.cc:1660: error: 'pread' was not declared in this scope
src/logging.cc:1661: error: 'pwrite' was not declared in this scope
src/logging.cc: In function 'void google::TruncateStdoutStderr()':
src/logging.cc:1687: warning: 'void google::TruncateStdoutStderr()'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'std::string* google::CheckstrcmptrueImpl(const
char
*, const char*, const char*)':
src/logging.cc:1713: warning: 'std::string*
google::CheckstrcmptrueImpl(const ch
ar*, const char*, const char*)' redeclared without dllimport attribute:
previous
dllimport ignored
src/logging.cc: In function 'std::string*
google::CheckstrcmpfalseImpl(const cha
r*, const char*, const char*)':
src/logging.cc:1714: warning: 'std::string*
google::CheckstrcmpfalseImpl(const c
har*, const char*, const char*)' redeclared without dllimport attribute:
previou
s dllimport ignored
src/logging.cc: In function 'std::string* google::CheckstrcasecmptrueImpl(const
char*, const char*, const char*)':
src/logging.cc:1715: warning: 'std::string*
google::CheckstrcasecmptrueImpl(cons
t char*, const char*, const char*)' redeclared without dllimport attribute:
prev
ious dllimport ignored
src/logging.cc: In function 'std::string*
google::CheckstrcasecmpfalseImpl(const
char*, const char*, const char*)':
src/logging.cc:1716: warning: 'std::string*
google::CheckstrcasecmpfalseImpl(con
st char*, const char*, const char*)' redeclared without dllimport
attribute: pre
vious dllimport ignored
src/logging.cc: In function 'int google::posix_strerror_r(int, char*, size_t)':
src/logging.cc:1719: warning: 'int google::posix_strerror_r(int, char*,
size_t)'
redeclared without dllimport attribute after being referenced with dll linkage
src/logging.cc: In function 'int google::posix_strerror_r(int, char*, size_t)':
src/logging.cc:1731: error: 'strerror_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:1769: warning:
'google::LogMessageFatal::LogMessageFatal(const ch
ar*, int)' redeclared without dllimport attribute after being referenced
with dl
l linkage
src/logging.cc:1772: warning:
'google::LogMessageFatal::LogMessageFatal(const ch
ar*, int, const google::CheckOpString&)' redeclared without dllimport attribute
after being referenced with dll linkage
src/logging.cc:1776: warning: 'google::LogMessageFatal::~LogMessageFatal()'
rede
clared without dllimport attribute after being referenced with dll linkage
make: *** [libglog_la-logging.lo] Error 1
What version of the product are you using? On what operating system?
Windows Vista
Glog 0.3.0
MinGW (gcc.exe (TDM-2 mingw32) 4.4.1)
Please provide any additional information below.