Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* elf-attrs.c compliation errors
@ 2018-08-01  0:44 Bill Morgan
  2018-08-01 12:45 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Morgan @ 2018-08-01  0:44 UTC (permalink / raw)
  To: gdb

Hello,

I'm building this commit: 33633d9f5b138a211405d482436db2f7661b190e

With this configuration:

./configure \
    --build=x86_64-w64-mingw64 \
    --host=x86_64-w64-mingw64 \
    --target=arm-none-eabi \
    --with-python \
    --without-tcl \
    --without-tk \
    --without-guile \
    --with-expat \
    --with-lzma \
    --with-system-readline \
    --with-zlib \
    --enable-tui

I am getting the compilation errors below:

MINGW64 /d/git/binutils-gdb (master)*
$ make -j16 -k
make[1]: Entering directory '/d/git/binutils-gdb'
make[1]: Nothing to be done for 'all-target'.
make[2]: Entering directory '/d/git/binutils-gdb/libiberty'
make[2]: Entering directory '/d/git/binutils-gdb/intl'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/git/binutils-gdb/intl'
make[2]: Entering directory '/d/git/binutils-gdb/zlib'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/git/binutils-gdb/zlib'
make[2]: Entering directory '/d/git/binutils-gdb/libdecnumber'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/git/binutils-gdb/libdecnumber'
make[2]: Entering directory '/d/git/binutils-gdb/etc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/git/binutils-gdb/etc'
make[3]: Entering directory '/d/git/binutils-gdb/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/d/git/binutils-gdb/libiberty/testsuite'
make[2]: Entering directory '/d/git/binutils-gdb/readline'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/d/git/binutils-gdb/readline'
make[2]: Leaving directory '/d/git/binutils-gdb/libiberty'
make[2]: Entering directory '/d/git/binutils-gdb/bfd'
Making info in doc
make[3]: Entering directory '/d/git/binutils-gdb/bfd/doc'
make[3]: Leaving directory '/d/git/binutils-gdb/bfd/doc'
Making info in po
make[3]: Entering directory '/d/git/binutils-gdb/bfd/po'
make[3]: Nothing to be done for 'info'.
make[3]: Leaving directory '/d/git/binutils-gdb/bfd/po'
make[3]: Entering directory '/d/git/binutils-gdb/bfd'
make[3]: Nothing to be done for 'info-am'.
make[3]: Leaving directory '/d/git/binutils-gdb/bfd'
make  all-recursive
make[3]: Entering directory '/d/git/binutils-gdb/bfd'
Making all in doc
make[4]: Entering directory '/d/git/binutils-gdb/bfd/doc'
make[4]: Leaving directory '/d/git/binutils-gdb/bfd/doc'
Making all in po
make[4]: Entering directory '/d/git/binutils-gdb/bfd/po'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/d/git/binutils-gdb/bfd/po'
make[4]: Entering directory '/d/git/binutils-gdb/bfd'
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-DBINDIR='"/mingw64/bin"' -I. -I. -I./../include  -DHAVE_arm_elf32_le_vec
-DHAVE_arm_elf32_fdpic_le_vec -DHAVE_arm_elf32_be_vec
-DHAVE_arm_elf32_fdpic_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec
-DHAVE_plugin_vec   -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Wstack-usage=262144 -Werror -I./../zlib -g -O2
-D__USE_MINGW_ACCESS -MT elf-attrs.lo -MD -MP -MF .deps/elf-attrs.Tpo -c -o
elf-attrs.lo elf-attrs.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -DBINDIR=\"/mingw64/bin\" -I.
-I. -I./../include -DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_fdpic_le_vec
-DHAVE_arm_elf32_be_vec -DHAVE_arm_elf32_fdpic_be_vec -DHAVE_elf32_le_vec
-DHAVE_elf32_be_vec -DHAVE_plugin_vec -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -I./../zlib -g
-O2 -D__USE_MINGW_ACCESS -MT elf-attrs.lo -MD -MP -MF .deps/elf-attrs.Tpo
-c elf-attrs.c -o elf-attrs.o
In file included from elf-attrs.c:21:0:
elf-attrs.c: In function '_bfd_elf_parse_attributes':
elf-attrs.c:446:29: error: unknown conversion type character 'l' in format
[-Werror=format=]
       _bfd_error_handler (_("%pB: error: attribute section '%pA' too big:
%#llx"),
                             ^
sysdep.h:204:44: note: in definition of macro 'gettext'
 # define gettext(Msgid) dgettext (PACKAGE, Msgid)
                                            ^~~~~
elf-attrs.c:446:27: note: in expansion of macro '_'
       _bfd_error_handler (_("%pB: error: attribute section '%pA' too big:
%#llx"),
                           ^
elf-attrs.c:446:29: error: too many arguments for format
[-Werror=format-extra-args]
       _bfd_error_handler (_("%pB: error: attribute section '%pA' too big:
%#llx"),
                             ^
sysdep.h:204:44: note: in definition of macro 'gettext'
 # define gettext(Msgid) dgettext (PACKAGE, Msgid)
                                            ^~~~~
elf-attrs.c:446:27: note: in expansion of macro '_'
       _bfd_error_handler (_("%pB: error: attribute section '%pA' too big:
%#llx"),
                           ^
cc1.exe: all warnings being treated as errors
make[4]: *** [Makefile:1599: elf-attrs.lo] Error 1
make[4]: Target 'all-am' not remade because of errors.
make[4]: Leaving directory '/d/git/binutils-gdb/bfd'
make[3]: *** [Makefile:1642: all-recursive] Error 1
make[3]: Leaving directory '/d/git/binutils-gdb/bfd'
make[2]: *** [Makefile:1168: all] Error 2
make[2]: Leaving directory '/d/git/binutils-gdb/bfd'
make[1]: *** [Makefile:2699: all-bfd] Error 2
make[1]: Target 'all-host' not remade because of errors.
make[1]: Leaving directory '/d/git/binutils-gdb'
make: *** [Makefile:857: all] Error 2
MINGW64 /d/git/binutils-gdb (master)*
$


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: elf-attrs.c compliation errors
  2018-08-01  0:44 elf-attrs.c compliation errors Bill Morgan
@ 2018-08-01 12:45 ` Simon Marchi
  2018-08-01 14:24   ` Bill Morgan
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2018-08-01 12:45 UTC (permalink / raw)
  To: Bill Morgan; +Cc: gdb

On 2018-07-31 20:44, Bill Morgan wrote:
> Hello,
> 
> I'm building this commit: 33633d9f5b138a211405d482436db2f7661b190e
> 
> With this configuration:
> 
> ./configure \
>     --build=x86_64-w64-mingw64 \
>     --host=x86_64-w64-mingw64 \
>     --target=arm-none-eabi \
>     --with-python \
>     --without-tcl \
>     --without-tk \
>     --without-guile \
>     --with-expat \
>     --with-lzma \
>     --with-system-readline \
>     --with-zlib \
>     --enable-tui
> 
> I am getting the compilation errors below:
> 

[snip]

I also get this error when trying to build on Windows.  I installed 
mingw-w64 using the installer found here:

http://mingw-w64.org/doku.php/download/mingw-builds

I just noticed that the host gets auto-detected as "x86_64-pc-mingw64" 
(same as you specified explicitly).  I see that when building on mingw, 
-Wno-format should be added, specifically ignoring these warnings:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/warning.m4;h=5a7f92d61622c6a0934aa950f8aaa6bf55677d43;hb=HEAD#l75

However, it's only done when the host string contains "mingw32", not 
"mingw64".  Maybe this needs to be adjusted to "*-*-mingw*"?  If you 
grep, you'll find a bunch of other things conditionally done if the 
triplet is "*-*-mingw32*", maybe they need to be adjusted too?

Simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: elf-attrs.c compliation errors
  2018-08-01 12:45 ` Simon Marchi
@ 2018-08-01 14:24   ` Bill Morgan
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Morgan @ 2018-08-01 14:24 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

On Wed, Aug 1, 2018 at 7:45 AM Simon Marchi <simon.marchi@polymtl.ca> wrote:

> On 2018-07-31 20:44, Bill Morgan wrote:
> > Hello,
> >
> > I'm building this commit: 33633d9f5b138a211405d482436db2f7661b190e
> >
> > With this configuration:
> >
> > ./configure \
> >     --build=x86_64-w64-mingw64 \
> >     --host=x86_64-w64-mingw64 \
> >     --target=arm-none-eabi \
> >     --with-python \
> >     --without-tcl \
> >     --without-tk \
> >     --without-guile \
> >     --with-expat \
> >     --with-lzma \
> >     --with-system-readline \
> >     --with-zlib \
> >     --enable-tui
> >
> > I am getting the compilation errors below:
> >
>
> [snip]
>
> I also get this error when trying to build on Windows.


Thanks for confirming.


> I installed
> mingw-w64 using the installer found here:
>
> http://mingw-w64.org/doku.php/download/mingw-builds
>
> I just noticed that the host gets auto-detected as "x86_64-pc-mingw64"
> (same as you specified explicitly).  I see that when building on mingw,
> -Wno-format should be added, specifically ignoring these warnings:
>
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/warning.m4;h=5a7f92d61622c6a0934aa950f8aaa6bf55677d43;hb=HEAD#l75
>
> However, it's only done when the host string contains "mingw32", not
> "mingw64".  Maybe this needs to be adjusted to "*-*-mingw*"?  If you
> grep, you'll find a bunch of other things conditionally done if the
> triplet is "*-*-mingw32*", maybe they need to be adjusted too?
>
>
I noticed that the mingw-w64-gdb package is built with the mingw32 third
part of the triple.

https://github.com/Alexpux/MSYS2-packages/blob/335af17a04df7481e80979eafbd134fef9de9a0f/pacman/makepkg_mingw64.conf#L49

https://github.com/Alexpux/MINGW-packages/blob/dbe70c831fe4024016d5466213b9167c31cdf054/mingw-w64-gdb/PKGBUILD#L85



I will use that configuration.

Simon
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-01 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01  0:44 elf-attrs.c compliation errors Bill Morgan
2018-08-01 12:45 ` Simon Marchi
2018-08-01 14:24   ` Bill Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox