Package: gnurobots Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu precise ubuntu-patch
Dear maintainer, gnurobots fail to build with "-Werror=deprecated-declarations" due to some deprecated g_thread_* function. Snippet: make[3]: Entering directory `/build/buildd/gnurobots-1.2.0/maps' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/build/buildd/gnurobots-1.2.0/maps' Making all in scheme make[3]: Entering directory `/build/buildd/gnurobots-1.2.0/scheme' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/build/buildd/gnurobots-1.2.0/scheme' Making all in src make[3]: Entering directory `/build/buildd/gnurobots-1.2.0/src' i686-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/readline/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/vte-0.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I../include -DPKGLIBDIR=\"/usr/lib/gnurobots\" -DABS_TOP_BUILDDIR=\"/build/buildd/gnurobots-1.2.0\" -DPKGDATADIR=\"/usr/share/ga mes/gnurobots\" -DMAPS_PATH=\"/usr/share/games/gnurobots/maps\" -DSCRIPTS_PATH=\"/usr/share/games/gnurobots/scheme\" -D_FORTIFY_SOURCE=2 -pedantic -Werror -Wall -g -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c main.c: In function 'main_prog': main.c:298:2: error: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) [-Werror=deprecated-declarations] main.c:300:2: error: 'g_thread_create' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Werror=deprecated-declarations] cc1: all warnings being treated as errors make[3]: *** [main.o] Error 1 make[3]: Leaving directory `/build/buildd/gnurobots-1.2.0/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/build/buildd/gnurobots-1.2.0' make[1]: *** [all] Error 2 make[1]: Leaving directory `/build/buildd/gnurobots-1.2.0' make: *** [build-stamp] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 ****************************************************************************** Build finished at 20120206-0059 FAILED [dpkg-buildpackage died] The full buidlog can be found at https://launchpad.net/ubuntu/+archive/test-rebuild-20120201/+build/3148003/+files/buildlog_ubuntu-precise-i386.gnurobots_2:1.2.0-4ubuntu3_FAILEDTOBUILD.txt.gz. The attached patch fixes this problem. Have a great day, Leo. System Information: Debian Release: wheezy/sid APT prefers oneiric-updates APT policy: (500, 'oneiric-updates'), (500, 'oneiric'), (100, 'oneiric-backports') Architecture: i386 (i686) Kernel: Linux 3.2.2-030202-generic (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Descirption: Fix FTBFS with -Werror=deprecated-declarations. * 'g_thread_init' is deprecated, no longer needed * 'g_thread_create' is deprecated, using 'g_thread_new' instead. Author: Leo Iannacone <l...@ubuntu.com> Bug-Ubuntu: https://bugs.launchpad.net/+bug/935136 Forwarded: no --- src/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- gnurobots.orig/src/main.c +++ gnurobots/src/main.c @@ -295,9 +295,8 @@ void main_prog(void *closure, gint argc, exit_nicely(); } - g_thread_init(NULL); gdk_threads_init(); - g_thread_create(callback, &loading, FALSE, NULL); + g_thread_new(NULL, callback, &loading); /* ensure the robot is placed properly */ MAP_SET_OBJECT(map, G_ROBOT_POSITION_Y(robot),