From f0d710e15b65802bbd757708bd365dd7be918e661f213c3499513edcf55391a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 28 Apr 2021 00:40:44 +0000 Subject: [PATCH 1/2] Accepting request 888884 from home:StefanBruens:branches:electronics - Fix build with GLib 2.68, add 0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch OBS-URL: https://build.opensuse.org/request/show/888884 OBS-URL: https://build.opensuse.org/package/show/electronics/pulseview?expand=0&rev=24 --- ...d-due-to-C-template-behind-C-linkage.patch | 54 +++++++++++++++++++ pulseview.changes | 6 +++ pulseview.spec | 7 +-- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch diff --git a/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch b/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch new file mode 100644 index 0000000..777efea --- /dev/null +++ b/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch @@ -0,0 +1,54 @@ +From a0548140aa7a1d48642e638e31d5efa8a6677b84 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +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 + +As libsigrokdecode.h declares extern C linkage itself where necessary, +remove it from pulseviews include statements from the last two occasions. +--- + 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 7c720430..5954a2a5 100644 +--- a/pv/data/decode/annotation.cpp ++++ b/pv/data/decode/annotation.cpp +@@ -17,9 +17,7 @@ + * along with this program; if not, see . + */ + +-extern "C" { + #include +-} + + #include + #include +diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp +index 509e77f6..5c93d07d 100644 +--- a/pv/views/trace/decodetrace.cpp ++++ b/pv/views/trace/decodetrace.cpp +@@ -17,9 +17,7 @@ + * along with this program; if not, see . + */ + +-extern "C" { + #include +-} + + #include + +-- +2.31.1 + diff --git a/pulseview.changes b/pulseview.changes index 1c5450c..d529935 100644 --- a/pulseview.changes +++ b/pulseview.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 28 00:17:52 UTC 2021 - Stefan Brüns + +- Fix build with GLib 2.68, add + 0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch + ------------------------------------------------------------------- Mon Jun 22 18:36:42 UTC 2020 - Stefan Brüns diff --git a/pulseview.spec b/pulseview.spec index 814db52..4702f0a 100644 --- a/pulseview.spec +++ b/pulseview.spec @@ -1,7 +1,7 @@ # # spec file for package pulseview # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ URL: https://sigrok.org Source0: https://sigrok.org/download/source/pulseview/%{name}-%{version}.tar.gz # PATCH-FIX-OPENSUSE Patch0: 0001-Fix-building-with-Qt-5.15.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch BuildRequires: cmake BuildRequires: glib2-devel BuildRequires: libboost_filesystem-devel @@ -49,8 +51,7 @@ logic analyzer hardware products. PulseView is a Qt-based GUI for sigrok. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build export CXXFLAGS="%{optflags} -fpermissive" From 40f61be70e5100559edc1b61590ef10db01dc206c03b91c771c4f1911667d260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 28 Apr 2021 09:20:06 +0000 Subject: [PATCH 2/2] Accepting request 888983 from home:StefanBruens:branches:electronics rebase patch OBS-URL: https://build.opensuse.org/request/show/888983 OBS-URL: https://build.opensuse.org/package/show/electronics/pulseview?expand=0&rev=25 --- ...-broken-build-due-to-C-template-behind-C-linkage.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch b/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch index 777efea..ad6d32c 100644 --- a/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch +++ b/0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch @@ -1,4 +1,4 @@ -From a0548140aa7a1d48642e638e31d5efa8a6677b84 Mon Sep 17 00:00:00 2001 +From fb89dd11f2a4a08b73c498869789e38677181a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 28 Apr 2021 02:14:47 +0200 Subject: [PATCH] Fix broken build due to C++ template behind C linkage @@ -22,7 +22,7 @@ remove it from pulseviews include statements from the last two occasions. 2 files changed, 4 deletions(-) diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp -index 7c720430..5954a2a5 100644 +index 7f233478..f8a5c47b 100644 --- a/pv/data/decode/annotation.cpp +++ b/pv/data/decode/annotation.cpp @@ -17,9 +17,7 @@ @@ -36,7 +36,7 @@ index 7c720430..5954a2a5 100644 #include #include diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp -index 509e77f6..5c93d07d 100644 +index 409f1d28..888064d0 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -17,9 +17,7 @@ @@ -47,8 +47,8 @@ index 509e77f6..5c93d07d 100644 #include -} + #include #include - -- 2.31.1