Re: [PATCH] WIP: RFC: XXX: Unbreak build with GCC 14

Alexander Strasser <[email protected]> Fri, 19 Apr 2024 22:00:41 +0200
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <ZiLNaV1gCvo-83_4@metallschleimette>
Hi Ingo!

On 2024-04-17 13:42 +0200, Ingo Br=FCckl wrote:
> On Mon, 15 Apr 2024 23:36:37 +0200, Alexander Strasser wrote:
>
> > As always testing and comments very welcome!
>
> When trying to do a shared build with current ffmpeg master, I get a
> configuration error that FFmpeg is not found:
>
>   Checking for FFmpeg ... Compiling without FFmpeg is currently not suppo=
rted/working.
>   Error: both internal and external FFmpeg missing
>
> This is due to
>
>   WARN_CFLAGS=3D"-Werror-implicit-function-declaration"
>
> in configure and a probably outdated /usr/include/bits/math-finite.h:
>
>   error: implicit declaration of function 'lgamma_r'
>   error: implicit declaration of function 'lgammaf_r'
>   error: implicit declaration of function 'lgammal_r'
>
> I had to change WARN_CFLAGS to
>
>   WARN_CFLAGS=3D"-Wno-error=3Dimplicit-function-declaration"
>
> to configure.
>
> Then the following errors occur when compiling (with nothing explicitly
> disabled):
>
>   libmpcodecs/vd_qtvideo.c: In function 'init':
>   libmpcodecs/vd_qtvideo.c:132:20: error: assignment to 'char ** (*)(Size=
)' {aka char ** (*)(int)'} from incompatible pointer type 'OSErr (*)(Size)'=
 {aka 'short int (*)(int)'} [-Wincompatible-pointer-types]
>     132 |     NewHandleClear =3D (OSErr(*)(Size))GetProcAddress(handler, =
"NewHandleClear");
>         |                    ^
>
>   loader/ext.c: In function 'VirtualAlloc':
>   loader/ext.c:447:17: error: assignment to 'LPVOID' {aka 'void *'} from =
'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
>     447 |         address =3D (unsigned)address&~0xffff;
>         |                 ^
>
>   loader/module.c: In function 'report_func':
>   loader/module.c:847:16: error: assignment to 'uint32_t' {aka 'unsigned =
int'} from 'void *' makes integer from pointer without a cast [-Wint-conver=
sion]
>     847 |       reg->eax =3D malloc(((uint32_t *)stack_base)[1]);
>         |                ^
>   loader/module.c:855:16: error: assignment to 'uint32_t' {aka 'unsigned =
int'} from 'void *' makes integer from pointer without a cast [-Wint-conver=
sion]
>     855 |       reg->eax =3D malloc(((uint32_t *)stack_base)[1]);
>         |                ^
>
> I had to --disable-win32dll, because there were a whole bunch of errors in
> loader/win32.c and other loader/* files.


Thanks for the feedback.

You were compiling on x86 32bit?

Could you make it build in the end?


Greetings,
  Alexander