[Pkg-games-ubuntu] [Bug 771087]

Mikpe 771087 at bugs.launchpad.net
Sun Oct 2 10:43:54 UTC 2011


Created attachment 25393
reduced test case

> cat pr50565.c
/* pr50565.c */
struct netmessage {
    unsigned char pos[2];
};
static struct netmessage nmsgbuf;
const int offset0 = (int)((void*)&nmsgbuf.pos[0] - (void*)&nmsgbuf) + 0*(1U);
const int offset1 = (int)((void*)&nmsgbuf.pos[0] - (void*)&nmsgbuf) + 1*(1U);
> objdir/gcc/xgcc -Bobjdir/gcc/ -O2 -S pr50565.c
pr50565.c:7: error: initializer element is not computable at load time

That's the offset1 initializer it's complaining about.  Note that the
offset0 initializer is accepted.  If we comment out the offset1
definition we get:

> perl -pi -e 's,^const int offset1,//const int offset1,g' pr50565.c
> objdir/gcc/xgcc -Bobjdir/gcc/ -O2 -S pr50565.c
> cat pr50565.s
        .file   "pr50565.c"
.globl offset0
        .section        .rodata
        .align 4
        .type   offset0, @object
        .size   offset0, 4
offset0:
        .long   0
        .local  nmsgbuf
        .comm   nmsgbuf,2,1
        .ident  "GCC: (GNU) 4.5.0 20090329 (experimental)"
        .section        .note.GNU-stack,"", at progbits

The common offsetof emulation is clearly computable at compile-time, so
one would expect the same + 1 to also be computable at compile-time, but
gcc doesn't seem to think so.

-- 
You received this bug notification because you are a member of
Debian/Ubuntu Games Team, which is subscribed to mmpong in Ubuntu.
https://bugs.launchpad.net/bugs/771087

Title:
  mmpong version 0.9.1-1 failed to build on amd64 with GCC-4.6/oneiric

Status in The GNU Compiler Collection:
  New
Status in “gcc-4.6” package in Ubuntu:
  New
Status in “mmpong” package in Ubuntu:
  Fix Released
Status in “gcc-4.6” source package in Oneiric:
  New
Status in “mmpong” source package in Oneiric:
  Fix Released
Status in “mmpong” package in Debian:
  New

Bug description:
  mmpong version 0.9.1-1 failed to build on amd64 with GCC-4.6/oneiric
  Link to failed build: https://launchpad.net/ubuntu/+archive/test-rebuild-20110413/+buildjob/2462263

  Details about the rebuild:
  https://lists.ubuntu.com/archives/ubuntu-devel/2011-April/033042.html

  Direct link to the build log: https://launchpad.net/ubuntu/+archive
  /test-rebuild-20110413/+buildjob/2462263/+files/buildlog_ubuntu-natty-
  amd64.mmpong_0.9.1-1_FAILEDTOBUILD.txt.gz

  This log snippet might be of interest, since it triggered the matcher 'Purging chroot-autobuild'.
  Excerpt 1121 lines into the build log:

  /build/buildd/mmpong-0.9.1/lib/message.c:65:2: error: (near initialization for 'byte_order[9].offset')
  /build/buildd/mmpong-0.9.1/lib/message.c:67:2: error: initializer element is not computable at load time
  /build/buildd/mmpong-0.9.1/lib/message.c:67:2: error: (near initialization for 'byte_order[11].offset')
  /build/buildd/mmpong-0.9.1/lib/message.c:90:2: error: initializer element is not computable at load time
  /build/buildd/mmpong-0.9.1/lib/message.c:90:2: error: (near initialization for 'byte_order[32].offset')
  /build/buildd/mmpong-0.9.1/lib/message.c:92:2: error: initializer element is not computable at load time
  /build/buildd/mmpong-0.9.1/lib/message.c:92:2: error: (near initialization for 'byte_order[34].offset')
  make[3]: *** [lib/CMakeFiles/libmmpong.dir/message.o] Error 1
  make[3]: Leaving directory `/build/buildd/mmpong-0.9.1/obj-x86_64-linux-gnu'
  make[2]: *** [lib/CMakeFiles/libmmpong.dir/all] Error 2
  make[2]: Leaving directory `/build/buildd/mmpong-0.9.1/obj-x86_64-linux-gnu'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/build/buildd/mmpong-0.9.1/obj-x86_64-linux-gnu'
  make: *** [debian/stamp-makefile-build] Error 2
  dpkg-buildpackage: error: debian/rules build gave error exit status 2
  ******************************************************************************
  Build finished at 20110424-1640
  FAILED [dpkg-buildpackage died]
  Purging chroot-autobuild/build/buildd/mmpong-0.9.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/771087/+subscriptions



More information about the Pkg-games-ubuntu mailing list