Bug#442854: hex-a-hop: [m68k] FTBFS: packfile.h:57: error: size of array 'static_assert1' is negative

Bas Wijnen wijnen at debian.org
Mon Sep 17 14:57:11 UTC 2007


On Mon, Sep 17, 2007 at 03:34:25PM +0200, Jens Seidel wrote:
> > The package fails to build on m68k, see
> > http://buildd.debian.org/fetch.cgi?&pkg=hex-a-hop&ver=0.0.20070315-5&arch=m68k&stamp=1189827580&file=log
> > 
> > g++ -Wall -W -g -DUSE_GETTEXT -O2 -D_VERSION=\"1.0.0\" -DDATA_DIR=\"/usr/share/games/hex-a-hop\" `sdl-config --cflags`  -c -o hex_puzzzle.o hex_puzzzle.cpp
> > packfile.h:57: error: size of array 'static_assert1' is negative
> > http://lists.alioth.debian.org/mailman/listinfo/pkg-games-devel
> 
> Oops, I explitely added this test and now I wonder whether I should be
> happy that this error was found or not :-)
> 
> I do not have access to a m68k machine. Bas, could you please provide
> the output of typeof(Entry), where Entry is defined in packfile.h?

I don't have one either, but I can see if I may be able to get the test
done anyway.  If someone else has one, please do it instead. :-)

I saw the problem because I just browsed the buildd logs of my
(maintained and sponsored) packages.

> If it is smaller as 8 I can probably add some dummy data the other way
> is probably a little bit more difficult (how to change the alignment of
> data?).

If you know sizes, you can use this notation (this creates a struct
where the 32-bit value is not 32-bit-aligned):

struct descriptor_register
{
	unsigned limit : 16;
	unsigned base : 32 __attribute__((packed));
	unsigned padding : 16;
};

> The problem is that hex-a-hop reads a char data stream and interprets it as
> an array of type Entry. I knew that this could cause trouble so I added the
> assert test.

Sounds like it's better to rewrite the parsing from "compiler, this here
is an array of these things" to manually parsing the data and filling
the array.  Reading binary data directly from disk is a very good way to
get non-portable programs. ;-)

But I think I already heard you mention something like that before, and
it was too hard to fix it all in patches, right?  If upstream isn't
interested/responding, then a fork may be a good idea...

> Is the build machine a 64 bit system?

I know nothing more about it than what's on the website.  I don't think
m68k machines are 64 bit, but I'm not very familiar with them.

If there's no other way, I think I can get shell access to a Debian
machine, I'm not sure how complex it is to arrange that.

Thanks,
Bas

-- 
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
   in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://pcbcn10.phys.rug.nl/e-mail.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20070917/abb85388/attachment.pgp 


More information about the Pkg-games-devel mailing list