Bug#897806: lmms: ftbfs with GCC-8

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Thu Sep 6 14:53:39 BST 2018


Package: lmms
Version: 1.1.3-7.1
Followup-For: Bug #897806

Please apply the attached patches that fix FTBFS patch.

-- 
With best wishes
Dmitry


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lmms depends on:
ii  calf-ladspa                       1.1.3-7.1
ii  libasound2                        1.1.6-1
ii  libc6                             2.27-5
ii  libfftw3-single3                  3.3.8-1
ii  libfltk1.3                        1.3.4-7
ii  libfluidsynth1                    1.1.11-1
ii  libgcc1                           1:8.2.0-4
ii  libjack-jackd2-0 [libjack-0.125]  1.9.12~dfsg-2
ii  libogg0                           1.3.2-1+b1
ii  libportaudio2                     19.6.0-1
ii  libpulse0                         12.0-1
ii  libqt4-xml                        4:4.8.7+dfsg-17
ii  libqtcore4                        4:4.8.7+dfsg-17
ii  libqtgui4                         4:4.8.7+dfsg-17
ii  libsamplerate0                    0.1.9-2
ii  libsdl1.2debian                   1.2.15+dfsg2-1
ii  libsndfile1                       1.0.28-4
ii  libstdc++6                        8.2.0-4
ii  libstk-4.5.0                      4.5.2+dfsg-5+b2
ii  libvorbis0a                       1.3.6-1
ii  libvorbisenc2                     1.3.6-1
ii  libvorbisfile3                    1.3.6-1
ii  lmms-common                       1.1.3-7.1
ii  stk                               4.5.2+dfsg-5+b2
ii  zlib1g                            1:1.2.11.dfsg-1

Versions of packages lmms recommends:
ii  caps             0.9.24-5
ii  lmms-vst-server  1.1.3-7.1
ii  tap-plugins      1.0.0-1

Versions of packages lmms suggests:
ii  amb-plugins [ladspa-plugin]                   0.8.1-7
ii  ambdec [ladspa-plugin]                        0.5.1-5
ii  autotalent [ladspa-plugin]                    0.2-5
ii  blepvco [ladspa-plugin]                       0.1.0-3+b1
ii  blop [ladspa-plugin]                          0.2.8-6
ii  bs2b-ladspa [ladspa-plugin]                   0.9.1-3
ii  calf-ladspa [ladspa-plugin]                   1.1.3-7.1
ii  caps [ladspa-plugin]                          0.9.24-5
ii  cmt [ladspa-plugin]                           1.16-2
ii  csladspa [ladspa-plugin]                      1:6.10.0~dfsg-2
ii  fil-plugins [ladspa-plugin]                   0.3.0-6
ii  fluid-soundfont-gm                            3.1-5.1
ii  freepats                                      20060219-1
ii  guitarix-ladspa [ladspa-plugin]               0.36.1-1
ii  invada-studio-plugins-ladspa [ladspa-plugin]  0.3.1-5
ii  ladspa-sdk [ladspa-plugin]                    1.13-3
ii  mcp-plugins [ladspa-plugin]                   0.4.0-6
ii  omins [ladspa-plugin]                         0.2.0-7.1
ii  rev-plugins [ladspa-plugin]                   0.7.1-3
ii  ste-plugins [ladspa-plugin]                   0.0.2-6
ii  swh-plugins [ladspa-plugin]                   0.4.17-2
ii  tap-plugins [ladspa-plugin]                   1.0.0-1
ii  vco-plugins [ladspa-plugin]                   0.3.0-5
ii  wah-plugins [ladspa-plugin]                   0.1.0-4

-- no debconf information
-------------- next part --------------
From: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date: Thu, 6 Sep 2018 16:47:09 +0300
Subject: zynaddsubfx: fix format overflow errors

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 plugins/zynaddsubfx/zynaddsubfx/src/UI/ADnoteUI.fl   | 4 ++--
 plugins/zynaddsubfx/zynaddsubfx/src/UI/MasterUI.fl   | 4 ++--
 plugins/zynaddsubfx/zynaddsubfx/src/UI/OscilGenUI.fl | 4 ++--
 plugins/zynaddsubfx/zynaddsubfx/src/UI/PartUI.fl     | 6 +++---
 plugins/zynaddsubfx/zynaddsubfx/src/UI/SUBnoteUI.fl  | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/ADnoteUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/ADnoteUI.fl
