Modify

Opened 6 years ago

Closed 6 years ago

#9996 closed Bug Report - General (fixed)

Compilation on windows failed after commit d82f8c71ba88f45ea05ee32e69a202d97795a885 and still fails after 84aad2361023e393d3580e5aa1b91bd54767fd6a

Reported by: Jonathan <jonathan@…> Owned by: beirdo
Priority: minor Milestone: 0.25
Component: Ports - Windows Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Compilation on windows failed after commit d82f8c71ba88f45ea05ee32e69a202d97795a885 and still fails after 84aad2361023e393d3580e5aa1b91bd54767fd6a:

ccache g++ -c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/install/include -fomit-frame-pointer -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -O3 -Wmissing-declarations -frtti -fexceptions -mthreads -DQT_LARGEFILE_SUPPORT -DWIN32 -DUSING_MINGW -DMMX -Di386 -D_GNU_SOURCE -DRUNPREFIX=\"/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/install\" -DLIBDIRNAME=\"lib\" -DMBASE_API -DUSING_LIBUDF -DQT_THREAD_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/QtCore' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/QtNetwork' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/QtGui' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/QtXml' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/QtSql' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include' -I'/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/install/include' -I'/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/install' -I'../../../install/include/libxml2' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/include/ActiveQt' -I'.' -I'd:/MinGW/msys/1.0/home/bb.mythtv/mythbuild/qt-everywhere-opensource-src-4.7.3/mkspecs/default' -o logging.o logging.cpp
make[2]: Leaving directory `/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/mythtv/libs/libmythbase'
make[1]: Leaving directory `/d/buildbot-data/snetram-winxp-32bit/master-winxp-32bit/build/mythtv/libs'
logging.cpp: In constructor 'LoggingItem::LoggingItem(const char*, const char*, int, LogLevel_t, int)':

logging.cpp:152:66: error: invalid static_cast from type 'void*' to type 'uint64_t'

logging.cpp: In member function 'void LoggerThread::handleItem(LoggingItem*)':

logging.cpp:772:51: warning: unknown conversion type character 'l' in format

logging.cpp:772:51: warning: unknown conversion type character 'l' in format

logging.cpp:772:51: warning: format '%s' expects type 'char*', but argument 4 has type 'uint64_t'

logging.cpp:772:51: warning: too many arguments for format

logging.cpp:797:55: warning: unknown conversion type character 'l' in format

logging.cpp:797:55: warning: unknown conversion type character 'l' in format

logging.cpp:797:55: warning: format '%s' expects type 'char*', but argument 4 has type 'uint64_t'

logging.cpp:797:55: warning: too many arguments for format

make[2]: *** [logging.o] Error 1
make[1]: *** [sub-libmythbase-make_default] Error 2
make: *** [libs] Error 2

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by beirdo

  • Component changed from MythTV - General to Ports - Windows
  • Owner set to beirdo
  • Status changed from new to assigned

comment:2 Changed 6 years ago by Github

  • Milestone changed from unknown to 0.25
  • Resolution set to fixed
  • Status changed from assigned to closed

Fix compilation for Windows

Changed the static_cast<uint64_t> to (uint64_t) -- a C-style cast -- as it works on both Linux and Windows in the intended way.

Also, added PREFIX64 to replace "%llX" with "%I64X" and "%lld" with "%I64d" on mingw (Windows) builds. Seems the MS Runtime doesn't do 64-bit in the same way as glibc. Figures. See: http://msdn.microsoft.com/en-us/library/tcxf1dw6(v=vs.71).aspx

Fixes #9996

Branch: master Changeset: 60e7634b67ad6270210c1dfb5a83f26ab65d81b1

Add Comment

Modify Ticket

Action
as closed The owner will remain beirdo.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.