Bug#946861: buzztrax FTBFS after libfluidsynth update
On 19/12/2019 00:52, peter green wrote: tags 946861 +patch thanks Well I got buzztrax building, though i'm not sure of the correctness of my patch. Update, I tried to submit my changes upstream and found that some of the issues had already been addressed there. New debdiff attatched with two fluidsynth-related patches generated from upstream commits, plus a new one from me which I have submitted as a pull request upstream. I don't have any immediate plans to NMU, but I may do so later, especially if upstream accepts my pull request. diff -Nru buzztrax-0.10.2/debian/changelog buzztrax-0.10.2/debian/changelog --- buzztrax-0.10.2/debian/changelog2018-05-31 13:54:09.0 + +++ buzztrax-0.10.2/debian/changelog2019-12-19 00:34:06.0 + @@ -1,3 +1,15 @@ +buzztrax (0.10.2-6.1) UNRELEASED; urgency=medium + + * Patch for BTS, no intent to NMU + * Add -Werror=incompatible-pointer-types and -Werror=implicit-function-declaration +to help in checking the fluidsynth stuff. + * Add casts to/from GObject so the GObject related code would build with +-Werror=incompatible-pointer-types + * Port fluidsynth code to fluidsynth 2.x (Closes: 946861) + * Add -f to rm command to avoid "No such file or directory" error. + + -- Peter Michael Green Thu, 19 Dec 2019 00:34:06 + + buzztrax (0.10.2-6) unstable; urgency=medium * debian/control: diff -Nru buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch --- buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch 1970-01-01 00:00:00.0 + +++ buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch 2019-12-19 00:29:15.0 + @@ -0,0 +1,97 @@ +Description: + Add casts to/from GObject to allow code to be built with + -Werror=incompatible-pointer-types + (which I wanted for work on the fluidsynth stuff) +Author: Peter Michael Green + +--- buzztrax-0.10.2.orig/src/lib/core/audio-session.c buzztrax-0.10.2/src/lib/core/audio-session.c +@@ -226,7 +226,7 @@ bt_audio_session_constructor (GType type + singleton = BT_AUDIO_SESSION (object); + g_object_add_weak_pointer (object, (gpointer *) (gpointer) & singleton); + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/lib/core/machine.c buzztrax-0.10.2/src/lib/core/machine.c +@@ -1982,7 +1982,7 @@ bt_machine_get_pattern_by_id (const BtMa + pattern = (GObject *) node->data; + if (!g_strcmp0 (g_object_get_data (pattern, "BtPattern::id"), id)) { + GST_INFO ("legacy pattern lookup for '%s' = %p", id, pattern); +- return g_object_ref (pattern); ++ return (BtCmdPattern *)(g_object_ref (pattern)); + } + } + return NULL; +--- buzztrax-0.10.2.orig/src/lib/ic/registry.c buzztrax-0.10.2/src/lib/ic/registry.c +@@ -246,7 +246,7 @@ btic_registry_constructor (GType type, g + singleton->priv->gudev_discoverer = btic_gudev_discoverer_new (); + #endif + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/ui/edit/change-log.c buzztrax-0.10.2/src/ui/edit/change-log.c +@@ -1153,7 +1153,7 @@ bt_change_log_constructor (GType type, g + singleton = BT_CHANGE_LOG (object); + g_object_add_weak_pointer (object, (gpointer *) (gpointer) & singleton); + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/ui/edit/edit-application.c buzztrax-0.10.2/src/ui/edit/edit-application.c +@@ -930,7 +930,7 @@ bt_edit_application_constructor (GType t + G_OBJECT_LOG_REF_COUNT (singleton)); + //GST_DEBUG(">>>"); + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/ui/edit/main-page-sequence.c buzztrax-0.10.2/src/ui/edit/main-page-sequence.c +@@ -653,9 +653,9 @@ pattern_list_model_get_pattern_by_key (G + gtk_tree_model_get (store, &iter, BT_PATTERN_LIST_MODEL_SHORTCUT, &this_key, + -1); + if (this_key[0] == that_key) { +- pattern = ++ pattern = (BtCmdPattern *)( + g_object_ref (bt_pattern_list_model_get_object ((BtPatternListModel *) +- store, &iter)); ++ store, &iter))); + GST_INFO ("found pattern for key : %" G_OBJECT_REF_COUNT_FMT, + G_OBJECT_LOG_REF_COUNT (pattern)); + g_free (this_key); +--- buzztrax-0.10.2.orig/src/ui/edit/settings-page-interaction-controller.c buzztrax-0.10.2/src/ui/edit/settings-page-interaction-controller.c +@@ -186,7 +186,7 @@ on_device_menu_changed (GtkComboBox * co + g_list_free (list); + + // activate the new one +-self->priv->device = g_object_ref (device); ++
Bug#946861: buzztrax FTBFS after libfluidsynth update
tags 946861 +patch thanks Well I got buzztrax building, though i'm not sure of the correctness of my patch. I mostly based my fixes on cross-comparing the API documentation at http://www.fluidsynth.org/api-1.x/ and http://www.fluidsynth.org/api/ The first thing I did was add -Werror=incompatible-pointer-types because I saw some worrying warnings in addition to the errors and did not want to miss them later, I also added -Werror=implicit-function-declaration later for similar reasons. Unfortunately that caused build failures in other parts of the code, in particular conversions to/from GOBject * I fixed these by adding casts ( 0007-add-gobject-casts.patch) Then it was on to the actual fixing of the fluidsynth stuff, with most of it, it was pretty obvious how to make the new code behave the same as the old code, but there were a couple of questionable cases. The first is that FLUID_CHORUS_DEFAULT_TYPE had been removed, I replaced it with FLUID_CHORUS_MOD_SINE (which it had previously been #define'd to) The second is that fluid_synth_set_midi_router has been removed, the documentation says "remove deprecated fluid_synth_set_midi_router(), instead supply the midi-router instance when creating a command handler with new_fluid_cmd_handler()", I replaced fluid_synth_set_midi_router with new_fluid_cmd_handler, but i'm not sure if that is sufficient or if more changes are required. The fluidsynth changes are in 0008-fluidsynth2.0.patch , I have not made any attempt to put them behind conditional logic, if someone wants a codebase that builds with both 1.x and 2.x they will probablly need to do so. I also had to add a "-f" to "rm -r /buzztrax-0.10.2/debian/buzztrax/usr/share/gtk-doc" to avoid a "No such file or directory" With these changes the package builds, I have not tested if it actually works. Debdiff attatched, no intent to NMU. diff -Nru buzztrax-0.10.2/debian/changelog buzztrax-0.10.2/debian/changelog --- buzztrax-0.10.2/debian/changelog2018-05-31 13:54:09.0 + +++ buzztrax-0.10.2/debian/changelog2019-12-19 00:34:06.0 + @@ -1,3 +1,15 @@ +buzztrax (0.10.2-6.1) UNRELEASED; urgency=medium + + * Patch for BTS, no intent to NMU + * Add -Werror=incompatible-pointer-types and -Werror=implicit-function-declaration +to help in checking the fluidsynth stuff. + * Add casts to/from GObject so the GObject related code would build with +-Werror=incompatible-pointer-types + * Port fluidsynth code to fluidsynth 2.x (Closes: 946861) + * Add -f to rm command to avoid "No such file or directory" error. + + -- Peter Michael Green Thu, 19 Dec 2019 00:34:06 + + buzztrax (0.10.2-6) unstable; urgency=medium * debian/control: diff -Nru buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch --- buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch 1970-01-01 00:00:00.0 + +++ buzztrax-0.10.2/debian/patches/0007-add-gobject-casts.patch 2019-12-19 00:29:15.0 + @@ -0,0 +1,97 @@ +Description: + Add casts to/from GObject to allow code to be built with + -Werror=incompatible-pointer-types + (which I wanted for work on the fluidsynth stuff) +Author: Peter Michael Green + +--- buzztrax-0.10.2.orig/src/lib/core/audio-session.c buzztrax-0.10.2/src/lib/core/audio-session.c +@@ -226,7 +226,7 @@ bt_audio_session_constructor (GType type + singleton = BT_AUDIO_SESSION (object); + g_object_add_weak_pointer (object, (gpointer *) (gpointer) & singleton); + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/lib/core/machine.c buzztrax-0.10.2/src/lib/core/machine.c +@@ -1982,7 +1982,7 @@ bt_machine_get_pattern_by_id (const BtMa + pattern = (GObject *) node->data; + if (!g_strcmp0 (g_object_get_data (pattern, "BtPattern::id"), id)) { + GST_INFO ("legacy pattern lookup for '%s' = %p", id, pattern); +- return g_object_ref (pattern); ++ return (BtCmdPattern *)(g_object_ref (pattern)); + } + } + return NULL; +--- buzztrax-0.10.2.orig/src/lib/ic/registry.c buzztrax-0.10.2/src/lib/ic/registry.c +@@ -246,7 +246,7 @@ btic_registry_constructor (GType type, g + singleton->priv->gudev_discoverer = btic_gudev_discoverer_new (); + #endif + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/ui/edit/change-log.c buzztrax-0.10.2/src/ui/edit/change-log.c +@@ -1153,7 +1153,7 @@ bt_change_log_constructor (GType type, g + singleton = BT_CHANGE_LOG (object); + g_object_add_weak_pointer (object, (gpointer *) (gpointer) & singleton); + } else { +-object = g_object_ref (singleton); ++object = (GObject *)(g_object_ref (singleton)); + } + return object; + } +--- buzztrax-0.10.2.orig/src/u
Bug#946861: buzztrax FTBFS after libfluidsynth update
Source: buzztrax Version: 0.10.2-6 Severity: serious Tags: ftbfs Justification: ftbfs -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dear maintainers, Your package is part of the libfluidsynth2 transition, so I scheduled binNMU's. However, your package FTBFS on all architecutes. Please fix your package. Paul https://buildd.debian.org/status/package.php?p=buzztrax Tail of log for buzztrax on amd64: /usr/include/fluidsynth/settings.h:182:54: note: expected ‘fluid_settings_foreach_t’ {aka ‘void (*)(void *, const char *, int)’} but argument is of type ‘void (*)(void *, char *, int)’ 182 | fluid_settings_foreach_t func); | ~^~~~ src/gst/fluidsynth/fluidsynth.c:877:11: error: ‘FLUID_CHORUS_DEFAULT_TYPE’ undeclared (first use in this function) 877 | FLUID_CHORUS_DEFAULT_TYPE, | ^ src/gst/fluidsynth/fluidsynth.c:877:11: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [Makefile:6261: src/gst/fluidsynth/libgstfluidsynth_la-fluidsynth.lo] Error 1 make[3]: Leaving directory '/<>' make[2]: *** [Makefile:7283: all-recursive] Error 1 make[2]: Leaving directory '/<>' make[1]: *** [Makefile:3016: all] Error 2 make[1]: Leaving directory '/<>' dh_auto_build: make -j1 returned exit code 2 make: *** [debian/rules:13: build-arch] Error 255 - -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'testing-debug') Architecture: amd64 (x86_64) Kernel: Linux 5.3.0-3-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEEWLZtSHNr6TsFLeZynFyZ6wW9dQoFAl3314gACgkQnFyZ6wW9 dQoc3Qf8Cs6z53jnMcLCT6YJ+JX0OXjkdPCKwW97EovwR7EZLvwVyvVkIsuioHUC 9Loa2V5pIuqjYGPzpTIEWZsRO3GSxwkMq/amdIMsH7IlPaxv/jJtxEimJqjR5CS4 yvOCNPe9fzfDJ5+7su2dRuICApyBXdlGjnYT8G4kld5fvQHuxohgBJboc/Rutqqt ucjWl5fvL2QytURwLE6ZaRaQQRekXI2enWea3xm/FR6ucrGbFX29YChexf5CNVPe lcM89csPpaXWmOdMUIRK5tw3aOhulBPzcTUvZ2AUltnpjU0yP9Kx+K5G9HmTtA3b TsBMvRW5LbQKuzSZYC26oIFmvthIiQ== =1D4P -END PGP SIGNATURE-