GNOME Bugzilla – Bug 340117
gnome-keyring does not build on solaris due to cast warnings and -Werror
Last modified: 2007-05-10 22:10:42 UTC
http://jhbuild.bxlug.be/builds/2006-04-29-0005/logs/gnome-keyring/#build gnome-keyring does some of casting from guchar* to guint32*, along with some other implicit casting involving GArray which involved a twisty maze of macros. Anyway, the net result is the alignment of structs is more strict on Solaris, so adding -Wno-cast-align at the bottom of configure.in fixes that. The warnings about formats: gnome-keyring-daemon-io.c: In function `gnome_keyring_client_state_machine': gnome-keyring-daemon-io.c:369: warning: unsigned int format, uid_t arg (arg 4) gnome-keyring-daemon-io.c:369: warning: unsigned int format, uid_t arg (arg 5) and gnome-keyring-daemon.c: In function `main': gnome-keyring-daemon.c:2779: warning: int format, pid_t arg (arg 2) gnome-keyring-daemon.c:2801: warning: int format, pid_t arg (arg 2) gnome-keyring-daemon.c:2808: warning: int format, pid_t arg (arg 2) I'm not sure how to get rid of these without -Wno-format, as by default on SPARC/Solaris they're #defined as long for 32bit code, which is 4 bytes long. Compiling with -m64 would #define them as int, which would still be 4 bytes long, but the right type for the format string. Possibly cast the uid_t and pid_t to int? http://www-128.ibm.com/developerworks/library/l-solar/ is a useful reference for this sort of stuff.
Committed fixes for the casting. If you have a patch which fixes the first build problem, please attach. Thanks!