diff --git a/pulseview-0.4.0-gcc8-exception.patch b/pulseview-0.4.0-gcc8-exception.patch new file mode 100644 index 0000000..30e2b42 --- /dev/null +++ b/pulseview-0.4.0-gcc8-exception.patch @@ -0,0 +1,156 @@ +diff -up pulseview-0.4.0/main.cpp.gcc8 pulseview-0.4.0/main.cpp +--- pulseview-0.4.0/main.cpp.gcc8 2018-03-22 11:14:53.091197542 +0100 ++++ pulseview-0.4.0/main.cpp 2018-03-22 11:14:59.971344515 +0100 +@@ -207,7 +207,7 @@ int main(int argc, char *argv[]) + // Run the application + ret = a.exec(); + +- } catch (exception e) { ++ } catch (exception& e) { + qDebug() << e.what(); + } + +diff -up pulseview-0.4.0/pv/binding/device.cpp.gcc8 pulseview-0.4.0/pv/binding/device.cpp +--- pulseview-0.4.0/pv/binding/device.cpp.gcc8 2018-03-22 11:20:04.437855540 +0100 ++++ pulseview-0.4.0/pv/binding/device.cpp 2018-03-22 11:20:16.778114484 +0100 +@@ -69,7 +69,7 @@ Device::Device(shared_ptrdescription(); +- } catch (Error e) { ++ } catch (Error& e) { + name_str = key->name(); + } + +diff -up pulseview-0.4.0/pv/session.cpp.gcc8 pulseview-0.4.0/pv/session.cpp +--- pulseview-0.4.0/pv/session.cpp.gcc8 2018-03-22 11:16:23.943141834 +0100 ++++ pulseview-0.4.0/pv/session.cpp 2018-03-22 11:17:07.734081970 +0100 +@@ -475,7 +475,7 @@ void Session::load_file(QString file_nam + new devices::SessionFile( + device_manager_.context(), + file_name.toStdString()))); +- } catch (Error e) { ++ } catch (Error& e) { + main_bar_->session_error(tr("Failed to load ") + file_name, e.what()); + set_default_device(); + main_bar_->update_device_list(); +@@ -645,7 +645,7 @@ bool Session::add_decoder(srd_decoder *c + + for (shared_ptr view : views_) + view->add_decode_signal(signalbase); +- } catch (runtime_error e) { ++ } catch (runtime_error& e) { + return false; + } + +@@ -841,7 +841,7 @@ void Session::sample_thread_proc(functio + + try { + device_->start(); +- } catch (Error e) { ++ } catch (Error& e) { + error_handler(e.what()); + return; + } +@@ -851,7 +851,7 @@ void Session::sample_thread_proc(functio + + try { + device_->run(); +- } catch (Error e) { ++ } catch (Error& e) { + error_handler(e.what()); + set_capture_state(Stopped); + return; +@@ -1070,7 +1070,7 @@ void Session::data_feed_in(shared_ptr(packet->payload())); +- } catch (bad_alloc) { ++ } catch (bad_alloc&) { + out_of_memory_ = true; + device_->stop(); + } +@@ -1079,7 +1079,7 @@ void Session::data_feed_in(shared_ptr(packet->payload())); +- } catch (bad_alloc) { ++ } catch (bad_alloc&) { + out_of_memory_ = true; + device_->stop(); + } +diff -up pulseview-0.4.0/pv/storesession.cpp.gcc8 pulseview-0.4.0/pv/storesession.cpp +--- pulseview-0.4.0/pv/storesession.cpp.gcc8 2018-03-22 11:15:34.392080308 +0100 ++++ pulseview-0.4.0/pv/storesession.cpp 2018-03-22 11:15:45.682322177 +0100 +@@ -175,7 +175,7 @@ bool StoreSession::start() + {{ConfigKey::SAMPLERATE, Glib::Variant::create( + any_segment->samplerate())}}); + output_->receive(meta); +- } catch (Error error) { ++ } catch (Error& error) { + error_ = tr("Error while saving: ") + error.what(); + return false; + } +@@ -269,7 +269,7 @@ void StoreSession::store_proc(vector< sh + + delete[] ldata; + } +- } catch (Error error) { ++ } catch (Error& error) { + error_ = tr("Error while saving: ") + error.what(); + break; + } +diff -up pulseview-0.4.0/pv/views/trace/decodetrace.cpp.gcc8 pulseview-0.4.0/pv/views/trace/decodetrace.cpp +--- pulseview-0.4.0/pv/views/trace/decodetrace.cpp.gcc8 2018-03-22 11:26:24.405987117 +0100 ++++ pulseview-0.4.0/pv/views/trace/decodetrace.cpp 2018-03-22 11:26:37.726274102 +0100 +@@ -212,7 +212,7 @@ void DecodeTrace::paint_mid(QPainter &p, + int row_title_width; + try { + row_title_width = row_title_widths_.at(row); +- } catch (out_of_range) { ++ } catch (out_of_range&) { + const int w = p.boundingRect(QRectF(), 0, row.title()).width() + + RowTitleMargin; + row_title_widths_[row] = w; +diff -up pulseview-0.4.0/pv/toolbars/mainbar.cpp.gcc8 pulseview-0.4.0/pv/toolbars/mainbar.cpp +--- pulseview-0.4.0/pv/toolbars/mainbar.cpp.gcc8 2018-03-22 11:34:50.626877579 +0100 ++++ pulseview-0.4.0/pv/toolbars/mainbar.cpp 2018-03-22 11:35:05.297192755 +0100 +@@ -374,7 +374,7 @@ void MainBar::update_sample_rate_selecto + updating_sample_rate_ = true; + sample_rate_.set_value(samplerate); + updating_sample_rate_ = false; +- } catch (Error error) { ++ } catch (Error& error) { + qDebug() << "WARNING: Failed to get value of sample rate"; + return; + } +@@ -514,7 +514,7 @@ void MainBar::commit_sample_rate() + sr_dev->config_set(ConfigKey::SAMPLERATE, + Glib::Variant::create(sample_rate)); + update_sample_rate_selector(); +- } catch (Error error) { ++ } catch (Error& error) { + qDebug() << "Failed to configure samplerate."; + return; + } +@@ -542,7 +542,7 @@ void MainBar::commit_sample_count() + sr_dev->config_set(ConfigKey::LIMIT_SAMPLES, + Glib::Variant::create(sample_count)); + update_sample_count_selector(); +- } catch (Error error) { ++ } catch (Error& error) { + qDebug() << "Failed to configure sample count."; + return; + } +diff -up pulseview-0.4.0/pv/devices/inputfile.cpp.gcc8 pulseview-0.4.0/pv/devices/inputfile.cpp +--- pulseview-0.4.0/pv/devices/inputfile.cpp.gcc8 2018-03-22 11:35:41.707975001 +0100 ++++ pulseview-0.4.0/pv/devices/inputfile.cpp 2018-03-22 11:35:52.538207676 +0100 +@@ -74,7 +74,7 @@ void InputFile::open() + + try { + device_ = input_->device(); +- } catch (sigrok::Error) { ++ } catch (sigrok::Error&) { + return; + } + diff --git a/pulseview.spec b/pulseview.spec index 4ea89c3..4e47964 100644 --- a/pulseview.spec +++ b/pulseview.spec @@ -1,11 +1,13 @@ Name: pulseview Version: 0.4.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Signal acquisition and analysis GUI for sigrok # Combined GPLv3+ (libsigrok and libsigrokdecode) and GPLv2+ (pulseview) License: GPLv3+ URL: http://www.sigrok.org Source0: %{url}/download/source/%{name}/%{name}-%{version}.tar.gz +# https://bugzilla.redhat.com/show_bug.cgi?id=1556138 +Patch0: %{name}-0.4.0-gcc8-exception.patch BuildRequires: pkgconfig(libsigrokcxx) >= 0.5.0 BuildRequires: pkgconfig(libsigrokdecode) >= 0.5.0 BuildRequires: qt5-devel @@ -27,7 +29,7 @@ libraries under the hood. %autosetup -p1 %build -%cmake -DCMAKE_BUILD_TYPE=Release +%cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_WERROR=True make %{?_smp_mflags} %install @@ -52,6 +54,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata %{_datadir}/appdata/org.sigrok.PulseView.appdata.xml %changelog +* Thu Mar 22 2018 Dan HorĂ¡k - 0.4.0-9 +- Fix FTBFS (#1556138) + * Fri Feb 09 2018 Fedora Release Engineering - 0.4.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild