<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    On 11/23/22 15:27, John Hoyt wrote:<br>
    <blockquote type="cite"
cite="mid:CAE8sghSv6BX7uu_5cZokKLPb6sL67VvBCidKZ0GPn43ravFCDQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">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).
        <div><br>
        </div>
        <div>Unfortunately on the github runners, I keep getting the
          following compile error on fixes/32 only.  Any suggestions on
          how to address it?
          <div><br>
          </div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>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/<a
href="http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk"
                moz-do-not-send="true">Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk</a>
              -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/<a
href="http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers"
                moz-do-not-send="true">Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/OpenGL.framework/Headers</a>
              -I/Applications/<a
href="http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AGL.framework/Headers"
                moz-do-not-send="true">Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/AGL.framework/Headers</a>
              -I/opt/local/libexec/qt5/mkspecs/macx-clang
              -F/opt/local/libexec/qt5/lib -o obj/H2645Parser.o
              mpeg/H2645Parser.cpp</div>
            <div>In file included from mpeg/H2645Parser.cpp:10:</div>
            <div>In file included from
              ../../external/FFmpeg/libavutil/internal.h:107:</div>
            <div>../../external/FFmpeg/libavutil/libm.h:430:43: error:
              static declaration of 'lrint' follows non-static
              declaration</div>
            <div>static av_always_inline av_const long int lrint(double
              x)</div>
            <div>                                          ^</div>
            <div>/Applications/<a
href="http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:472:17"
                moz-do-not-send="true">Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:472:17</a>:
              note: previous declaration is here</div>
            <div>extern long int lrint(double);</div>
            <div>                ^</div>
            <div>In file included from mpeg/H2645Parser.cpp:10:</div>
            <div>In file included from
              ../../external/FFmpeg/libavutil/internal.h:107:</div>
            <div>../../external/FFmpeg/libavutil/libm.h:444:41: error:
              static declaration of 'round' follows non-static
              declaration</div>
            <div>static av_always_inline av_const double round(double x)</div>
            <div>                                        ^</div>
            <div>/Applications/<a
href="http://Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:476:15"
                moz-do-not-send="true">Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/math.h:476:15</a>:
              note: previous declaration is here</div>
            <div>extern double round(double);</div>
            <div>              ^</div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
    This sounds like configure is failing somehow, but our runs on
    GitHub Actions compile fine.<br>
    <br>
    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.<br>
    <br>
    I suspect ours gets included and the following lines in our
    configure are probably why it fails:
<a class="moz-txt-link-freetext" href="https://github.com/MythTV/mythtv/blob/987da09e83ca80181afdd24a1b457faadd1f2c9f/mythtv/configure#L6067-L6079">https://github.com/MythTV/mythtv/blob/987da09e83ca80181afdd24a1b457faadd1f2c9f/mythtv/configure#L6067-L6079</a><br>
    <br>
    ```<br>
    # test for lrint in math.h<br>
    check_exec <<EOF && lrint=yes || lrint=no<br>
    #define _ISOC9X_SOURCE  1<br>
    #include <math.h><br>
    int main( void ) { return (lrint(3.999f) > 0)?0:1; }<br>
    EOF<br>
    <br>
    #test for round()<br>
    check_exec <<EOF && round=yes || round=no<br>
    #define _ISOC9X_SOURCE  1<br>
    #include <math.h><br>
    int main( void ) { return (round(3.999f) > 0)?0:1; }<br>
    EOF<br>
    ```<br>
    <br>
    FFmpeg's configure does not have any similar lines.<br>
    <br>
    Without the outputs from configure, particularly the log file
    config.ep, I can't say for certain if those lines are the problem.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAE8sghSv6BX7uu_5cZokKLPb6sL67VvBCidKZ0GPn43ravFCDQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>In file included from mpeg/H2645Parser.cpp:11:</div>
            <div>In file included from
              ../../external/FFmpeg/libavcodec/golomb.h:36:</div>
            <div>../../external/FFmpeg/libavcodec/put_bits.h:199:37:
              warning: comparison of integers of different signs: 'long'
              and 'unsigned long' [-Wsign-compare]</div>
            <div>        if (s->buf_end - s->buf_ptr >=
              sizeof(BitBuf)) {</div>
            <div>            ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~</div>
            <div>../../external/FFmpeg/libavcodec/put_bits.h:237:37:
              warning: comparison of integers of different signs: 'long'
              and 'unsigned long' [-Wsign-compare]</div>
            <div>        if (s->buf_end - s->buf_ptr >=
              sizeof(BitBuf)) {</div>
            <div>            ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~</div>
            <div>../../external/FFmpeg/libavcodec/put_bits.h:289:33:
              warning: comparison of integers of different signs: 'long'
              and 'unsigned long' [-Wsign-compare]</div>
            <div>    if (s->buf_end - s->buf_ptr >=
              sizeof(BitBuf)) {</div>
            <div>        ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~</div>
            <div>3 warnings and 2 errors generated.</div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
    We don't use put_bits.h and FFmpeg doesn't use -Wsign-compare, so
    these warnings should be ignored.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAE8sghSv6BX7uu_5cZokKLPb6sL67VvBCidKZ0GPn43ravFCDQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div>make[2]: *** [obj/H2645Parser.o] Error 1</div>
            <div>make[1]: *** [sub-libmythtv-make_first] Error 2</div>
            <div>make: *** [libs] Error 2</div>
            <div>    Compiling Mythtv failed</div>
            <div>Error: Process completed with exit code 1.</div>
          </blockquote>
        </div>
      </div>
      <br>
    </blockquote>
    <br>
    Regards,<br>
    <br>
    Scott Theisen<br>
    <br>
  </body>
</html>