[mythtv] #13334 (Improved Video timing and Synchronization) breaks macOS compilation

Peter Bennett pb.mythtv at gmail.com
Mon Oct 29 14:50:12 UTC 2018



On 10/29/18 7:56 AM, Piotr Oniszczuk wrote:
> Guys,
> FYI
> Pls see error below…
>
> Some googling tells that TIMER_ABSTIME and clock_nanosleep are not supported on Mac OS but just on Linux.
>
> Maybe good pointer is here: https://code.i-harness.com/en/q/4ed8a5 ?
>
>
> ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -I/Users/piotro/Devel/mythtv-master/.osx-packager/build/include -I/Users/piotro/Devel/mythtv-master/.osx-packager/build/mysql -Wno-aligned-allocation-unavailable -std=c++11 -DNDEBUG -fomit-frame-pointer -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -msse -pthread -g -Wall -Wextra -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments -Wimplicit-fallthrough -faligned-allocation -I/Users/piotro/Devel/mythtv-master/.osx-packager/build/include/freetype2 -I/Users/piotro/Devel/mythtv-master/.osx-packager/build/include -F/Users/piotro/Devel/mythtv-master/.osx-packager/build/lib -isystem ../../external/libmythdvdnav/dvdnav -isystem ../../external/libmythdvdnav/dvdread -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.11 -fPIC -DMMX -DUSING_APPLEREMOTE -D_GNU_SOURCE -DUSING_LIBCRYPTO -DFFTW3_SUPPORT -DUSING_OPENGL -DUSING_OPENGL_VIDEO -DUSING_AIRPLAY -DUSING_MHEG -DUSING_FRONTEND -DUSING_FFMPEG_THREADS -DUSING_OSX_FIREWIRE -DUSING_FIREWIRE -DUSING_IPTV -DUSING_VBOX -DUSING_CETON -DUSING_BACKEND -DMTV_API -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -I.. -I../.. -I../.. -I../../external/FFmpeg -I. -I../libmyth -I../libmyth/audio -I../libmythbase -Impeg -Ichannelscan -Ivisualisations -Irecorders -Irecorders/dvbdev -Irecorders/rtp -Irecorders/vbitext -Irecorders/HLS -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/BasicUsageEnvironment -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/groupsock -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/liveMedia -I../libmythlivemedia/UsageEnvironment/include -I../libmythlivemedia/UsageEnvironment -I../libmythbase -I../libmythui -I../libmythupnp -I../libmythservicecontracts -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtOpenGL.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtWidgets.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtGui.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtNetwork.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtXml.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtSql.framework/Headers -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib/QtCore.framework/Headers -Imoc -I/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/mkspecs/macx-clang -F/Users/piotro/Devel/Qt5.11.2SDK/5.11.2/clang_64/lib -o obj/tvbrowsehelper.o tvbrowsehelper.cpp
> warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
> mythplayer.cpp:2343:47: error: use of undeclared identifier 'TIMER_ABSTIME'
>              clock_nanosleep(_CLOCK_MONOTONIC, TIMER_ABSTIME, &tm, nullptr);
>                                                ^
> mythplayer.cpp:2375:51: error: use of undeclared identifier 'TIMER_ABSTIME'
>                  clock_nanosleep(_CLOCK_MONOTONIC, TIMER_ABSTIME, &tm, nullptr);
>                                                    ^
> mythplayer.cpp:2384:43: error: use of undeclared identifier 'TIMER_ABSTIME'
>          clock_nanosleep(_CLOCK_MONOTONIC, TIMER_ABSTIME, &tm, nullptr);
>                                            ^
> 1 warning and 3 errors generated.
> make[2]: *** [obj/mythplayer.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

I see some internet articles saying that clock_gettime and 
clock_nanosleep are not supported in MACOS. Your compile shows an error 
in 'TIMER_ABSTIME'. I cannot find any MACOS documentation and I have no 
way of testing it, so I will create some alternative code that uses only 
QT functions and will be used when TIMER_ABSTIME is not defined. 
Playback may be less smooth than the code that uses the linux functions.

Peter



More information about the mythtv-dev mailing list