This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb-7.12.1 for arm-rtems4.12 fails to build on FreeBSD 11.0
- From: Chris Johns <chrisj at rtems dot org>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 1 Mar 2017 08:17:32 +1100
- Subject: Re: gdb-7.12.1 for arm-rtems4.12 fails to build on FreeBSD 11.0
- Authentication-results: sourceware.org; auth=none
- References: <99cb977b-7c3d-098f-0c97-175ae737b806@rtems.org> <86zih6r3z7.fsf@gmail.com>
On 28/02/2017 21:42, Yao Qi wrote:
> Chris Johns <chrisj@rtems.org> writes:
>
>> I am getting the following build failure on FreeBSD 11.0:
>>
>> In file included from ../../gdb-7.12.1/gdb/arch/arm.c:20:
>> In file included from ../../gdb-7.12.1/gdb/common/common-defs.h:31:
>> In file included from build-gnulib/import/stdio.h:53:
>> build-gnulib/import/stddef.h:104:3: error: typedef redefinition with
>> different types ('union max_align_t' vs 'long double')
>> } max_align_t;
>> ^
>> /usr/include/c++/v1/stddef.h:57:21: note: previous definition is here
>> typedef long double max_align_t;
>> ^
>> It seems build-gnulib/import/stddef.h is created assuming there is no
>> host provided version. I cannot figure out how the configure phase
>> test works and why this is happening.
>>
>> Any hints?
>
> Looks a gnulib issue to me. We upgrade gnulib after 7.12 release to fix
> this issue. https://sourceware.org/ml/gdb-patches/2016-10/msg00320.html
Thank you for the hint.
> Does GDB mainline fail also?
No it does not build and git includes another patch for gnulib by Pedro in November. I have raised the bug #21206 to track the issue.
The build output is:
/usr/bin/c++ -O2 -pipe -fbracket-depth=1024 -I/opt/work/chris/rtems/rsb/rtems-source-builder.git/rtems/build/tmp/sb-chris/4.12/rtems-arm/opt/work/rtems/4.12/include -std=gnu++11 -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config -DLOCALEDIR="\"/opt/work/rtems/4.12/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-gdb/gdb/../include/
opcode -I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/.. -I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/opt/work/rtems/4.12/include -I/usr/local/inclu
de/python2.7 -I/usr/local/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -c -o gdb.o -MT gdb.o -MMD -MP -MF .deps/gdb.Tpo ../../binutils-gdb/gdb/gdb.c
c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
warning: unknown warning option '-Wunused-but-set-parameter'; did you mean '-Wunused-parameter'? [-Wunknown-warning-option]
warning: unknown warning option '-Wunused-but-set-variable'; did you mean '-Wunused-const-variable'? [-Wunknown-warning-option]
In file included from ../../binutils-gdb/gdb/gdb.c:19:
In file included from ../../binutils-gdb/gdb/defs.h:28:
In file included from ../../binutils-gdb/gdb/common/common-defs.h:52:
In file included from build-gnulib/import/stdio.h:53:
build-gnulib/import/stddef.h:106:3: error: typedef redefinition with different types ('union max_align_t' vs 'long double')
} max_align_t;
^
/usr/include/c++/v1/stddef.h:57:21: note: previous definition is here
typedef long double max_align_t;
^
In file included from ../../binutils-gdb/gdb/gdb.c:19:
In file included from ../../binutils-gdb/gdb/defs.h:53:
../../binutils-gdb/gdb/ui-file.h:93:28: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
extern int ui_file_isatty (struct ui_file *);
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
../../binutils-gdb/gdb/ui-file.h:93:28: note: did you mean class here?
extern int ui_file_isatty (struct ui_file *);
^~~~~~
class
../../binutils-gdb/gdb/ui-file.h:95:28: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
extern void ui_file_write (struct ui_file *file, const char *buf,
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
../../binutils-gdb/gdb/ui-file.h:95:28: note: did you mean class here?
extern void ui_file_write (struct ui_file *file, const char *buf,
^~~~~~
class
../../binutils-gdb/gdb/ui-file.h:98:39: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
../../binutils-gdb/gdb/ui-file.h:98:39: note: did you mean class here?
extern void ui_file_write_async_safe (struct ui_file *file, const char *buf,
^~~~~~
class
../../binutils-gdb/gdb/ui-file.h:101:27: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
../../binutils-gdb/gdb/ui-file.h:101:27: note: did you mean class here?
extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
^~~~~~
class
In file included from ../../binutils-gdb/gdb/gdb.c:19:
../../binutils-gdb/gdb/defs.h:327:8: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
struct ui_file *, int, char *);
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
../../binutils-gdb/gdb/defs.h:327:8: note: did you mean class here?
struct ui_file *, int, char *);
^~~~~~
class
../../binutils-gdb/gdb/defs.h:338:57: warning: struct 'ui_file' was previously declared as a class [-Wmismatched-tags]
extern void print_address (struct gdbarch *, CORE_ADDR, struct ui_file *);
^
../../binutils-gdb/gdb/ui-file.h:26:7: note: previous use is here
class ui_file
^
Chris