All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure
@ 2018-02-03 23:21 Peter Seiderer
  2018-02-04 22:43 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Seiderer @ 2018-02-03 23:21 UTC (permalink / raw)
  To: buildroot

Fixes [1]:

  sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'

[1] http://autobuild.buildroot.net/results/baa2595e1acdf4e795fbb940ca57fd136c827da3

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Patch fixes the qv4l2 linking problem for sparc, but adds a libatomic
dependency to all v4l libraries. Any better suggestions to add
libatomic linking only to utils/qv4l2?
---
 .../0003-configure.ac-check-for-libatomic.patch    | 30 ++++++++++++++++++++++
 package/libv4l/libv4l.mk                           |  5 ++++
 2 files changed, 35 insertions(+)
 create mode 100644 package/libv4l/0003-configure.ac-check-for-libatomic.patch

diff --git a/package/libv4l/0003-configure.ac-check-for-libatomic.patch b/package/libv4l/0003-configure.ac-check-for-libatomic.patch
new file mode 100644
index 0000000000..78aaada653
--- /dev/null
+++ b/package/libv4l/0003-configure.ac-check-for-libatomic.patch
@@ -0,0 +1,30 @@
+From 87978992fbcba13550e900fbe9abb2a60be98bf4 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 4 Feb 2018 00:08:45 +0100
+Subject: [PATCH] configure.ac: check for libatomic
+
+Fixes:
+
+  .../sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index dc1e9cbf..65a3caaa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -279,6 +279,8 @@ AS_IF([test x$enable_shared != xno],
+ 		   [have_pthread=no])],
+ 	[have_pthread=no])
+ 
++AC_SEARCH_LIBS([__atomic_load_4], [atomic])
++
+ # The dlopen() function is in the C library for *BSD and in
+ # libdl on GLIBC-based systems
+ 
+-- 
+2.16.1
+
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
index 11061306c7..bc9b5c9abd 100644
--- a/package/libv4l/libv4l.mk
+++ b/package/libv4l/libv4l.mk
@@ -11,6 +11,11 @@ LIBV4L_INSTALL_STAGING = YES
 LIBV4L_DEPENDENCIES = host-pkgconf
 LIBV4L_CONF_OPTS = --disable-doxygen-doc
 
+# patch 0003-configure.ac-check-for-libatomic.patch touches configure.ac
+LIBV4L_AUTORECONF = YES
+# host-gettext needed for autoreconf to work
+LIBV4L_DEPENDENCIES += host-gettext
+
 # fix uclibc-ng configure/compile
 LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
 
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure
  2018-02-03 23:21 [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure Peter Seiderer
@ 2018-02-04 22:43 ` Thomas Petazzoni
  2018-02-06 21:02   ` Peter Seiderer
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2018-02-04 22:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun,  4 Feb 2018 00:21:27 +0100, Peter Seiderer wrote:
> Fixes [1]:
> 
>   sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
> 
> [1] http://autobuild.buildroot.net/results/baa2595e1acdf4e795fbb940ca57fd136c827da3

Did you analyze what part of the code is using atomic intrinsics? I
don't see any use of atomic instrisics in qv4l2 itself (but perhaps I
missed them), so they must be somewhere else.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure
  2018-02-04 22:43 ` Thomas Petazzoni
@ 2018-02-06 21:02   ` Peter Seiderer
  2018-02-12 20:19     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Seiderer @ 2018-02-06 21:02 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sun, 4 Feb 2018 23:43:01 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Sun,  4 Feb 2018 00:21:27 +0100, Peter Seiderer wrote:
> > Fixes [1]:
> > 
> >   sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
> > 
> > [1] http://autobuild.buildroot.net/results/baa2595e1acdf4e795fbb940ca57fd136c827da3  
> 
> Did you analyze what part of the code is using atomic intrinsics? I
> don't see any use of atomic instrisics in qv4l2 itself (but perhaps I
> missed them), so they must be somewhere else.

The atomic usage comes from the Qt5 libraries (libQt5Core.so,
libQt5Gui.so and libQt5Widgets.so)...

Regards,
Peter

> 
> Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure
  2018-02-06 21:02   ` Peter Seiderer
@ 2018-02-12 20:19     ` Thomas Petazzoni
  2019-02-04  9:32       ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2018-02-12 20:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 6 Feb 2018 22:02:59 +0100, Peter Seiderer wrote:

> > 
> > On Sun,  4 Feb 2018 00:21:27 +0100, Peter Seiderer wrote:  
> > > Fixes [1]:
> > > 
> > >   sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
> > > 
> > > [1] http://autobuild.buildroot.net/results/baa2595e1acdf4e795fbb940ca57fd136c827da3    
> > 
> > Did you analyze what part of the code is using atomic intrinsics? I
> > don't see any use of atomic instrisics in qv4l2 itself (but perhaps I
> > missed them), so they must be somewhere else.  
> 
> The atomic usage comes from the Qt5 libraries (libQt5Core.so,
> libQt5Gui.so and libQt5Widgets.so)...

Isn't Qt installing some .pc files ? Are they being used by libv4l ? If
so, are these .pc files referencing libatomic ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure
  2018-02-12 20:19     ` Thomas Petazzoni
@ 2019-02-04  9:32       ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2019-02-04  9:32 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-02-12 21:19 +0100, Thomas Petazzoni spake thusly:
> On Tue, 6 Feb 2018 22:02:59 +0100, Peter Seiderer wrote:
> > > On Sun,  4 Feb 2018 00:21:27 +0100, Peter Seiderer wrote:  
> > > > Fixes [1]:
> > > > 
> > > >   sparc-buildroot-linux-uclibc/bin/ld: qv4l2-qv4l2.o: undefined reference to symbol '__atomic_fetch_add_4@@LIBATOMIC_1.0'
> > > > 
> > > > [1] http://autobuild.buildroot.net/results/baa2595e1acdf4e795fbb940ca57fd136c827da3    
> > > 
> > > Did you analyze what part of the code is using atomic intrinsics? I
> > > don't see any use of atomic instrisics in qv4l2 itself (but perhaps I
> > > missed them), so they must be somewhere else.  
> > 
> > The atomic usage comes from the Qt5 libraries (libQt5Core.so,
> > libQt5Gui.so and libQt5Widgets.so)...
> 
> Isn't Qt installing some .pc files ? Are they being used by libv4l ? If
> so, are these .pc files referencing libatomic ?

So, this 1 year old patch is still pending, and you did not reply to
Thomas questiiiion about using the .pc files from Qt.

I've marked this patch as changes-requested in patchwork. If you believe
something is still needed, can you please respin an updated patch that
takes into account Thomas' comments.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-04  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-03 23:21 [Buildroot] [RFC v1] libv4l: fix qv4l2 libatomic related compile failure Peter Seiderer
2018-02-04 22:43 ` Thomas Petazzoni
2018-02-06 21:02   ` Peter Seiderer
2018-02-12 20:19     ` Thomas Petazzoni
2019-02-04  9:32       ` Yann E. MORIN

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.