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 512799 - libgames-support fails to build on arm
libgames-support fails to build on arm
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-29 14:06 UTC by Josselin Mouette
Modified: 2008-01-29 20:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Fix for gnome-games 2.20.3 (810 bytes, patch)
2008-01-29 14:08 UTC, Josselin Mouette
none Details | Review

Description Josselin Mouette 2008-01-29 14:06:39 UTC
It is currently impossible to build libgames-support on arm, because of the sizeof (Card) == sizeof (guint8) in games-card-common.h.
Comment 1 Josselin Mouette 2008-01-29 14:08:46 UTC
Created attachment 103959 [details] [review]
Fix for gnome-games 2.20.3

Here is a working fix for 2.20 using __attribute__ ((packed)). In trunk, it needs to be applied to games-card.h instead.
Comment 2 Christian Persch 2008-01-29 17:29:12 UTC
What's causing this? The bitfields, or the union? Does that compiler not support bitfields? Is the ((packed)) attribute available on all gcc compiler versions >= 2.95 ?
Comment 3 Josselin Mouette 2008-01-29 17:39:12 UTC
(In reply to comment #2)
> What's causing this? The bitfields, or the union?

According to the tests, the packed attribute is required for both.

> Does that compiler not support bitfields?

It does, but (quoting Sam Hocevar) “You need to set __attribute__ ((packed)), otherwise you have a guarantee on the number of representative bits, but not on compacity.”

> Is the ((packed)) attribute available on all gcc compiler versions >= 2.95 ?

I haven’t tried, but it is present in the GCC 2.95.4 documentation.
Comment 4 Christian Persch 2008-01-29 20:50:19 UTC
        * games-card.h: Use __attribute__((__packed__)) for the Card struct.
        Bug #512799.