[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] Compile error for gettext-0.18.3.1
From: |
Perry Smith |
Subject: |
[bug-gettext] Compile error for gettext-0.18.3.1 |
Date: |
Wed, 28 Aug 2013 11:25:52 -0500 |
I'm on AIX 6.1 TL07 SP03. gcc is 4.5.2. I'm doing an out of tree build.
In the build directory, I get two float.h files:
./gettext-tools/gnulib-lib/float.h
./gettext-tools/libgettextpo/float.h
which are essentially identical.
They define union gl_long_double_union which upsets the compiler when both
copies are included. This may be an issue way further up stream in the build
process. I see these files come from:
gettext-tools/gnulib-lib/float.in.h
gettext-tools/libgettextpo/float.in.h
which are identical. I think the text from the build that you need is:
> gcc -std=gnu99 -DLOCALEDIR=\"/gsa/ausgsa/projects/r/ruby/share/locale\"
> -DHAVE_CONFIG_H -I. -I/usr/work/src/gettext-0.18.3.1/gettext-tools/tests -I..
> -I../libgettextpo
> -I/usr/work/src/gettext-0.18.3.1/gettext-tools/libgettextpo -I..
> -I../gnulib-lib -I/usr/work/src/gettext-0.18.3.1/gettext-tools/gnulib-lib
> -I../intl -D_THREAD_SAFE -I/gsa/ausgsa/projects/r/ruby/include -g -O2 -c -o
> gettextpo_1_prg-gettextpo-1-prg.o `test -f 'gettextpo-1-prg.c' || echo
> '/usr/work/src/gettext-0.18.3.1/gettext-tools/tests/'`gettextpo-1-prg.c
> In file included from /usr/include/sys/limits.h:302:0,
> from /usr/include/sys/localedef.h:42,
> from
> /gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2/include-fixed/stdlib.h:600,
> from ../gnulib-lib/stdlib.h:36,
> from ../libgettextpo/stdlib.h:36,
> from ../libgettextpo/gettext-po.h:21,
> from
> /usr/work/src/gettext-0.18.3.1/gettext-tools/tests/gettextpo-1-prg.c:22:
> ../libgettextpo/float.h:150:7: error: redefinition of 'union
> gl_long_double_union'
> ../gnulib-lib/float.h:150:7: note: originally defined here
> ../libgettextpo/float.h:155:41: error: conflicting types for 'gl_LDBL_MAX'
> ../gnulib-lib/float.h:155:41: note: previous declaration of 'gl_LDBL_MAX' was
> here
Line 302 of limits.h has:
#include <float.h>
I cobbled around it by doing this:
> ***************
> *** 147,157 ****
> --- 147,160 ----
>
> Unfortunately, this is not a constant expression, and the latter
> expression
> does not work well when GCC is optimizing.. */
> + #ifndef BLAH
> + #define BLAH
> union gl_long_double_union
> {
> struct { double hi; double lo; } dd;
> long double ld;
> };
> + #endif
> extern const union gl_long_double_union gl_LDBL_MAX;
> # define LDBL_MAX (gl_LDBL_MAX.ld)
> #endif
in both files. It may be that float.h needs to be renamed if it is going to
conflict with an existing file. Fun fun fun building on AIX :-)
I am not sure if I am subscribed to this list or not. If you need help in
debugging this, drop me a direct email.
Good luck and thank you,
Perry Smith
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [bug-gettext] Compile error for gettext-0.18.3.1,
Perry Smith <=