Open LigH-de opened 4 months ago
This is happening due to gcc 14 now defaulting to use -Werror=incompatible-pointer-types
, which makes this warning to become an error. See porting to gcc 14 for details.
If you want to build xavs2 with gcc 14 before a fix from the developers arrives, add -Wno-incompatible-pointer-types
to your CFLAGS environment variable.
I see the discarded-qualifiers message.
parameters.c: In function 'get_param_name':
parameters.c:447:18: warning: passing argument 1 of 'strtok' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
447 | str = strtok(param_item, "_");
| ^~~~~~~~~~
In file included from parameters.c:47:
C:/gcc1500/x86_64-w64-mingw32/include/string.h:97:44: note: expected 'char * restrict' but argument is of type 'const char *'
97 | char *__cdecl strtok(char * __restrict__ _Str,const char * __restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
| ~~~~~~~~~~~~~~~~~~~~^~~~
Fix: void get_param_name(char name, char param_item)
parameters.c: In function 'xavs2_encoder_opt_set':
parameters.c:632:45: error: passing argument 2 of 'xavs2_get_configs' from incompatible pointer type [-Wincompatible-pointer-types]
632 | if ((contents = xavs2_get_configs(argc, argv)) == NULL) {
| ^~~~
| |
| char **
parameters.c:531:62: note: expected 'const char * const*' but argument is of type 'char **'
531 | static char *xavs2_get_configs(int argc, const char * const *argv)
| ~~~~~~~~~~~~~~~~~~~~^~~~
Fix: if ((contents = xavs2_get_configs(argc, (const char const )argv)) == NULL) {
encoder.c:2041:56: error: passing argument 2 of 'xavs2_threadpool_run' from incompatible pointer type [-Wincompatible-pointer-types]
2041 | xavs2_threadpool_run(h->h_top->threadpool_aec, encoder_aec_encode_one_frame, h, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void * (*)(xavs2_t *)
In file included from wrapper.h:41,
from encoder.c:39:
threadpool.h:46:65: note: expected 'void * (*)(void *)' but argument is of type 'void * (*)(xavs2_t *)'
46 | void xavs2_threadpool_run (xavs2_threadpool_t *pool, void *(*func)(void *), void *arg, int wait_sign);
| ~~~~~~~~^~~~~~~~~~~~~
Fix: xavs2_threadpool_run(h->h_top->threadpool_aec, (void ()(void *)) encoder_aec_encode_one_frame, h, 0);
Why is there pthread here if there is not a single pthread function?
xlist.c:42:10: fatal error: pthread.h: No such file or directory
42 | #include <pthread.h>
| ^~~~~~~~~~~
Fix:
Would be lovely if you could pack all of your fixes into a Pull Request when complete...
Adds pull links https://github.com/pkuvcl/xavs2/pull/34 https://github.com/pkuvcl/xavs2/pull/35
Problem with non monotonically increasing dts [out#0/avs2 @ 00000255e36fe850] Starting thread... [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 4 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 2 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 1 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 3 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 6 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 5 [avs2 @ 00000255e3a51ad0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 7
Describe the bug
Building in media-autobuild suite, GCC 14.1 throws several errors:
To Reproduce
Expected behavior
Successful compilation.
Screenshots
logs.zip contains several probably useful log files collected by M-AB-S
Desktop (please complete the following information):
Additional context
https://github.com/m-ab-s/media-autobuild_suite/issues/2677 https://raw.githubusercontent.com/mojie126/ma/main/patch/xavs2/0001_xavs2_encoder_parameters.patch