From patchwork Mon Dec 4 09:11:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 750308 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=ps.report@gmx.net header.b="lxDYBfuo" Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF84BCD for ; Mon, 4 Dec 2023 01:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701681101; x=1702285901; i=ps.report@gmx.net; bh=6MdaBM6FTXM/uKwm6B0rZvxYs+PwzqLO7HhYo30Pw00=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=lxDYBfuoNYW3ujwbmQpZyFurvo1i+DM00HkW3NHefxORU6h976y1rivqzxXv+vg1 aWSTBhD66HKBlzOUH7KxdVOxSke92/hRQw8wYSlyyt39Hio9vhuO10JBjYFDQ/khS FyGe0i2LRnKx5ZTWhqPEma1DUl5xKcmP34BYms0Rk7QfC2oaC1We5zYt9za+STwi3 Bhbge6h+/0tjU2abCwfsGVYZCpVGDfAgY1XZ+Fm2YOAVfpeB6aNLqzuLIKkoSKYFM C6tttADoCeSRX4vEztDYYmhMnG6UZjxqeo0hGslhKcgz8p2WvrG1hu5f2Ew2oGZmG feSQY8fmNXd10ZInUw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost.fritz.box ([62.216.209.4]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M59GA-1r8yWf07C0-001BDD; Mon, 04 Dec 2023 10:11:41 +0100 From: Peter Seiderer To: linux-media@vger.kernel.org Cc: Peter Seiderer Subject: [PATCH v4l-utils v1 1/2] meson: fix has_function fork detection (needs suitable include) Date: Mon, 4 Dec 2023 10:11:33 +0100 Message-ID: <20231204091134.28481-1-ps.report@gmx.net> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:o9UbxOuIOG+oU0iS8G03TH6U6twlB2GaExQ8DEte4ZCvTh9m/cT wswz9DRBIjZwTvnLf+U/NKH6uizfwLd9f4c12jUgcqH24+xApj5VFEa1rddW3+RXdXQqV8V RKXuxL2OdZC9qrsjQXJIJxHAa9pqJFGbl1SMvv9cOYawESVUuySX81btwLf8Q+Fo1toVYe/ g99LSGeFPmyyS8D9jkLaQ== UI-OutboundReport: notjunk:1;M01:P0:+WsZ58SuuKA=;syXuxZtRgCgkjw0r5vlwsM7286V ZqCtEDKY4S2ijXrV32L/h4zUb9c6tiX2LqM4srQsQD2QnkX1u911zyovT3Q/9FAd2ciKzTEb3 iw+Lb/G6KbhZ19x94lPxPKMggmL9P2OQRLtaoOskZ9f6O1r7nZ0wLF5sueQS3eETxuh8Kzdsq R4ricgSqklYGD8wmQlu3pcJLZcVBcU4dB17H711ePc9SY1xnOHKg48MORqaHY9UepfvRVaoyt iSzikT0JU/26TfJdLb5A6f1ciOFc/+AT0hNLpTFLubDv/9pMe7z/rZZNTpRM/TF1gfwu9QHaE XYF/+sdITrpJ7WbBT2Iz0wKEPGQd4vbifq0wTv4IOEm0+PL7hpeoRhiDaIkQImEpXLALb8EpY DilyLD4f9RNAqAdZ2ux/9uAG60/NxnnVzLK7LpOhsob0rx/1F7wK+HY5nWgTuEbsnI1jiDjyr LVqesg7wPavRwBO89ue44NLYjuOniI7RSU24OzAIZv0CBavfFYyw6NLGZ7IPo3JJX0jyhsN5x b890MkRj+GZ4nLXcHUvIykJI9sgSiy1r1VujUYX/ZILRYqx/plhMks6nsOdrH4va/E1s3ZvOm +kSPmAYA/1GYXVPPGL7hCtOs4YX8xJpvdimye3TPBXUxKEPKOSmd2ftLyPvnUUHm3+mI27n9Z q4zIwm4gzXgoXX+uq/z/CYs2osjm3yUzLyK6k7MnhXXKoIpy7Lund5fBPHtR1+IMG4+XdpusV bIquMjEuhEwTZYzrij8ganRrJ3T5sNC3gAYV+LToiIRlmzfPHjXgOVCavsEhLG+3kJMjfK/JO a6TfJascdM4FbYb4rjpcaENhI/kmFDqPdq6XbvO7FbTUerU+YtfErd4F6tLaPcjEMzK2vEsfk w7kJPWfg/Nl/34F0bVwZES0FsX/6ALKp9WbsSfo/pWTtdIgIQJK4s8m19b8j9yyRGmua61ErR L2cNXO65nYykINoYx1UZK+vgTYc= - fix meson has_function('fork') detection, needs suitable include to avoid false positive (see [1] for details) Fixes: .../bootlin-armv7m-uclibc/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: lib/libv4lconvert/libv4lconvert.a(helper.c.o): in function `v4lconvert_helper_decompress': helper.c:(.text+0x14e): undefined reference to `fork' collect2: error: ld returned 1 exit status [1] https://github.com/mesonbuild/meson/issues/7652 Signed-off-by: Peter Seiderer --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b4018c82..03508bc8 100644 --- a/meson.build +++ b/meson.build @@ -128,7 +128,7 @@ dep_threads = dependency('threads') dep_x11 = dependency('x11', required : false) dep_xmlrpc = dependency('xmlrpc', required : false) -have_fork = cc.has_function('fork') +have_fork = cc.has_function('fork', prefix: '#include ') have_i2c_dev = cc.has_header('linux/i2c-dev.h') if have_visibility From patchwork Mon Dec 4 09:11:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 750621 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=ps.report@gmx.net header.b="F2ASURiG" Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6001BD2 for ; Mon, 4 Dec 2023 01:11:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701681102; x=1702285902; i=ps.report@gmx.net; bh=eHIDEU5qXtGT4kE1U3W5nlemyQOFp6glu1xD5RxoNhg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=F2ASURiGQHhrx5SUfd4nYM/HGarcAR3U8DK6raBWKN8I0d3n7T1/Pv0Fbf9udDju kwZoe9YeRjGzVzeJxQw7VlouClu6BLcmcsvmvhVZNBZUyir2CVb3n3gUepEb8hH70 kDAzaJtBpgYO54X5i0yMi/x0UcDNFucURV9M40oLsJyJHwOYT+SOE3YedaJjC3Xo4 kSugzW3nNTBHidd8aHW3ZRHXUzWr+RTY31MnkogGt+4DAHBHYizA99U1OkGDIlkNk JL4h48icDT4qLKTkL8TFYYRp5B+P1rjvlRp3rie2S04i70z9z+2flS42KaA+YN5pt xEauK27CITDjVmzbsA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost.fritz.box ([62.216.209.4]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mzyya-1rVR1s1vjK-00x0gn; Mon, 04 Dec 2023 10:11:42 +0100 From: Peter Seiderer To: linux-media@vger.kernel.org Cc: Peter Seiderer Subject: [PATCH v4l-utils v1 2/2] meson: v4l2grab needs libv4lconvert with fork support enabled Date: Mon, 4 Dec 2023 10:11:34 +0100 Message-ID: <20231204091134.28481-2-ps.report@gmx.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231204091134.28481-1-ps.report@gmx.net> References: <20231204091134.28481-1-ps.report@gmx.net> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:jrgZ3+gcCI5AB450X8tsXOkuWsaEQTQsYHEjUddY0hrKS/6wSf1 IG+gn2sxQLDHgeLyHgyWFQ/N21qOxVkg8Ut1jpz2Fdnfj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ftLb87itjrqdM6MV9t7TjCxQ3UZyC2fILZvw3Vcwbf7aTRltaqRkCPcwfh8 xNAWZg== - v4l2grab needs libv4lconvert with fork support enabled Fixes: FAILED: contrib/test/v4l2grab .../bootlin-armv7m-uclibc/host/bin/arm-linux-gcc -o contrib/test/v4l2grab contrib/test/v4l2grab.p/v4l2grab.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,-elf2flt=-r -static -Wl,--start-group lib/libv4l2/libv4l2.a lib/libv4lconvert/libv4lconvert.a -largp -pthread -ldl -lm -lrt -Wl,--end-group .../bootlin-armv7m-uclibc/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: lib/libv4lconvert/libv4lconvert.a(libv4lconvert.c.o): in function `v4lconvert_destroy': libv4lconvert.c:(.text+0x5c0): undefined reference to `v4lconvert_helper_cleanup' .../bootlin-armv7m-uclibc/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real: lib/libv4lconvert/libv4lconvert.a(libv4lconvert.c.o): in function `v4lconvert_convert_pixfmt': libv4lconvert.c:(.text+0x1450): undefined reference to `v4lconvert_helper_decompress' collect2: error: ld returned 1 exit status Signed-off-by: Peter Seiderer --- Notes: - patch is more or less a quick work around, maybe an better handling of the no-fork-case in libv4lconvert (without v4lconvert_helper_cleanup, v4lconvert_helper_decompress, etc. as they depend on have_fork, see lib/libv4lconvert/meson.build and conditional helper.c compile) is possible??? --- contrib/test/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/test/meson.build b/contrib/test/meson.build index 29b51df6..c1f40354 100644 --- a/contrib/test/meson.build +++ b/contrib/test/meson.build @@ -25,6 +25,7 @@ sliced_vbi_detect = executable('sliced-vbi-detect', sliced_vbi_detect_sources, include_directories : v4l2_utils_incdir) +if have_fork v4l2grab_sources = files( 'v4l2grab.c', @@ -41,6 +42,7 @@ v4l2grab = executable('v4l2grab', v4l2grab_sources, dependencies : v4l2grab_deps, include_directories : v4l2_utils_incdir) +endif driver_test_sources = files( 'driver-test.c',