Skip to contentSkip to conversation

Build fails in PowerPC

DISCUSSION Manoel Rebelo Abraches 1 participant 1 message Sep 17, 2010

lore
Share & tools
lore
#0 lore raw

Mainline grub failed to build in PowerPC with the following error:

gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/local/lib/grub\" -DLOCALEDIR= \"/usr/local/share/locale\" -DGRUB_MACHINE_IEEE1275=1 -DMACHINE=POWERPC_IEEE1275 -DGRUB_FILE=\"grub-core/partmap/gpt.c\" -I. -I.. -I. -I.. -I../include -I./include -I../grub-core/gnulib
-I../grub-core/lib/libgcrypt_wrap -Wno-undef -Wno-sign-compare
-Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" -Wno-error
-Wno-missing-field-initializers -MT grub-core/partmap/libgrub_a-gpt.o
-MD -MP -MF grub-core/partmap/.deps-util/libgrub_a-gpt.Tpo -c -o grub-core/partmap/libgrub_a-gpt.o test -f 'grub-core/partmap/gpt.c' || echo '../'grub-core/partmap/gpt.c

../grub-core/partmap/gpt.c:36: error: initializer element is not constant
../grub-core/partmap/gpt.c:36: error: (near initialization for ‘grub_gpt_partition_type_bios_boot.data1’) ../grub-core/partmap/gpt.c:36: error: braced-group within expression allowed only inside a function ../grub-core/partmap/gpt.c:36: error: braced-group within expression allowed only inside a function
-------------------------------------------------------------------
That is the code that fails in gpt.c
static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;

GRUB_GPT_PARTITION_TYPE_EMPTY is define in include/grub/gpt_partition.h as

#define GRUB_GPT_PARTITION_TYPE_EMPTY \

  { 0x0, 0x0, 0x0, \
    { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } \

}
----------------------------------------------------------------------------
This code compiles fine in x86, is that a gcc bug? I'm using gcc 4.4.3

Signature · 5 lines
Best Regards,

Manoel Rebelo Abranches
Software engineer
IBM - Linux Technology Center - Brazil