GNOME Bugzilla – Bug 620199
fails to build: "pause" already used by eglibc <unistd.h>
Last modified: 2010-07-08 17:32:57 UTC
Original bug reported against ubuntu 10.10 (devel) on Launchpad: https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/588076 Rhythmbox fails to build with this ending: make[4]: Entering directory `/tmp/buildd/rhythmbox-0.12.8/remote/dbus' \ # source='rb-client.c' object='rb-client.o' libtool=no gcc -DHAVE_CONFIG_H -I. -I../.. -DGNOMELOCALEDIR=\""/usr/share/locale"\" -DG_LOG_DOMAIN=\"Rhythmbox\" -I../.. -I../../lib -I../../shell -I../../shell -DPIXMAP_DIR=\""/usr/share/pixmaps"\" -DSHARE_DIR=\"/usr/share/rhythmbox\" -DDATADIR=\""/usr/share"\" -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DDBUS_API_SUBJECT_TO_CHANGE -D_XOPEN_SOURCE -D__EXTENSIONS__ -D_BSD_SOURCE -g -O2 -g -Wall -O2 -c rb-client.c rb-client.c:57: error: 'pause' redeclared as different kind of symbol //usr/include/unistd.h:466: note: previous declaration of 'pause' was here make[4]: *** [rb-client.o] Error 1 pause is defined in /usr/include/unistd.h as such: extern int pause (void); Simply renaming "pause" -> "rb_pasue" in rhythmbox remote/dbus/rb_client.c confirmed to work, builds and runs seemingly fine.
This was using the deb package source 0.12.8+0ubuntu5, and pbuilder to build. gcc 4.4.4-3ubuntu3 eglibc 2.11.1-0ubuntu8
fixed in commit bd389d8
Created attachment 162415 [details] [review] rename "pause" -> "rb_pause" in remote/dbus/rb_client.c This works, is it sane?
Ah, I'm too slow... Just a question, is the first "pause" unrelated to this in: - { "pause", 0, 0, G_OPTION_ARG_NONE, &pause, N_("Pause playback if currently playing"), NULL }, + { "pause", 0, 0, G_OPTION_ARG_NONE, &do_pause, N_("Pause playback if currently playing"), NULL }, Since my (unqualified) guess was that it was to be changed likewise? It seems to build and work fine though, so I might very well be wrong
The first 'pause' there is the name of the command line argument, so there is no need to change it.
Might be nice to just prefix all the variables with an _rb_ or such to prevent such namespace collisions.