[mythtv] Compiler issue on github runner for Fixes/32 macOS 11/12
Scott Theisen
scott.the.elm at gmail.com
Thu Nov 24 00:16:58 UTC 2022
On 11/23/22 18:37, John Hoyt wrote:
>
>
> On Wed, Nov 23, 2022 at 6:28 PM John Hoyt <john.hoyt at gmail.com> wrote:
>
> Hi Scott, thanks for taking a look. I've worked up a patch file
> to resolve, but it sounds like getting configure working correctly
> is a better solution (happy to post the patch file).
>
> Without the outputs from configure, particularly the log file
> config.ep, I can't say for certain if those lines are the problem.
>
>
> Configure output: https://pastebin.com/gG8E1Fbg
> config.ep: https://pastebin.com/b6Tk5M4Q
>
>
from config.ep line 5736:
```
dyld[67989]: Library not loaded: '@PREFIX@/lib/libhdhomerun.dylib'
Referenced from:
'/private/var/folders/4c/__l40lp140324rnbz1m2jkgh0000gn/T/ffconf.xBPEc1aO/test'
Reason: tried: '/usr/local/lib/libhdhomerun.dylib' (no such file),
'/usr/lib/libhdhomerun.dylib' (no such file)
```
That looks suspicious to me. Would that prevent the test from executing?
The resultant config.h files from our configure and FFmpeg's would be
useful to compare.
> BTW - I can now reproduce on a local machine (wife's macbook) running
> Monterey. Strangely, all of my Ventura machines do not exhibit the
> problem.
>
> Here's the patch I worked up that successfully compiles:
>
> diff --git a/mythtv/external/FFmpeg/libavutil/libm.h
> b/mythtv/external/FFmpeg/libavutil/libm.h
> index a819962391..71753deff5 100644
> --- a/mythtv/external/FFmpeg/libavutil/libm.h
> +++ b/mythtv/external/FFmpeg/libavutil/libm.h
> @@ -427,21 +427,21 @@ static inline double rint(double x)
> #endif /* HAVE_RINT */
> #if !HAVE_LRINT
> -static av_always_inline av_const long int lrint(double x)
> +av_always_inline av_const long int lrint(double x)
> {
> return rint(x);
> }
> #endif /* HAVE_LRINT */
> #if !HAVE_LRINTF
> -static av_always_inline av_const long int lrintf(float x)
> +av_always_inline av_const long int lrintf(float x)
> {
> return (int)(rint(x));
> }
> #endif /* HAVE_LRINTF */
> #if !HAVE_ROUND
> -static av_always_inline av_const double round(double x)
> +av_always_inline av_const double round(double x)
> {
> return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
> }
> diff --git a/mythtv/libs/libmyth/audio/audioconvert.cpp
> b/mythtv/libs/libmyth/audio/audioconvert.cpp
> index 98a2e25c8c..1b7903e599 100644
> --- a/mythtv/libs/libmyth/audio/audioconvert.cpp
> +++ b/mythtv/libs/libmyth/audio/audioconvert.cpp
> @@ -71,7 +71,7 @@ static inline bool sse_check()
> #endif //ARCH_x86
> #if !HAVE_LRINTF
> -static av_always_inline av_const long int lrintf(float x)
> +av_always_inline av_const long int lrintf(float x)
> {
> return (int)(rint(x));
> }
>
>
I would prefer to fix configure, rather than hack around the error.
Were the HAVE_LRINTF changes necessary? I don't think they should be.
I think a better solution is to remove the referenced configure lines
and see if that works. My reasoning is the following:
1. `git grep -nE "math.h" -- :^*/FFmpeg/** :^platform/**` We use
<cmath> not <math.h>, except in external/libexiv2.
2. We never use lrint() `git grep -nE lrint -- :^*/FFmpeg/**` only
lrintf().
* Although, we do use round(), `git grep -nE "[^A-Za-z]round\(" --
:^*/FFmpeg/** :^*/html/**`.
3. We are using C++17, these functions are from C99/C++11.
Regards,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20221123/c5711e9e/attachment.htm>
More information about the mythtv-dev
mailing list