configure.ac: Add option to disable compilation of v4l2-tracer
PATCH 1/1 configure.ac: Add option to disable compilation of v4l2-tracer
Add a configuration time option to disable compilation of the v4l2-tracer utility.
---
Hi Hans,
The v4l2-tracer fails to build on arm32. While I'm sure that can be fixed, this is an utility I don't use and building on target any thing I can disable in the build saves me time.
From completes, the classes of errors I see are around v4l2_fourcc(), _IOR() and _IOWR().
../../include/linux/videodev2.h:81:66: error: narrowing conversion of '3039908417' from '__u32' {aka 'unsigned int'} to 'long int' [-Wnarrowing]
81 | #define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31))
../../include/linux/videodev2.h:2528:34: error: narrowing conversion of '2154321408' from 'unsigned int' to 'long int' [-Wnarrowing]
2528 | #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
../../include/linux/videodev2.h:2529:33: error: narrowing conversion of '3225441794' from 'unsigned int' to 'long int' [-Wnarrowing]
2529 | #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
I'm building on target with gcc 12.1.0, nothing fancy,
$ ./bootstrap.sh && ./configure && make
Kind Regards
Niklas
--- configure.ac | 11 +++++++++++ utils/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
configure.ac +11 -0
@@ -497,6 +497,14 @@ AC_ARG_ENABLE(v4l2-compliance-32, esac] ) +AC_ARG_ENABLE(v4l2-tracer, + AS_HELP_STRING([--disable-v4l2-tracer], [disable v4l2-tracer compilation]), + [case "${enableval}" in + yes | no ) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2-tracer) ;; + esac] +) + AC_ARG_ENABLE(v4l2-ctl-libv4l, AS_HELP_STRING([--disable-v4l2-ctl-libv4l], [disable use of libv4l in v4l2-ctl]), [case "${enableval}" in
@@ -578,6 +586,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes]) +AM_CONDITIONAL([WITH_V4L2_TRACER], [test x$jsonc_pkgconfig = xyes -a x$enable_v4l2_tracer != xno]) PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no]) AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])
@@ -628,6 +637,7 @@ AM_COND_IF([WITH_V4L2_CTL_32], [USE_V4L2_CTL_32="yes"], [USE_V4L2_CTL_32="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE], [USE_V4L2_COMPLIANCE="yes"], [USE_V4L2_COMPLIANCE="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE_LIBV4L="yes"], [USE_V4L2_COMPLIANCE_LIBV4L="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_32], [USE_V4L2_COMPLIANCE_32="yes"], [USE_V4L2_COMPLIANCE_32="no"]) +AM_COND_IF([WITH_V4L2_TRACER], [USE_V4L2_TRACER="yes"], [USE_V4L2_TRACER="no"]) AM_COND_IF([WITH_BPF], [USE_BPF="yes" AC_DEFINE([HAVE_BPF], [1], [BPF IR decoder support enabled])], [USE_BPF="no"])
@@ -679,5 +689,6 @@ compile time options summary v4l2-compliance : $USE_V4L2_COMPLIANCE v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L v4l2-compliance-32 : $USE_V4L2_COMPLIANCE_32 + v4l2-tracer : $USE_V4L2_TRACER BPF IR Decoders: : $USE_BPF EOF
utils/Makefile.am +1 -1
@@ -15,7 +15,7 @@ SUBDIRS = \ cec-follower \ rds-ctl -if HAVE_JSONC +if WITH_V4L2_TRACER SUBDIRS += \ v4l2-tracer endif
Signature · 1 line
2.39.1
Quoted 24 lines · Niklas Söderlund
Add a configuration time option to disable compilation of the v4l2-tracer utility.
Signed-off-by Niklas Söderlund <[email protected]>---
Hi Hans,
The v4l2-tracer fails to build on arm32. While I'm sure that can be fixed, this is an utility I don't use and building on target any thing I can disable in the build saves me time.
From completes, the classes of errors I see are around
v4l2_fourcc(),_IOR()and_IOWR().
../../include/linux/videodev2.h:81:66: error: narrowing conversion of '3039908417' from '__u32' {aka 'unsigned int'} to 'long int' [-Wnarrowing]
81 | #definev4l2_fourcc_be(a, b, c, d)(v4l2_fourcc(a, b, c, d)| (1U << 31))
../../include/linux/videodev2.h:2528:34: error: narrowing conversion of '2154321408' from 'unsigned int' to 'long int' [-Wnarrowing]
2528 | #defineVIDIOC_QUERYCAP_IOR('V', 0, struct v4l2_capability)
../../include/linux/videodev2.h:2529:33: error: narrowing conversion of '3225441794' from 'unsigned int' to 'long int' [-Wnarrowing]
2529 | #defineVIDIOC_ENUM_FMT_IOWR('V', 2, struct v4l2_fmtdesc)
Quoted 6 lines
I'm building on target with gcc 12.1.0, nothing fancy,
$ ./bootstrap.sh && ./configure && makeKind Regards
Niklas
Hi Niklas,
Thanks for this patch it is good and probably how I should have done it originally :) It does make the "HAVE_JSONC" conditional redundant, so once this is applied, I will send a follow-up patch to replace "HAVE_JSONC" with "WITH_V4L2_TRACER" in the v4l2-tracer Makefile.am.
Best,
Deb
Quoted 63 lines
--- configure.ac | 11 +++++++++++ utils/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)configure.ac +11
-0@@ -497,6 +497,14 @@ AC_ARG_ENABLE(v4l2-compliance-32, esac] ) +AC_ARG_ENABLE(v4l2-tracer, + AS_HELP_STRING([--disable-v4l2-tracer], [disable v4l2-tracer compilation]), + [case "${enableval}" in + yes | no ) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2-tracer) ;; + esac] +) + AC_ARG_ENABLE(v4l2-ctl-libv4l, AS_HELP_STRING([--disable-v4l2-ctl-libv4l], [disable use of libv4l in v4l2-ctl]), [case "${enableval}" in@@ -578,6 +586,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes]) +AM_CONDITIONAL([WITH_V4L2_TRACER], [test x$jsonc_pkgconfig = xyes -a x$enable_v4l2_tracer != xno]) PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no]) AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])@@ -628,6 +637,7 @@ AM_COND_IF([WITH_V4L2_CTL_32], [USE_V4L2_CTL_32="yes"], [USE_V4L2_CTL_32="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE], [USE_V4L2_COMPLIANCE="yes"], [USE_V4L2_COMPLIANCE="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE_LIBV4L="yes"], [USE_V4L2_COMPLIANCE_LIBV4L="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_32], [USE_V4L2_COMPLIANCE_32="yes"], [USE_V4L2_COMPLIANCE_32="no"]) +AM_COND_IF([WITH_V4L2_TRACER], [USE_V4L2_TRACER="yes"], [USE_V4L2_TRACER="no"]) AM_COND_IF([WITH_BPF], [USE_BPF="yes" AC_DEFINE([HAVE_BPF], [1], [BPF IR decoder support enabled])], [USE_BPF="no"])@@ -679,5 +689,6 @@ compile time options summary v4l2-compliance : $USE_V4L2_COMPLIANCE v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L v4l2-compliance-32 : $USE_V4L2_COMPLIANCE_32 + v4l2-tracer : $USE_V4L2_TRACER BPF IR Decoders: : $USE_BPF EOFutils/Makefile.am +1
-1@@ -15,7 +15,7 @@ SUBDIRS = \ cec-follower \ rds-ctl -if HAVE_JSONC +if WITH_V4L2_TRACER SUBDIRS += \ v4l2-tracer endifSignature · 1 line
2.39.1
Hi Niklas,
Thank you for the patch.
Quoted 4 lines · Niklas Söderlund
Add a configuration time option to disable compilation of the v4l2-tracer utility.
Signed-off-by Niklas Söderlund <[email protected]>
with my limited autotools knowledge.
I'll add the same option to meson support :-)
Quoted 86 lines
---
Hi Hans,
The v4l2-tracer fails to build on arm32. While I'm sure that can be fixed, this is an utility I don't use and building on target any thing I can disable in the build saves me time.
From completes, the classes of errors I see are around
v4l2_fourcc(),_IOR()and_IOWR().
../../include/linux/videodev2.h:81:66: error: narrowing conversion of '3039908417' from '__u32' {aka 'unsigned int'} to 'long int' [-Wnarrowing]
81 | #definev4l2_fourcc_be(a, b, c, d)(v4l2_fourcc(a, b, c, d)| (1U << 31))
../../include/linux/videodev2.h:2528:34: error: narrowing conversion of '2154321408' from 'unsigned int' to 'long int' [-Wnarrowing]
2528 | #defineVIDIOC_QUERYCAP_IOR('V', 0, struct v4l2_capability)
../../include/linux/videodev2.h:2529:33: error: narrowing conversion of '3225441794' from 'unsigned int' to 'long int' [-Wnarrowing]
2529 | #defineVIDIOC_ENUM_FMT_IOWR('V', 2, struct v4l2_fmtdesc)I'm building on target with gcc 12.1.0, nothing fancy,
$ ./bootstrap.sh && ./configure && makeKind Regards
Niklas--- configure.ac | 11 +++++++++++ utils/Makefile.am | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)configure.ac +11
-0@@ -497,6 +497,14 @@ AC_ARG_ENABLE(v4l2-compliance-32, esac] ) +AC_ARG_ENABLE(v4l2-tracer, + AS_HELP_STRING([--disable-v4l2-tracer], [disable v4l2-tracer compilation]), + [case "${enableval}" in + yes | no ) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-v4l2-tracer) ;; + esac] +) + AC_ARG_ENABLE(v4l2-ctl-libv4l, AS_HELP_STRING([--disable-v4l2-ctl-libv4l], [disable use of libv4l in v4l2-ctl]), [case "${enableval}" in@@ -578,6 +586,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno]) AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes]) +AM_CONDITIONAL([WITH_V4L2_TRACER], [test x$jsonc_pkgconfig = xyes -a x$enable_v4l2_tracer != xno]) PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7], [bpf_pc=yes], [bpf_pc=no]) AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang -a x$bpf_pc = xyes])@@ -628,6 +637,7 @@ AM_COND_IF([WITH_V4L2_CTL_32], [USE_V4L2_CTL_32="yes"], [USE_V4L2_CTL_32="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE], [USE_V4L2_COMPLIANCE="yes"], [USE_V4L2_COMPLIANCE="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE_LIBV4L="yes"], [USE_V4L2_COMPLIANCE_LIBV4L="no"]) AM_COND_IF([WITH_V4L2_COMPLIANCE_32], [USE_V4L2_COMPLIANCE_32="yes"], [USE_V4L2_COMPLIANCE_32="no"]) +AM_COND_IF([WITH_V4L2_TRACER], [USE_V4L2_TRACER="yes"], [USE_V4L2_TRACER="no"]) AM_COND_IF([WITH_BPF], [USE_BPF="yes" AC_DEFINE([HAVE_BPF], [1], [BPF IR decoder support enabled])], [USE_BPF="no"])@@ -679,5 +689,6 @@ compile time options summary v4l2-compliance : $USE_V4L2_COMPLIANCE v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L v4l2-compliance-32 : $USE_V4L2_COMPLIANCE_32 + v4l2-tracer : $USE_V4L2_TRACER BPF IR Decoders: : $USE_BPF EOFutils/Makefile.am +1
-1@@ -15,7 +15,7 @@ SUBDIRS = \ cec-follower \ rds-ctl -if HAVE_JSONC +if WITH_V4L2_TRACER SUBDIRS += \ v4l2-tracer endif
Signature · 3 lines
Regards, Laurent Pinchart