m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.52k stars 263 forks source link

[mingw64] [xavs2] [clang] encoder.c:2150:60: error: incompatible function pointer type passed #2417

Closed snowbie closed 1 year ago

snowbie commented 1 year ago
  Running git update for xavs2...
┌ xavs2 git  .......................................... [Recently updated]
├ Running uninstall...
├ Running configure...
├ Running install...
Likely error (tail of the failed operation logfile):
void  xavs2_threadpool_run   (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
                                                                ^
C:/mabs/build/xavs2-git/source/encoder/encoder.c:2150:60: error: incompatible function pointer types passing 'void *(xavs2_t *)' (aka 'void *(struct xavs2_t *)') to parameter of type 'void *(*)(void *)' [-Wincompatible-function-pointer-types]
            xavs2_threadpool_run(h->h_top->threadpool_aec, encoder_aec_encode_one_frame, h, 0);
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/mabs/build/xavs2-git/source/common/threadpool.h:46:65: note: passing argument to parameter 'func' here
void  xavs2_threadpool_run   (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
                                                                ^
4 warnings and 2 errors generated.
make: *** [Makefile:266: encoder/encoder.o] Error 1
install failed. Check C:/mabs/build/xavs2-git/build/linux/ab-suite.install.log
This is required for other packages, so this script will exit.

logs.zip

Biswa96 commented 1 year ago

This https://github.com/m-ab-s/media-autobuild_suite/commit/5782d728eb1d9b524c46155337b3d2b61dcb261d commit should fix the issue. Please try to rebuild.

snowbie commented 1 year ago
┌ xavs2 git  .......................................... [Recently updated]
├ Running uninstall...
├ Running configure...
├ Running install...
Likely error (tail of the failed operation logfile):
void  xavs2_threadpool_run   (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
                                                                ^
C:/mabs/build/xavs2-git/source/encoder/encoder.c:2150:60: error: incompatible function pointer types passing 'void *(xavs2_t *)' (aka 'void *(struct xavs2_t *)') to parameter of type 'void *(*)(void *)' [-Wincompatible-function-pointer-types]
            xavs2_threadpool_run(h->h_top->threadpool_aec, encoder_aec_encode_one_frame, h, 0);
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/mabs/build/xavs2-git/source/common/threadpool.h:46:65: note: passing argument to parameter 'func' here
void  xavs2_threadpool_run   (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
                                                                ^
4 warnings and 2 errors generated.
make: *** [Makefile:266: encoder/encoder.o] Error 1
install failed. Check C:/mabs/build/xavs2-git/build/linux/ab-suite.install.log
This is required for other packages, so this script will exit.

logs.zip

Still occurring after clearing cache, deleting build folder, and rebuilding.

Biswa96 commented 1 year ago

Did you update your local repository with git pull command?

snowbie commented 1 year ago

Yep. I just checked media-suite_compile.sh to see if the patch was included, and ran mabs again just to be safe. Same error.

Biswa96 commented 1 year ago

It seems that @1480c1 applied the patch to xavs instead of xavs2. Oops!

snowbie commented 1 year ago

On the bright side, the patch does indeed work when applied to xavs2 :^)