Bug#769264: Bug #769264: freebirth: FTBFS in jessie/i386: XXX

2014-11-22 Thread Michael Banck
On Sat, Nov 22, 2014 at 03:20:26PM -0500, Paul Brossier wrote:
> thanks a lot for looking at this. it sounds like a fairly safe option,
> given how awkward and ancient this code is.
> 
> i will give it a go and upload it in a few days.

OTOH, I couldn't get it to run in order to test it - even after loading
OSS compat support etc., it segfaulted on startup...

Michael


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#769264: Bug #769264: freebirth: FTBFS in jessie/i386: XXX

2014-11-22 Thread Paul Brossier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Michael,

thanks a lot for looking at this. it sounds like a fairly safe option,
given how awkward and ancient this code is.

i will give it a go and upload it in a few days.

best, Paul


On 22/11/2014 15:14, Michael Banck wrote:
> tags 769264 +patch thanks
> 
> Hi,
> 
> On Wed, Nov 12, 2014 at 11:45:28AM +0100, Lucas Nussbaum wrote:
>>> ./fusebirth > fused_loop.c 2>/dev/null make[1]: ***
>>> [fused_loop.c] Error 139
> 
> So what happens here is that fusebirth segfaults on i386 in
> topo_sort(), while trying to sort whatever in order to generate
> fused_loop.c.
> 
> Tracing through topo_sort() with a debugger, it seems that after a
> dozen or so recursions into it, get_children(node) returns an
> invalid (but not NULL) pointer, and on the next iteration we get a
> segfault in it.
> 
> I stared at the code for a few hours, but it doesn't look like this
> is how GLib is supposed to be used nowadays, so I went for an
> alternative solution: I just included the auto-generated .c code
> into the source package and changed the build system to not
> generate/delete that .c file.
> 
> I made sure the generated source is the same on amd64 and s390x and
> will test on a couple more architectures to make sure.
> 
> Proposed Debdiff attached.
> 
> 
> Michael
> 

-BEGIN PGP SIGNATURE-

iKYEARECAGYFAlRw8ApfFIAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
bnBncC5maWZ0aGhvcnNlbWFuLm5ldEJEMkE4NDdFMkMzMUJDNzg4NjMxQ0RFNTky
RTBCREU3QzYwMDJDQkQACgkQkuC958YALL0SnACfaD7nuZdOTT3OUuAG8j6bQF40
IoMAn19WyR25AK5KP1Mr1cHI9TlWIPPd
=1Iy/
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#769264: Bug #769264: freebirth: FTBFS in jessie/i386: XXX

2014-11-22 Thread Michael Banck
tags 769264 +patch
thanks

Hi,

On Wed, Nov 12, 2014 at 11:45:28AM +0100, Lucas Nussbaum wrote:
> > ./fusebirth > fused_loop.c 2>/dev/null
> > make[1]: *** [fused_loop.c] Error 139
 
So what happens here is that fusebirth segfaults on i386 in topo_sort(),
while trying to sort whatever in order to generate fused_loop.c.

Tracing through topo_sort() with a debugger, it seems that after a dozen
or so recursions into it, get_children(node) returns an invalid (but not
NULL) pointer, and on the next iteration we get a segfault in it.

I stared at the code for a few hours, but it doesn't look like this is
how GLib is supposed to be used nowadays, so I went for an alternative
solution: I just included the auto-generated .c code into the source
package and changed the build system to not generate/delete that .c file.  

I made sure the generated source is the same on amd64 and s390x and will
test on a couple more architectures to make sure.

Proposed Debdiff attached.


Michael
diff -u freebirth-0.3.2/Makefile freebirth-0.3.2/Makefile
--- freebirth-0.3.2/Makefile
+++ freebirth-0.3.2/Makefile
@@ -19,14 +19,11 @@
 all: freebirth 
 
 clean: Makefile.deps
-   -rm -f *.o freebirth fusebirth fused_loop.c Makefile.deps *~ 
+   -rm -f *.o freebirth fusebirth Makefile.deps *~ 
 
 freebirth: $(OFILES) fused_loop.o freebirth.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
-fused_loop.c: fusebirth
-   ./fusebirth > fused_loop.c 2>/dev/null
-
 fusebirth: $(OFILES) fuse_loops.o fusebirth.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