index 1a21cb1..6484360 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/ADnoteUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/ADnoteUI.fl
@@ -128,7 +128,7 @@ if (o->value()==0) voicelistitemgroup->deactivate();
 else voicelistitemgroup->activate();
 o->redraw();}
         private xywh {30 5 20 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 4
-        code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",nvoice+1);o->label(strdup(tmp));}
         code1 {o->value(pars->VoicePar[nvoice].Enabled);}
       }
     }
@@ -717,7 +717,7 @@ o->redraw();}
         Fl_Group {} {
           label 01
           xywh {5 5 55 35} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 16
-          code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));}
+          code0 {char tmp[12];snprintf(tmp,12,"%d",nvoice+1);o->label(strdup(tmp));}
         } {}
         Fl_Choice {} {
           callback {int x=(int) o->value();
diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/MasterUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/MasterUI.fl
index 254e505..17ae7bb 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/MasterUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/MasterUI.fl
@@ -291,7 +291,7 @@ labelsize(10);
 align(FL_ALIGN_TOP);
 
 value(master->Psysefxsend[neff1][neff2]);
-char tmp[20];snprintf(tmp,20,"%d->%d",neff1+1,neff2+1);
+char tmp[25];snprintf(tmp,25,"%d->%d",neff1+1,neff2+1);
 this->copy_label(tmp);} {}
   }
   Function {~SysEffSend()} {} {
@@ -385,7 +385,7 @@ if ((int) o->value()==0) panellistitemgroup->deactivate();
 
 o->redraw();}
         private xywh {5 0 45 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 24
-        code0 {char tmp[10];snprintf(tmp,10,"%d",npart+1);o->copy_label(tmp);}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",npart+1);o->copy_label(tmp);}
         code1 {o->value(master->part[npart]->Penabled);}
       }
     }
diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/OscilGenUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/OscilGenUI.fl
index 54329db..68ca3a4 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/OscilGenUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/OscilGenUI.fl
@@ -313,12 +313,12 @@ if (cbwidget!=NULL) {
       Fl_Box {} {
         label 01
         xywh {0 210 20 15} labelfont 1 labelsize 9 align 20
-        code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",n+1);o->label(strdup(tmp));}
       }
       Fl_Box {} {
         label 01
         xywh {0 0 20 15} labelfont 1 labelsize 9 align 20
-        code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",n+1);o->label(strdup(tmp));}
       }
     }
   }
diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/PartUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/PartUI.fl
index 0040bbf..e11ef8d 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/PartUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/PartUI.fl
@@ -56,7 +56,7 @@ class PartSysEffSend {open : {public Fl_Group}
         xywh {0 0 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 align 130 maximum 127 step 1
         code0 {o->size(25,25);}
         code1 {o->value(master->Psysefxvol[neff][npart]);}
-        code2 {char tmp[10];snprintf(tmp,10,"%d",neff+1);o->copy_label(tmp);}
+        code2 {char tmp[12];snprintf(tmp,12,"%d",neff+1);o->copy_label(tmp);}
         class WidgetPDial
       }
     }
@@ -207,7 +207,7 @@ o->redraw();
 partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0
 } else o->value(1);}
         private xywh {30 0 20 15} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 4
-        code0 {snprintf(label,10,"%d",n+1);o->label(label);}
+        code0 {snprintf(label,12,"%d",n+1);o->label(label);}
         code1 {o->value(part->kit[n].Penabled);}
         code2 {if (n==0) o->deactivate();}
       }
@@ -265,7 +265,7 @@ end();} {}
   decl {Part *part;} {}
   decl {int n;} {}
   decl {Master *master;} {}
-  decl {char label[10];} {}
+  decl {char label[12];} {}
   decl {class PartUI *partui;} {}
 } 
 
diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/SUBnoteUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/SUBnoteUI.fl
index f77beef..610307f 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/SUBnoteUI.fl
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/SUBnoteUI.fl
@@ -70,12 +70,12 @@ pars->Phrelbw[n]=x;}
       Fl_Box {} {
         label 01
         xywh {0 288 10 15} labelfont 1 labelsize 9 align 20
-        code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",n+1);o->label(strdup(tmp));}
       }
       Fl_Box {} {
         label 01
         xywh {0 0 10 15} labelfont 1 labelsize 9 align 20
-        code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
+        code0 {char tmp[12];snprintf(tmp,12,"%d",n+1);o->label(strdup(tmp));}
       }
     }
   }
