Message ID | 20230330123509.23696-2-ps.report@gmx.net |
---|---|
State | Not Applicable |
Headers | show |
Series | [v2,1/2] package/libv4l: bump version to 1.24.1 | expand |
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
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
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: .../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 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(-)