From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Peter Seiderer <ps.report@gmx.net>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [RFC v2 2/2] package/libv4l: enable v4l2-tracer
Date: Mon, 10 Apr 2023 21:47:37 +0200 [thread overview]
Message-ID: <20230410194737.GM2819@scaer> (raw)
In-Reply-To: <20230330123509.23696-2-ps.report@gmx.net>
Peter, All,
On 2023-03-30 14:35 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
> - fix --disable-v4l-tracer vs. --disable-v4l2-tracer typo
> - enhance compile failure log/research
>
> Fails with rpi4_64 config:
Obviously, we can't apply this for now, so I've marked is as "not
applicable" in patchwork.
> .../host/bin/aarch64-buildroot-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../utils/common -I.../aarch64-buildroot-linux-gnu/sysroot/usr/in
> clude/json-c -I../../lib/include -Wall -Wpointer-arith -D_GNU_SOURCE -I../../include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=6
> 4 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -std=gnu++11 -c libv4l2tracer.cpp -fPIC -DPIC -o .libs/libv4l2tracer_la-libv4l2tracer.o
> /tmp/ccXMMihl.s: Assembler messages:
> /tmp/ccXMMihl.s:208: Error: symbol `open64' is already defined
> /tmp/ccXMMihl.s:762: Error: symbol `mmap64' is already defined
> make[5]: *** [Makefile:751: libv4l2tracer_la-libv4l2tracer.lo] Error 1
This is going to be tricky to investigate: indeed, AIUI, libv4l2tracer
is going to be a shared lib thatr can be LD_PRELOADed explicitly to
trace a few system calls, like open, open64, mmap, mmap64, and a few
others...
So, the solution is not to rename those functions in libv4l2tracer.
All those 64-bit flags are starting to be messing with my brain... :-(
Regards,
Yann E. MORIN.
> The preprocessor output shows:
>
> [...]
> extern "C" {
> # 61 ".../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/mman.h" 3 4
> extern void * mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) noexcept (true) __asm__ ("" "mmap64");
> [...]
> extern void *mmap64 (void *__addr, size_t __len, int __prot,
> int __flags, int __fd, __off64_t __offset) noexcept (true);
>
> And host/aarch64-buildroot-linux-gnu/sysroot/usr/include/sys/mman.h:
>
> 56 #ifndef __USE_FILE_OFFSET64
> 57 extern void *mmap (void *__addr, size_t __len, int __prot,
> 58 int __flags, int __fd, __off_t __offset) __THROW;
> 59 #else
> 60 # ifdef __REDIRECT_NTH
> 61 extern void * __REDIRECT_NTH (mmap,
> 62 (void *__addr, size_t __len, int __prot,
> 63 int __flags, int __fd, __off64_t __offset),
> 64 mmap64);
> 65 # else
> 66 # define mmap mmap64
> 67 # endif
> 68 #endif
> 69 #ifdef __USE_LARGEFILE64
> 70 extern void *mmap64 (void *__addr, size_t __len, int __prot,
> 71 int __flags, int __fd, __off64_t __offset) __THROW;
> 72 #endif
> ---
> package/libv4l/Config.in | 1 +
> package/libv4l/libv4l.mk | 9 ++++++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
> index c88f280c3b..7a86c7de15 100644
> --- a/package/libv4l/Config.in
> +++ b/package/libv4l/Config.in
> @@ -33,6 +33,7 @@ config BR2_PACKAGE_LIBV4L_UTILS
> - v4l2-compliance
> - v4l2-ctl, cx18-ctl, ivtv-ctl
> - v4l2-sysfs-path
> + - v4l2-tracer (if json-c is enabled)
> - rds-ctl
> - qv4l2 (if Qt is enabled)
>
> diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
> index 1142a7442f..ccb4da4fb7 100644
> --- a/package/libv4l/libv4l.mk
> +++ b/package/libv4l/libv4l.mk
> @@ -9,7 +9,7 @@ LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
> LIBV4L_SITE = https://linuxtv.org/downloads/v4l-utils
> LIBV4L_INSTALL_STAGING = YES
> LIBV4L_DEPENDENCIES = host-pkgconf
> -LIBV4L_CONF_OPTS = --disable-doxygen-doc --disable-qvidcap --disable-v4l2-tracer
> +LIBV4L_CONF_OPTS = --disable-doxygen-doc --disable-qvidcap
> # needed to get utils/qv4l link flags right
> LIBV4L_AUTORECONF = YES
> # add host-gettext for AM_ICONV macro
> @@ -66,6 +66,13 @@ LIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11"
> # libelf and clang support
> LIBV4L_CONF_OPTS += --disable-bpf
>
> +ifeq ($(BR2_PACKAGE_JSON_C),y)
> +LIBV4L_CONF_OPTS += --enable-v4l2-tracer
> +LIBV4L_DEPENDENCIES += json-c
> +else
> +LIBV4L_CONF_OPTS += --disable-v4l2-tracer
> +endif
> +
> ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
> LIBV4L_CONF_OPTS += --enable-qv4l2
> LIBV4L_DEPENDENCIES += qt5base
> --
> 2.40.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-04-10 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 12:35 [Buildroot] [PATCH v2 1/2] package/libv4l: bump version to 1.24.1 Peter Seiderer
2023-03-30 12:35 ` [Buildroot] [RFC v2 2/2] package/libv4l: enable v4l2-tracer Peter Seiderer
2023-04-10 19:47 ` Yann E. MORIN [this message]
2023-04-10 19:43 ` [Buildroot] [PATCH v2 1/2] package/libv4l: bump version to 1.24.1 Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230410194737.GM2819@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=ps.report@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.