Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pulseview: fix build with libglib >= 2.68
@ 2021-08-07 19:54 Fabrice Fontaine
  2021-08-08 19:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-08-07 19:54 UTC (permalink / raw)
  To: buildroot; +Cc: Bartosz Golaszewski, Fabrice Fontaine

Fix the following build failure with libglib >= 2.68 raised since commit
c72524fb1b1c6b7dd1b1f511eea0fdf5a39dd3a0:

In file included from /tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib/gatomic.h:31,
                 from /tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib/gthread.h:32,
                 from /tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib/gasyncqueue.h:32,
                 from /tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib.h:32,
                 from /tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/libsigrokdecode/libsigrokdecode.h:25,
                 from /tmp/instance-0/output-1/build/pulseview-0.4.2/pv/data/decode/annotation.cpp:21:
/tmp/instance-0/output-1/host/opt/ext-toolchain/mips64el-buildroot-linux-uclibc/include/c++/8.4.0/type_traits:56:3: error: template with C linkage
   template<typename _Tp, _Tp __v>
   ^~~~~~~~
/tmp/instance-0/output-1/build/pulseview-0.4.2/pv/data/decode/annotation.cpp:20:1: note: 'extern "C"' linkage started here
 extern "C" {
 ^~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/33cbaaeefd8637bac4ad0fbbfae7c369de4875d2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...d-due-to-C-template-behind-C-linkage.patch | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 package/pulseview/0002-Fix-broken-build-due-to-C-template-behind-C-linkage.patch

diff --git a/package/pulseview/0002-Fix-broken-build-due-to-C-template-behind-C-linkage.patch b/package/pulseview/0002-Fix-broken-build-due-to-C-template-behind-C-linkage.patch
new file mode 100644
index 0000000000..16d4cfdb00
--- /dev/null
+++ b/package/pulseview/0002-Fix-broken-build-due-to-C-template-behind-C-linkage.patch
@@ -0,0 +1,58 @@
+From ed643f0b4ac587204a5243451cda181ee1405d62 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
+Date: Wed, 28 Apr 2021 02:14:47 +0200
+Subject: [PATCH] Fix broken build due to C++ template behind C linkage
+
+glib/gatomic.h since 2.68 includes type_traits, which causes a compilation
+error:
+In file included from /usr/include/glib-2.0/glib/gatomic.h:31,
+                 from /usr/include/glib-2.0/glib/gthread.h:32,
+                 from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
+                 from /usr/include/glib-2.0/glib.h:32,
+                 from /usr/include/libsigrokdecode/libsigrokdecode.h:25,
+                 from /home/abuild/rpmbuild/BUILD/pulseview-0.4.2/pv/data/decode/annotation.cpp:21:
+/usr/include/c++/10/type_traits:2308:3: error: template with C linkage
+2308 |   template<typename _CTp, typename _Rp>
+
+As libsigrokdecode.h declares extern C linkage itself where necessary,
+remove it from pulseviews include statements from the last two occasions.
+
+[Retrieved from:
+https://sigrok.org/gitweb/?p=pulseview.git;a=commit;h=ed643f0b4ac587204a5243451cda181ee1405d62]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ pv/data/decode/annotation.cpp  | 2 --
+ pv/views/trace/decodetrace.cpp | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp
+index 7f233478..f8a5c47b 100644
+--- a/pv/data/decode/annotation.cpp
++++ b/pv/data/decode/annotation.cpp
+@@ -17,9 +17,7 @@
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
+ 
+-extern "C" {
+ #include <libsigrokdecode/libsigrokdecode.h>
+-}
+ 
+ #include <cassert>
+ #include <vector>
+diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp
+index 409f1d28..888064d0 100644
+--- a/pv/views/trace/decodetrace.cpp
++++ b/pv/views/trace/decodetrace.cpp
+@@ -17,9 +17,7 @@
+  * along with this program; if not, see <http://www.gnu.org/licenses/>.
+  */
+ 
+-extern "C" {
+ #include <libsigrokdecode/libsigrokdecode.h>
+-}
+ 
+ #include <limits>
+ #include <mutex>
+-- 
+2.24.0.rc2
+
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-08 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-07 19:54 [Buildroot] [PATCH 1/1] package/pulseview: fix build with libglib >= 2.68 Fabrice Fontaine
2021-08-08 19:55 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox