[mythtv] Win Build 23088 Fails

Jonathan jonathanjstevens at gmail.com
Fri Jan 8 21:20:06 UTC 2010


Win Build on 23088 appears to fail due to a missing gettimeofday, required
by upnpdevice.h

In file included from upnp.h:36,
                 from upnp.cpp:24:
upnpdevice.h: In member function `int DeviceLocation::ExpiresInSecs()':
upnpdevice.h:258: error: `gettimeofday' was not declared in this scope
upnpdevice.h:258: warning: unused variable 'gettimeofday'

This I assume is due to the lack of this function in MinGW time.h as
described
http://www.halcode.com/archives/2008/08/26/retrieving-system-time-gettimeofday/

So, after adding the advised code from that link to MinGW include/sys/time.h
and adding #include "sys/time.h" to upnpdevice.h , seems I also have to do
this for taskqueue.h

Then...when we get to httprequest.cpp

$ make -f Makefile
g++ -c -march=pentium4 -fomit-frame-pointer -O3 -DNDEBUG -g -Wall
-Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dto
r -funit-at-a-time -D__STDC_CONSTANT_MACROS -frtti -fexceptions -mthreads
-DQT_LARGEFILE_SUPPORT -DWIN32 -DUSING_MINGW -DMMX -Di386
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_THREAD_SUPPORT -DQT_DLL
-DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_
LIB -I'../../../../Qt/4.5.3/include/QtCore'
-I'../../../../Qt/4.5.3/include/QtNetwork'
-I'../../../../Qt/4.5.3/include/QtGui' -I'../
../../../Qt/4.5.3/include/QtXml' -I'../../../../Qt/4.5.3/include/QtSql'
-I'../../../../Qt/4.5.3/include' -I'/usr/include' -I'/C/myth
tv/build/' -I'../libmythdb' -I'..' -I'../../../../Qt/4.5.3/include/ActiveQt'
-I'.' -I'../../../../Qt/4.5.3/mkspecs/default' -o httpr
equest.o httprequest.cpp
In file included from upnputil.h:30,
                 from httprequest.h:34,
                 from httprequest.cpp:24:
../libmythdb/compat.h:33:1: warning: "NOMINMAX" redefined
In file included from
c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/c++config.h:35,
                 from
c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/string:45,
                 from
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qstring.h:60,
                 from ../../../../Qt/4.5.3/include/QtCore/qstring.h:1,
                 from
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/kernel/qobject.h:48,
                 from ../../../../Qt/4.5.3/include/QtCore/qobject.h:1,
                 from
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/io/qiodevice.h:46,
                 from ../../../../Qt/4.5.3/include/QtCore/qiodevice.h:1,
                 from
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/io/qfile.h:45,
                 from ../../../../Qt/4.5.3/include/QtCore/qfile.h:1,
                 from ../../../../Qt/4.5.3/include/QtCore/QFile:1,
                 from httprequest.h:27,
                 from httprequest.cpp:24:
c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/os_defines.h:46:1:
warning: this is the location of
 the previous definition
In file included from ../../../../Qt/4.5.3/include/QtCore/qthread.h:1,
                 from ../../../../Qt/4.5.3/include/QtCore/QThread:1,
                 from taskqueue.h:40,
                 from upnp.h:37,
                 from httprequest.cpp:46:
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/thread/qthread.h:129:
error: template with C linkage
In file included from ../../../../Qt/4.5.3/include/QtNetwork/qtcpserver.h:1,
                 from ../../../../Qt/4.5.3/include/QtNetwork/QTcpServer:1,
                 from httpserver.h:37,
                 from upnp.h:38,
                 from httprequest.cpp:46:
../../../../Qt/4.5.3/include/QtNetwork/../../src/network/socket/qtcpserver.h:63:
error: template with C linkage
In file included from ../../../../Qt/4.5.3/include/QtCore/qtimer.h:1,
                 from ../../../../Qt/4.5.3/include/QtCore/QTimer:1,
                 from threadpool.h:34,
                 from httpserver.h:43,
                 from upnp.h:38,
                 from httprequest.cpp:46:
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/kernel/qtimer.h:58:
error: template with C linkage
In file included from httpserver.h:43,
                 from upnp.h:38,
                 from httprequest.cpp:46:
threadpool.h:77: error: template with C linkage
threadpool.h:101: error: template with C linkage
In file included from ssdp.h:33,
                 from upnp.h:39,
                 from httprequest.cpp:46:
ssdpcache.h:90: error: template with C linkage
In file included from ../../../../Qt/4.5.3/include/QtCore/qdatetime.h:1,
                 from ../../../../Qt/4.5.3/include/QtCore/QDateTime:1,
                 from ../libmythdb/mythverbose.h:6,
                 from multicast.h:35,
                 from upnptasknotify.h:40,
                 from ssdp.h:34,
                 from upnp.h:39,
                 from httprequest.cpp:46:
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:207:
error: declaration of C function `QDataStream& operator
<<(QDataStream&, const QTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:141:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QDate&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:208:
error: declaration of C function `QDataStream& operator
>>(QDataStream&, QTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:142:
error: previous declaration `QDataStream& operator>>(QD
ataStream&, QDate&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:290:
error: declaration of C function `QDataStream& operator
<<(QDataStream&, const QDateTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:207:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:291:
error: declaration of C function `QDataStream& operator
>>(QDataStream&, QDateTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:208:
error: previous declaration `QDataStream& operator>>(QD
ataStream&, QTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:315:
error: declaration of C function `QDataStream& operator
<<(QDataStream&, const QDate&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:290:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QDateTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:316:
error: declaration of C function `QDataStream& operator
>>(QDataStream&, QDate&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:291:
error: previous declaration `QDataStream& operator>>(QD
ataStream&, QDateTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:317:
error: declaration of C function `QDataStream& operator
<<(QDataStream&, const QTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:315:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QDate&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:318:
error: declaration of C function `QDataStream& operator
>>(QDataStream&, QTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:316:
error: previous declaration `QDataStream& operator>>(QD
ataStream&, QDate&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:319:
error: declaration of C function `QDataStream& operator
<<(QDataStream&, const QDateTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:317:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:320:
error: declaration of C function `QDataStream& operator
>>(QDataStream&, QDateTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:318:
error: previous declaration `QDataStream& operator>>(QD
ataStream&, QTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:324:
error: declaration of C function `QDebug operator<<(QDe
bug, const QDate&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:319:
error: previous declaration `QDataStream& operator<<(QD
ataStream&, const QDateTime&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:325:
error: declaration of C function `QDebug operator<<(QDe
bug, const QTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:324:
error: previous declaration `QDebug operator<<(QDebug,
const QDate&)' here
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:326:
error: declaration of C function `QDebug operator<<(QDe
bug, const QDateTime&)' conflicts with
../../../../Qt/4.5.3/include/QtCore/../../src/corelib/tools/qdatetime.h:325:
error: previous declaration `QDebug operator<<(QDebug,
const QTime&)' here
httprequest.cpp:1466: error: expected `}' at end of input
make: *** [httprequest.o] Error 1

$

At this point I have to admit defeat... this may not be linked to the time.h
issue I guess... I don't know... but I'm guessing whoever is running with
the upnp code isn't testing on win... ;)


Of course, it all compiles fine on my Fedora systems ;) but this seems a lot
of faff for Windows - is there a better way to deal with the lack of this
function in MinGW?

Regards,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-dev/attachments/20100108/3e6467c0/attachment.htm>


More information about the mythtv-dev mailing list