-------------- next part --------------
From: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date: Thu, 6 Sep 2018 16:50:01 +0300
Subject: zynaddsubfx: fix memaccess to complex type errors

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp b/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
index 6cd89dc..55d1179 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
@@ -33,7 +33,9 @@
 //operations on FFTfreqs
 inline void clearAll(fft_t *freqs)
 {
-    memset(freqs, 0, synth->oscilsize / 2 * sizeof(fft_t));
+    fft_t zero = fft_t(0, 0);
+    for (int i = 0; i < synth->oscilsize; ++i)
+	freqs[i] = zero;
 }
 
 inline void clearDC(fft_t *freqs)
@@ -928,8 +930,9 @@ void OscilGen::getspectrum(int n, float *spc, int what)
     if(what == 0) {
         for(int i = 0; i < n; ++i)
             outoscilFFTfreqs[i] = fft_t(spc[i], spc[i]);
-        memset(outoscilFFTfreqs + n, 0,
-               (synth->oscilsize / 2 - n) * sizeof(fft_t));
+	fft_t zero = fft_t(0, 0);
+	for (int i = n; i < synth->oscilsize; ++i)
+            outoscilFFTfreqs[i] = zero;
         adaptiveharmonic(outoscilFFTfreqs, 0.0f);
         adaptiveharmonicpostprocess(outoscilFFTfreqs, n - 1);
         for(int i = 0; i < n; ++i)
-------------- next part --------------
From: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Date: Thu, 6 Sep 2018 16:47:09 +0300
Subject: zynaddsubfx: fix format overflow error

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 plugins/zynaddsubfx/zynaddsubfx/src/Misc/Microtonal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/Misc/Microtonal.h b/plugins/zynaddsubfx/zynaddsubfx/src/Misc/Microtonal.h
index d294285..3c3b9cb 100644
--- a/plugins/zynaddsubfx/zynaddsubfx/src/Misc/Microtonal.h
+++ b/plugins/zynaddsubfx/zynaddsubfx/src/Misc/Microtonal.h
@@ -28,7 +28,7 @@
 #include "XMLwrapper.h"
 
 #define MAX_OCTAVE_SIZE 128
-#define MICROTONAL_MAX_NAME_LEN 120
+#define MICROTONAL_MAX_NAME_LEN 500
 
 #include <stdio.h>
 
-------------- next part --------------
From: Matt Kline <matt at bitbashing.io>
Date: Fri, 11 May 2018 23:16:19 -0700
Subject: FPTruncateMode: Removed unused variables on non-386

While we're at it, make fistp an inline function. Type safety is nice.
---
 plugins/LadspaEffect/caps/dsp/FPTruncateMode.h | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h b/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
index 354d062..4fd1536 100644
--- a/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
+++ b/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h
@@ -24,11 +24,9 @@
 	#define fistp(f,i) \
 		__asm__ ("fistpl %0" : "=m" (i) : "t" (f) : "st")
 #else /* ! __i386__ */
-	#define fstcw(i)
-	#define fldcw(i)
+	#include <cstdint>
 
-	#define fistp(f,i) \
-			i = (int) f
+	inline void fistp(float f, int32_t& i) { i = static_cast<int32_t>(f); }
 #endif
 
 namespace DSP {
@@ -36,12 +34,13 @@ namespace DSP {
 class FPTruncateMode
 {
 	public:
-		int cw0, cw1; /* fp control word */
+#ifdef __i386__
+		int cw0; /* fp control word */
 
 		FPTruncateMode()
 			{
 				fstcw (cw0);
-				cw1 = cw0 | 0xC00;
+				const int cw1 = cw0 | 0xC00;
 				fldcw (cw1);
 			}
 
@@ -49,6 +48,11 @@ class FPTruncateMode
 			{
 				fldcw (cw0);
 			}
+#else
+	// Avoid warnings about unused variables
+	FPTruncateMode() { (void)0; }
+	~FPTruncateMode() { (void)0; }
+#endif
 };
 
 } /* namespace DSP */


More information about the Debian-edu-pkg-team mailing list