From e836f27b1cf3bee0ac23360428b17a4c10c6f414 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 1 Jun 2024 13:12:14 +0200 Subject: imx-opencl-converter: fix compile time error GCC-14 set more warnings to errors, fix the code. Fixes: | .../src/ocl.c:258: 22: error: passing argument 6 of 'clGetProgramBuildInfo' from incompatible pointer type [-Wincompatible-pointer-types] Signed-off-by: Max Krummenacher --- .../0001-src-ocl.c-fix-wrong-integer-type.patch | 38 ++++++++++++++++++++++ .../imx-opencl-converter_0.2.0.bb | 5 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch new file mode 100644 index 000000000..deb81046d --- /dev/null +++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter/0001-src-ocl.c-fix-wrong-integer-type.patch @@ -0,0 +1,38 @@ +From e78af6d0c9cd1a655f6bc17173f6c411b8b34d2f Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Sat, 1 Jun 2024 11:07:13 +0000 +Subject: [PATCH] src/ocl.c: fix wrong integer type + +Fixes: +| .../ocl.c:258:22: error: passing argument 6 of 'clGetProgramBuildInfo' from incompatible pointer type [-Wincompatible-pointer-types] + 258 | 0, NULL, &log_size); + | ^~~~~~~~~ + | | + | int * +In file included from .../recipe-sysroot/usr/include/CL/cl_ext.h:27, + from .../ocl.c:21: +/recipe-sysroot/usr/include/CL/cl.h:1348:45: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *' + 1348 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; + | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Max Krummenacher +--- + src/ocl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ocl.c b/src/ocl.c +index f56d9cb..b2b0c52 100644 +--- a/src/ocl.c ++++ b/src/ocl.c +@@ -253,7 +253,7 @@ static OCL_RESULT CreateProgram(ImxOcl* ocl, const char* binName, const char* sr + cl_ret = clBuildProgram (program, 1, &ocl->device, "", NULL, NULL); + if (cl_ret < 0) + { +- int log_size; ++ size_t log_size; + cl_ret = clGetProgramBuildInfo(program, ocl->device, CL_PROGRAM_BUILD_LOG, + 0, NULL, &log_size); + +-- +2.42.0 + diff --git a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb index 3dc0a7ea5..f3e33e0d2 100644 --- a/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb +++ b/recipes-multimedia/imx-opencl-converter/imx-opencl-converter_0.2.0.bb @@ -5,7 +5,10 @@ SECTION = "multimedia" LIC_FILES_CHKSUM = "file://COPYING;md5=44a8052c384584ba09077e85a3d1654f" DEPENDS = "opencl-headers" -SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true" +SRC_URI = " \ + ${FSL_MIRROR}/${BP}.bin;fsl-eula=true \ + file://0001-src-ocl.c-fix-wrong-integer-type.patch \ +" SRC_URI[md5sum] = "dc668682189ce740fb46073e62f58066" SRC_URI[sha256sum] = "9f283df500c57421b87d96d9af7022ab490bc241aa28d00755beaadabbcd754b" -- cgit v1.2.3-54-g00ecf From a7a573a216d5a1ee3ac0349c886d454773a36627 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 1 Jun 2024 14:35:01 +0200 Subject: gstreamer1.0-plugins-base_1.22.5.imx: fix compile time error GCC-14 set more warnings to errors, demote implicit-function-declaration to a warning. Fixes: | .../gst-libs/gst/gl/gstglphymemory.c:312:25: error: assignment to 'GDestroyNotify' {aka 'void (*)(void *)'} from incompatible pointer type 'void (*)(GstMemory *)' {aka 'void (*)(struct _GstMemory *)'} [-Wincompatible-pointer-types] | .../gst-libs/gst/gl/gstglphymemory.c:345:7: error: passing argument 2 of 'gst_gl_context_thread_add' from incompatible pointer type [-Wincompatible-pointer-types] | .../gst-libs/gst/gl/gstglphymemory.c:360:9: error: assignment to 'GstGLBaseMemory *' {aka 'struct _GstGLBaseMemory *'} from incompatible pointer type 'GstMemory *' {aka 'struct _GstMemory *'} [-Wincompatible-pointer-types] | .../git/gst-libs/gst/gl/gstglupload.c:2154:51: error: passing argument 6 of 'directviv->TexDirectVIVMap' from incompatible pointer type [-Wincompatible-pointer-types] Signed-off-by: Max Krummenacher --- recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb index dd7869a9b..944cf8f5e 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.5.imx.bb @@ -135,6 +135,8 @@ PACKAGECONFIG_G2D:imxgpu2d ??= "g2d" PACKAGECONFIG[g2d] = ",,virtual/libg2d" PACKAGECONFIG[viv-fb] = ",,virtual/libgles2" +# GCC-14 otherwise errors out +CFLAGS += "-Wno-error=incompatible-pointer-types" EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}"" # links with imx-gpu libs which are pre-built for glibc -- cgit v1.2.3-54-g00ecf From d6c982648868009ea38b36e1eabadef94742b3ca Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 1 Jun 2024 15:23:22 +0200 Subject: gstreamer1.0-plugins-good_1.22.5.imx: fix compile time error GCC-14 set more warnings to errors, demote implicit-function-declaration and implicit-function-declaration to a warning. Fixes: .../v4l2/gstv4l2videoenc.c:782:9: error: implicit declaration of function 'gst_is_dmabuf_memory'; did you mean 'gst_is_v4l2_memory'? [-Wimplicit-function-declaration] .../sys/v4l2/gstv4l2videodec.c:1185:30: error: initialization of 'GstVideoFrame *' {aka 'struct _GstVideoFrame *'} from incompatible pointer type 'GstVideoCodecFrame *' {aka 'struct _GstVideoCodecFrame *'} [-Wincompatible-pointer-types] .../sys/v4l2/gstv4l2videodec.c:1187:48: error: passing argument 2 of 'gst_video_decoder_drop_frame' from incompatible pointer type [-Wincompatible-pointer-types] .../sys/v4l2/gstv4l2videodec.c:1232:30: error: initialization of 'GstVideoFrame *' {aka 'struct _GstVideoFrame *'} from incompatible pointer type 'GstVideoCodecFrame *' {aka 'struct _GstVideoCodecFrame *'} [-Wincompatible-pointer-types] .../sys/v4l2/gstv4l2videodec.c:1234:48: error: passing argument 2 of 'gst_video_decoder_drop_frame' from incompatible pointer type [-Wincompatible-pointer-types] Signed-off-by: Max Krummenacher --- recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb index 9e09ef930..1234f3ad4 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.5.imx.bb @@ -120,6 +120,11 @@ GLIBC_64BIT_TIME_FLAGS:mx7-nxp-bsp = "" INSANE_SKIP:mx6-nxp-bsp:append = " 32bit-time" INSANE_SKIP:mx7-nxp-bsp:append = " 32bit-time" +# GCC-14 otherwise errors out +CFLAGS += " \ + -Wno-error=implicit-function-declaration \ + -Wno-error=incompatible-pointer-types \ +" S = "${WORKDIR}/git" COMPATIBLE_MACHINE = "(imx-nxp-bsp)" -- cgit v1.2.3-54-g00ecf From 3d61da6c1828479b58bb443711c8129e70ebace0 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 1 Jun 2024 15:31:20 +0200 Subject: gstreamer1.0-plugins-bad_1.22.5.imx: fix compile time error GCC-14 set more warnings to errors, demote the ones which trigger to a warning. Fixes: | .../gst-libs/gst/play/gstplay.c:4926:7: error: implicit declaration of function 'usleep'; did you mean 'g_usleep'? [-Wimplicit-function-declaration] | .../gst-libs/gst/wayland/gstwlbuffer.c:347:35: error: 'return' with a value, in function returning void [-Wreturn-mismatch] | .../gst-libs/gst/wayland/gstwlwindow.c:691:14: error: returning 'struct wl_surface *' from a function with incompatible return type 'struct wl_subsurface *' [-Wincompatible-pointer-types] | .../recipe-sysroot/usr/include/glib-2.0/glib/gmessages.h:671:16: error: returning 'void *' from a function with return type 'gint' {aka 'int'} makes integer from pointer without a cast [-Wint-conversion] Signed-off-by: Max Krummenacher --- .../gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb index 3366a6274..39c1bfe19 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.5.imx.bb @@ -211,6 +211,13 @@ PACKAGECONFIG_G2D:imxgpu2d ??= "g2d" PACKAGECONFIG[g2d] = ",,virtual/libg2d" PACKAGECONFIG[tinycompress] = "-Dtinycompress=enabled,-Dtinycompress=disabled,tinycompress" +# GCC-14 otherwise errors out +CFLAGS += " \ + -Wno-error=implicit-function-declaration \ + -Wno-error=incompatible-pointer-types \ + -Wno-error=return-mismatch \ + -Wno-error=int-conversion \ +" EXTRA_OEMESON += " \ -Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}" \ " -- cgit v1.2.3-54-g00ecf From 2dd7d0824d56932f090600680f797c4d5eb9c9f8 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 1 Jun 2024 16:22:10 +0200 Subject: imx-gst1.0-plugin: fix compile time error GCC-14 set more warnings to errors, demote the ones which trigger to a warning. Fixes: | .../tools/grecorder/grecorder.c:161:38: error: initialization of 'pthread_t' {aka 'long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion] | .../tools/grecorder/grecorder.c:162:43: error: initialization of 'pthread_t' {aka 'long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion] | .../tools/grecorder/grecorder.c:845:7: error: passing argument 3 of 'recorder->register_event_handler' from incompatible pointer type [-Wincompatible-pointer-types] | .../tools/grecorder/grecorder.c:43:39: error: passing argument 3 of 'pthread_create' from incompatible pointer type [-Wincompatible-pointer-types] | .../tools/grecorder/grecorder.c:71:39: error: passing argument 3 of 'pthread_create' from incompatible pointer type [-Wincompatible-pointer-types] | .../tools/grecorder/grecorder.c:81:15: error: assignment to 'pthread_t' {aka 'long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion] | .../tools/grecorder/grecorder.c:52:15: error: assignment to 'pthread_t' {aka 'long unsigned int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion] | .../plugins/beepdec/beepdec.c:54:34: error: initialization of 'void (*)(GstObject *, ...)' {aka 'void (*)(struct _GstObject *, ...)'} from incompatible pointer type 'void (*)(GstAudioDecoder *, GstClockTime)' {aka 'void (*)(struct _GstAudioDecoder *, long unsigned int)'} [-Wincompatible-pointer-types] | .../plugins/beepdec/beepdec.c:55:36: error: initialization of 'void (*)(GstObject *, ...)' {aka 'void (*)(struct _GstObject *, ...)'} from incompatible pointer type 'void (*)(GstAudioDecoder *, GstClockTime)' {aka 'void (*)(struct _GstAudioDecoder *, long unsigned int)'} [-Wincompatible-pointer-types] | .../plugins/beepdec/beepdec.c:56:29: error: initialization of 'void (*)(GstObject *, ...)' {aka 'void (*)(struct _GstObject *, ...)'} from incompatible pointer type 'void (*)(GstAudioDecoder *, gboolean)' {aka 'void (*)(struct _GstAudioDecoder *, int) '} [-Wincompatible-pointer-types] | .../recipe-sysroot/usr/include/gstreamer-1.0/gst/audio/gstaudiodecoder.h:49:4: error: passing argument 2 of 'gstsutils_load_default_property' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/beepdec/beepdec.c:445:24: error: assignment to 'void * (*)(size_t)' {aka 'void * (*)(long unsigned int)'} from incompatible pointer type 'void * (*)(uint32)' {aka 'void * (*)(unsigned int)'} [-Wincompatible-pointer-types] | .../plugins/beepdec/beepdec.c:510:20: error: assignment to 'void * (*)(size_t)' {aka 'void * (*)(long unsigned int)'} from incompatible pointer type 'void * (*)(uint32)' {aka 'void * (*)(unsigned int)'} [-Wincompatible-pointer-types] | .../plugins/videoconvert/gstimxvideoconvert.c:1662:24: error: assignment to 'void **' from incompatible pointer type 'guint8 *' {aka 'unsigned char *'} [-Wincompatible-pointer-types] | .../plugins/videoconvert/gstimxvideoconvert.c:1673:74: error: passing argument 2 of '_set_cached_phyaddr' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/compositor/gstimxcompositor.c:1579:28: error: assignment to 'void **' from incompatible pointer type 'guint8 *' {aka 'unsigned char *'} [-Wincompatible-pointer-types] | .../plugins/compositor/gstimxcompositor.c:1591:77: error: passing argument 2 of '_set_cached_phyaddr' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/compositor/gstimxcompositor.c:1954:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] | .../tools/grecorder/recorder_engine.c:1253:41: error: passing argument 1 of 'strrchr' from incompatible pointer type [-Wincompatible-pointer-types] | .../tools/grecorder/recorder_engine.c:1901:22: error: assignment to 'GString *' {aka 'struct _GString *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types] | .../tools/grecorder/recorder_engine.c:1916:18: error: assignment to 'GString *' {aka 'struct _GString *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types] | .../libs/v4l2_core/gstimxv4l2.c:1203:92: error: passing argument 3 of 'gst_imx_v4l2_dequeue_gstbuffer' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/aiurdemux/aiurdemux.c:517:7: error: implicit declaration of function 'aiurdemux_check_stream_status'; did you mean 'aiurdemux_send_stream_eos'? [-Wimplicit-function-declaration] | .../plugins/aiurdemux/aiurdemux.c:1681:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] | .../plugins/aiurdemux/aiurdemux.c:4182:47: error: passing argument 3 of 'IParser->seek' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/aiurdemux/aiurdemux.c:4217:11: error: passing argument 3 of 'IParser->seek' from incompatible pointer type [-Wincompatible-pointer-types] | .../plugins/aiurdemux/aiurdemux.c:4240:17: error: passing argument 3 of 'IParser->seek' from incompatible pointer type [-Wincompatible-pointer-types] Signed-off-by: Max Krummenacher --- recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb index a13cf30ab..7a94b42fc 100644 --- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb +++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_git.bb @@ -67,6 +67,13 @@ PLATFORM:mx8-nxp-bsp = "MX8" PLATFORM:mx9-nxp-bsp = "MX9" CFLAGS:append:toolchain-clang = " -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-function-pointer-types" +# GCC-14 otherwise errors out +CFLAGS += " \ + -Wno-error=int-conversion \ + -Wno-error=incompatible-pointer-types \ + -Wno-error=return-mismatch \ + -Wno-error=implicit-function-declaration \ +" # Todo add a mechanism to map possible build targets EXTRA_OEMESON = "-Dplatform=${PLATFORM} \ -- cgit v1.2.3-54-g00ecf