diff -u freebirth-0.3.2/debian/changelog freebirth-0.3.2/debian/changelog
--- freebirth-0.3.2/debian/changelog
+++ freebirth-0.3.2/debian/changelog
@@ -1,3 +1,11 @@
+freebirth (0.3.2-9.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * fused_loop.c: Include auto-generated C-file (closes: #769264).
+  * Makefile: Do not generate or remove fused_loop.c.
+
+ -- Michael Banck   Sat, 22 Nov 2014 20:36:11 +0100
+
 freebirth (0.3.2-9) unstable; urgency=medium
 
   * debian/control: add homepage, thanks to Francisco Javier Garrote Cruz
only in patch2:
unchanged:
--- freebirth-0.3.2.orig/fused_loop.c
+++ freebirth-0.3.2/fused_loop.c
@@ -0,0 +1,597 @@
+/* generated file -- don't edit */
+#include 
+#include 
+#include 
+#include "freebirth.h"
+/* borrowed from glib2 */
+#define SHORT_SWAP_LE_BE(val)  ((short) ( \
+(short) ((short) (val) >> 8) | \
+(short) ((short) (val) << 8)))
+static void swap_endian(short *data, int length)
+{
+   int i;
+   for (i = 0; i < length; i += 1, data++)
+   *data = SHORT_SWAP_LE_BE(*data);
+}
+
+sample_producer *sp[31];
+
+int play_buffer(gpointer data, gint source, GdkInputCondition condition)
+{
+  int i;
+  short buffer[TBASS_BUFF_SIZE * 2];
+  
+  sample samp0;
+  sample samp1;
+  sample samp2;
+  sample samp3;
+  sample samp4;
+  sample samp5;
+  sample samp6;
+  sample samp7;
+  sample samp8;
+  sample samp9;
+  sample samp10;
+  sample samp11;
+  sample samp12;
+  sample samp13;
+  sample samp14;
+  sample samp15;
+  sample samp16;
+  sample samp17;
+  sample samp18;
+  sample samp19;
+  sample samp20;
+  sample samp21;
+  sample samp22;
+  sample samp23;
+  sample samp24;
+  sample samp25;
+  sample samp26;
+  sample samp27;
+  sample samp28;
+  sample samp29;
+  sample samp30;
+
+  int seq_off = sequencer->current_sample_offset;
+  int seq_spb = sequencer->spb;
+  event_list *el;
+  int j;
+
+  sample *n0_table = ((raw_wave *)sp[0])->table;
+  int n0_length = ((raw_wave *)sp[0])->length;
+  sample n0_s1, n0_s2;
+  double n0_ci_w, n0_ci_f, n0_pitch = ((raw_wave *)sp[0])->pitch;
+
+  sample *n1_table = ((raw_wave *)sp[1])->table;
+  int n1_length = ((raw_wave *)sp[1])->length;
+  sample n1_s1, n1_s2;
+  double n1_ci_w, n1_ci_f, n1_pitch = ((raw_wave *)sp[1])->pitch;
+
+  sample *n2_table = ((raw_wave *)sp[2])->table;
+  int n2_length = ((raw_wave *)sp[2])->length;
+  sample n2_s1, n2_s2;
+  double n2_ci_w, n2_ci_f, n2_pitch = ((raw_wave *)sp[2])->pitch;
+
+  sample *n3_table = ((raw_wave *)sp[3])->table;
+  int n3_length = ((raw_wave *)sp[3])->length;
+  sample n3_s1, n3_s2;
+  double n3_ci_w, n3_ci_f, n3_pitch = ((raw_wave *)sp[3])->pitch;
+
+  sample *n4_table = ((raw_wave *)sp[4])->table;
+  int n4_length = ((raw_wave *)sp[4])->length;
+  sample n4_s1, n4_s2;
+  double n4_ci_w, n4_ci_f, n4_pitch = ((raw_wave *)sp[4])->pitch;
+
+  int n5_phase_offset = ((osc *)sp[5])->phase_offset;
+  double n5_freq_offset = ((osc *)sp[5])->freq_offset;
+  int n5_freq = ((osc *)sp[5])->freq;
+  int n5_phase_factor = n5_phase_offset / n5_freq;
+  sample *n5_table = ((osc *)sp[5])->table;
+  int n5_i = ((osc *)sp[5])->current_index;
+
+  int n6_phase_offset = ((osc *)sp[6])->phase_offset;
+  double n6_freq_offset = ((osc *)sp[6])->freq_offset;
+  int n6_freq = ((osc *)sp[6])->freq;
+  int n6_phase_factor = n6_phase_offset / n6_freq;
+  sample *n6_table = ((osc *)sp[6])->table;
+  int n6_i = ((osc *)sp[6])->current_index;
+
+  int n7

Processed: Re: Bug #769264: freebirth: FTBFS in jessie/i386: XXX

2014-11-22 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 769264 +patch
Bug #769264 [src:freebirth] freebirth: FTBFS in jessie/i386: XXX
Added tag(s) patch.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
769264: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769264
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#769264: freebirth: FTBFS in jessie/i386: XXX

2014-11-12 Thread Lucas Nussbaum
Source: freebirth
Version: 0.3.2-8
Severity: serious
Tags: jessie sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20141112 qa-ftbfs
Justification: FTBFS in jessie on i386

Hi,

During a rebuild of all packages in jessie (in a jessie chroot, not a
sid chroot), your package failed to build on i386.

Relevant part (hopefully):
> make[1]: Entering directory '/«PKGBUILDDIR»'
> gcc -MM -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2 oscillator.c sequencer.c envelope.c filter.c 
> gtkdial.c mixer.c raw_wave.c event.c sample_producer.c blender.c delay.c 
> reverb.c all_pass.c delay_panel.c reverb_panel.c multi_tap_delay.c 
> sample_freq_strip.c > Makefile.deps
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o freebirth.o freebirth.c
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o oscillator.o oscillator.c
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o sequencer.o sequencer.c
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o envelope.o envelope.c
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o filter.o filter.c
> filter.c: In function 'filter_init_lookup_table':
> filter.c:101:28: warning: variable 'table_length' set but not used 
> [-Wunused-but-set-variable]
>int freq_range, q_range, table_length;
> ^
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
> -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
> -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> -I/usr/include/freetype2  -O2   -c -o gtkdial.o gtkdial.c
> gtkdial.c: In function 'gtk_dial_realize':
> gtkdial.c:207:18: warning: variable 'dial' set but not used 
> [-Wunused-but-set-variable]
>  GtkDial *dial;
>   ^
> gcc -g -Wall -pthread -I/usr/include/gtk-2.0 
> -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 
> -I/usr