After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589404 - fails to build on sparc due to pointer alignment
fails to build on sparc due to pointer alignment
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: general
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-07-22 16:46 UTC by Martin Pitt
Modified: 2009-07-22 19:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
fix pointer alignment (864 bytes, patch)
2009-07-22 16:47 UTC, Martin Pitt
none Details | Review

Description Martin Pitt 2009-07-22 16:46:46 UTC
gpm-brightness-xrandr.c fails to build on sparc, due to a passing a char* as guint*, which doesn't have the right alignment. This is caught by gcc, and result s in a build failure:

cc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.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   -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -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 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libglade-2.0 -I/usr/include/libwnck-1.0 -I/usr/include/startup-notification-1.0 -I/usr/include/panel-2.0    -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2    -I/usr/include/PolicyKit -I/usr/include/gtk-2.0 -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 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -DBINDIR=\"/usr/bin\" -DGNOMELOCALEDIR=\""/usr/share/locale"\" -DDATADIR=\"/usr/share\" -DPREFIX=\""/usr"\" -DSYSCONFDIR=\""/etc"\" -DLIBDIR=\""/usr/lib"\" -DVERSION="\"2.24.0\"" -DGPM_DATA=\"/usr/share/gnome-power-manager\" -DEGG_LOG_FILE=\""/gnome-power-manager"\" -I.. -I../libunique -I../libhal-glib -I../libdbus-glib   -Werror -Wcast-align -Wno-uninitialized -Wall -Wformat-security -g -fexceptions  -g -O2 -g -Wall -O2 -c gpm-brightness-xrandr.c
cc1: warnings being treated as errors
gpm-brightness-xrandr.c: In function 'gpm_brightness_xrandr_output_get_internal':
gpm-brightness-xrandr.c:104: error: cast increases required alignment of target type
make[5]: *** [gpm-brightness-xrandr.o] Error 1

Trivial patch attached. Ubuntu carries this for an entire release already, it was just never forwarded upstream, sorry about that.
Comment 1 Martin Pitt 2009-07-22 16:47:33 UTC
Created attachment 139010 [details] [review]
fix pointer alignment
Comment 2 Richard Hughes 2009-07-22 16:55:00 UTC
Yup, please commit. Thanks.
Comment 3 Martin Pitt 2009-07-22 19:54:44 UTC
Pushed, thanks.