liblauncher fails to build from source in linaro

Bug #600207 reported by Matthias Klose on 2010-06-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro
Invalid
Undecided
Unassigned
Linaro GCC
Invalid
Undecided
Unassigned
liblauncher-0.1 (Ubuntu)
High
Didier Roche

Bug Description

liblauncher fails to build in linaro:
https://launchpad.net/ubuntu/+archive/test-rebuild-20100628/+build/1828978

make[3]: Entering directory `/build/buildd/liblauncher-0.1-0.1.10/launcher'
  CC launcher-application.o
  CC launcher-category.o
  CC launcher-favorites.o
  CC launcher-folder-bookmarks.o
  CC launcher-folder.o
  CC launcher-icon-utils.o
  CC launcher-menu.o
  CC launcher-session.o
cc1: warnings being treated as errors
launcher-session.c: In function 'latin1_to_utf8':
launcher-session.c:228: error: declaration of 'read' shadows a global declaration
//usr/include/bits/unistd.h:35: error: shadowed declaration is here
make[3]: *** [launcher-session.lo] Error 1

Related branches

Matthias Klose (doko) on 2010-06-30
Changed in liblauncher-0.1 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Loïc Minier (lool) wrote :

A new warning is triggered by the use of a variable named "read".

liblauncher-0.1 is a fork of liblauncher 0.1.x series, the latest liblauncher doesn't have this var.

The fix was merged in r37 of lp:liblauncher and was developed in r28.3.7:
------------------------------------------------------------
revno: 28.3.7
committer: Gordon Allott <email address hidden>
branch nick: liblauncher-session
timestamp: Mon 2009-10-19 11:10:55 +0100
message:
  added dependancy on libwncksync
=== modified file 'launcher/launcher-session.c'
--- launcher/launcher-session.c 2009-10-19 09:59:05 +0000
+++ launcher/launcher-session.c 2009-10-19 10:10:55 +0000
@@ -35,6 +35,7 @@
 #include <X11/Xutil.h>

 #include "launcher-application.h"
+#include "launcher-appman.h"
 #include "launcher-menu.h"

 #include "launcher-session.h"
@@ -151,55 +152,6 @@
 /*
  * Private methods
  */
-/*
- * Taken from libwnck, LGPL 2.0
- */
-static gchar *
-latin1_to_utf8 (const gchar *latin1)
-{
- GError *error = NULL;
- gsize read, written;
- gchar *utf8, *ret;
-
- utf8 = g_convert (latin1, -1, "UTF-8", "ISO-8859-1", &read, &written, &error);
- if (error)
- {
- g_debug ("errors converting latin1 to utf8: latin1=\"%s\", utf8=\"%s\", "
- "read=%zu, written=%zu, error=\"%s\".\n",
- latin1, utf8, read, written, error->message);
- g_error_free (error);
- }
-
- ret = g_utf8_strdown (utf8, -1);
- g_free (utf8);
- return ret;
-}
-
-static void
-window_wmclass_get (gulong xid, gchar **res_name, gchar **class_name)
-{
- XClassHint ch = {NULL, NULL};
-
- gdk_error_trap_push ();
- XGetClassHint (gdk_display, xid, &ch);
- gdk_error_trap_pop ();
-
- if (ch.res_name)
- {
- *res_name = latin1_to_utf8 (ch.res_name);
- XFree (ch.res_name);
- }
- else
- *res_name = NULL;
-
- if (ch.res_class)
- {
- *class_name = latin1_to_utf8 (ch.res_class);
- XFree (ch.res_class);
- }
- else
- *class_name = NULL;
-}

 static void
 on_application_opened (WnckScreen *screen,
@@ -207,14 +159,12 @@
                        LauncherSession *session)
 {
   LauncherSessionPrivate *priv;
- GSList *apps, *a;
   gchar *app_name = NULL;
   gchar *res_name = NULL;
   gchar *class_name = NULL;
- LauncherApplication *nearmatch = NULL;
   LauncherApplication *bestmatch = NULL;
   LauncherAppman *appman = NULL;
- GList *windows, w = NULL;
+ GList *windows, *w;

   g_return_if_fail (LAUNCHER_IS_SESSION (session));
@@ -231,7 +181,7 @@
       WnckWindow *window = w->data;
       gchar *desktop_file;

- desktop_file = wncksync_desktop_item_for_window_xid (wnck_window_get_xid (window))
+ desktop_file = wncksync_desktop_item_for_xid (wnck_window_get_xid (window));
       //try the next item
       if (!desktop_file)
         continue;

One of this include changes isn't present in liblauncher-0.1 though

Loïc Minier (lool) wrote :

I can reproduce with Ubuntu maverick, without using the Linaro GCC version.

Changed in linaro:
status: New → Invalid
Changed in gcc-linaro:
status: New → Invalid
Loïc Minier (lool) wrote :

NB also shows up on http://udd.debian.org/cgi-bin/ubuntu_ftbfs.cgi with the smae issue

Loïc Minier (lool) on 2010-06-30
Changed in liblauncher-0.1 (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
Loïc Minier (lool) on 2010-06-30
Changed in liblauncher-0.1 (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package liblauncher-0.1 - 0.1.10-0ubuntu2

---------------
liblauncher-0.1 (0.1.10-0ubuntu2) maverick; urgency=low

  * Switch to source format 3.0 (quilt); build-dep on quilt; add empty series.
  * New patch, lp600207-rename-read-to-avoid-warning-causing-ftbfs, fixes
    FTBFS with stricter gcc caused by a var named "read"; LP: #600207.
 -- Loic Minier <email address hidden> Wed, 30 Jun 2010 16:04:59 +0200

Changed in liblauncher-0.1 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers