Lars Nordlund wrote:
> When building gtk-gnutella-current on NetBSD-5.0rc4/amd64 I get this
> compile error:
> 
> cc -c -I../.. -I.. -I/usr/pkg/include/glib/glib-2.0 
> -I/usr/pkg/lib/glib-2.0/include    -DCURDIR=src/lib -O2 -g -pipe 
> -momit-leaf-frame-pointer -W -Wall -Wformat=2 -Wshadow  atoms.c
> atoms.c: In function 'atom_get':
> atoms.c:837: error: duplicate case value
> atoms.c:837: error: previously used here
> gmake[3]: *** [atoms.o] Error 1
> 
> I think it relates this this entry in config.h
> 
> %grep MEM_ALI work/gtk-gnutella/config.h
> /* MEM_ALIGNBYTES:
> #define MEM_ALIGNBYTES 16     /**/
> 
> Building the latest gtk-gnutella release, 0.96.5, gives this in the
> generated config.h:

The latest release is actually 0.96.6 although I'd recommend using
0.96.7u from SVN instead because the "stable" release leaks quite
badly.

> %grep 'define MEM_ALI' work/gtk-gnutella-0.96.5/config.h 
> #define MEM_ALIGNBYTES 8      /**/
 
> Changing the config.h file entry 16 to 8 gets me through the build on
> gtk-gnutella-current, but I have not tried starting the binary.

> Investigating the alignbytes detection program embedded in the
> configure script reveals that it is the long double type which bumps up
> the alignment constraint to 16. In the 0.96.5 release, only char and
> double types are checked.

The old detection unit wasn't cross-compilable and suffered from blahism.
It defined MEM_ALIGNBYTES but actually talked about double. I considered
detecting the common maximum alignment constraint for all native types
is more useful and matching the seemingly obvious semantic of "align bytes".
Histerically, the widest type with the strictest alignment constraints
was 'double' but this was in the dark ages before the advent of C99,
maybe even before C89.

gtk-gnutella doesn't use "long double" but some library might, in theory.
 
> Any comments? I am not really sure how to proceed here.. I assume this
> works fine on other 64bit OSes?

Well, bugs don't exist unless reported. Apparently it does but nobody really
knows. In general, if gtk-gnutella doesn't compile or the compiler reports any
warnings, people should report these as soon as possible.

-- 
Christian

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
gtk-gnutella-devel mailing list
gtk-gnutella-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to