[mythtv] Compiler issue on github runner for Fixes/32 macOS 11/12
Scott Theisen
scott.the.elm at gmail.com
Wed Nov 23 22:49:46 UTC 2022
On 11/23/22 15:27, John Hoyt wrote:
> I've been attempting to automate my packaging of macOS
> Mythfrontend.app with github actions. Everything works / compiles
> great on my main computers running macOS 13 (Ventura).
>
> Unfortunately on the github runners, I keep getting the following
> compile error on fixes/32 only. Any suggestions on how to address it?
>
> ccache clang++ -c -pipe -stdlib=libc++ -D_FILE_OFFSET_BITS=64
> -DPIC -std=c++17 -faligned-new -DNDEBUG -O2 -fomit-frame-pointer
> -fPIC -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -msse -pthread
> -I/opt/local/include/soundtouch -g -Wall -Wextra -Wpointer-arith
> -Wno-constant-logical-operand -Wno-unused-value -Qunused-arguments
> -Wimplicit-fallthrough -I/opt/local/include/freetype2
> -I/opt/local/include/libpng16 -isystem
> ../../external/libmythdvdnav/dvdnav -isystem
> ../../external/libmythdvdnav/dvdread -std=gnu++1z -arch x86_64
> -isysroot
> /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk
> <http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk>
> -mmacosx-version-min=10.13 -fPIC -DMMX -DUSING_APPLEREMOTE
> -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -DUSING_VTB
> -DHAVE_LIBBLURAY -DUSING_LIBCRYPTO -DUSING_LIBASS -DUSING_OPENGL
> -DUSING_AIRPLAY -DUSING_MHEG -DUSING_FRONTEND
> -DUSING_FFMPEG_THREADS -DUSING_IPTV -DUSING_HDHOMERUN
> -DHDHOMERUN_HEADERFILE=\"libhdhomerun/hdhomerun.h\" -DHDHOMERUN_V2
> -DUSING_SATIP -DUSING_VBOX -DUSING_CETON -DUSING_BACKEND -DMTV_API
> -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
> -DQT_XML_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I.
> -I/opt/local/libexec/qt5/include -I/opt/local/include/libxml2 -I..
> -I../.. -I../.. -I../../external/FFmpeg -I. -I../libmyth
> -I../libmyth/audio -I../libmythbase -Impeg -Ichannelscan -Imheg
> -Idecoders -Iopengl -Iio -Icaptions -Ivisualisations
> -Ivisualisations/opengl -Ivisualisations/vulkan -Ivulkan -Idrm
> -Ioverlays -Irecorders -Irecorders/dvbdev -Irecorders/rtp
> -Irecorders/vbitext -Irecorders/HLS -I../libmythbase
> -I../libmythui -I../libmythupnp -I../libmythservicecontracts
> -I../../external/libmythdvdnav/dvdnav
> -I../../external/libmythdvdnav/dvdread
> -I/opt/local/libexec/qt5/lib/QtWidgets.framework/Headers
> -I/opt/local/libexec/qt5/lib/QtGui.framework/Headers
> -I/opt/local/libexec/qt5/lib/QtNetwork.framework/Headers
> -I/opt/local/libexec/qt5/lib/QtXml.framework/Headers
> -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers
> -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers -Imoc
> -I/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers
> <http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers>
> -I/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AGL.framework/Headers
> <http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AGL.framework/Headers>
> -I/opt/local/libexec/qt5/mkspecs/macx-clang
> -F/opt/local/libexec/qt5/lib -o obj/H2645Parser.o mpeg/H2645Parser.cpp
> In file included from mpeg/H2645Parser.cpp:10:
> In file included from ../../external/FFmpeg/libavutil/internal.h:107:
> ../../external/FFmpeg/libavutil/libm.h:430:43: error: static
> declaration of 'lrint' follows non-static declaration
> static av_always_inline av_const long int lrint(double x)
> ^
> /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:472:17
> <http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:472:17>:
> note: previous declaration is here
> extern long int lrint(double);
> ^
> In file included from mpeg/H2645Parser.cpp:10:
> In file included from ../../external/FFmpeg/libavutil/internal.h:107:
> ../../external/FFmpeg/libavutil/libm.h:444:41: error: static
> declaration of 'round' follows non-static declaration
> static av_always_inline av_const double round(double x)
> ^
> /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:476:15
> <http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:476:15>:
> note: previous declaration is here
> extern double round(double);
> ^
>
This sounds like configure is failing somehow, but our runs on GitHub
Actions compile fine.
Specifically, config.h should have `#define HAVE_LRINT 1` and `#define
HAVE_ROUND 1`. I don't know which config.h, ours or FFmpeg's, gets
included when we use internal FFmpeg headers.
I suspect ours gets included and the following lines in our configure
are probably why it fails:
https://github.com/MythTV/mythtv/blob/987da09e83ca80181afdd24a1b457faadd1f2c9f/mythtv/configure#L6067-L6079
```
# test for lrint in math.h
check_exec <<EOF && lrint=yes || lrint=no
#define _ISOC9X_SOURCE 1
#include <math.h>
int main( void ) { return (lrint(3.999f) > 0)?0:1; }
EOF
#test for round()
check_exec <<EOF && round=yes || round=no
#define _ISOC9X_SOURCE 1
#include <math.h>
int main( void ) { return (round(3.999f) > 0)?0:1; }
EOF
```
FFmpeg's configure does not have any similar lines.
Without the outputs from configure, particularly the log file config.ep,
I can't say for certain if those lines are the problem.
> In file included from mpeg/H2645Parser.cpp:11:
> In file included from ../../external/FFmpeg/libavcodec/golomb.h:36:
> ../../external/FFmpeg/libavcodec/put_bits.h:199:37: warning:
> comparison of integers of different signs: 'long' and 'unsigned
> long' [-Wsign-compare]
> if (s->buf_end - s->buf_ptr >= sizeof(BitBuf)) {
> ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
> ../../external/FFmpeg/libavcodec/put_bits.h:237:37: warning:
> comparison of integers of different signs: 'long' and 'unsigned
> long' [-Wsign-compare]
> if (s->buf_end - s->buf_ptr >= sizeof(BitBuf)) {
> ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
> ../../external/FFmpeg/libavcodec/put_bits.h:289:33: warning:
> comparison of integers of different signs: 'long' and 'unsigned
> long' [-Wsign-compare]
> if (s->buf_end - s->buf_ptr >= sizeof(BitBuf)) {
> ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
> 3 warnings and 2 errors generated.
>
We don't use put_bits.h and FFmpeg doesn't use -Wsign-compare, so these
warnings should be ignored.
> make[2]: *** [obj/H2645Parser.o] Error 1
> make[1]: *** [sub-libmythtv-make_first] Error 2
> make: *** [libs] Error 2
> Compiling Mythtv failed
> Error: Process completed with exit code 1.
>
>
Regards,
Scott Theisen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20221123/c295e155/attachment.htm>
More information about the mythtv-dev
mailing list