Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: asmwarrior <asmwarrior@gmail.com>
Cc: GDB Development <gdb@sourceware.org>,
	       Binutils Development <binutils@sourceware.org>
Subject: Re: BFD MinGW build error: implicit declaration of function 'wcsncasecmp'
Date: Wed, 18 Dec 2013 10:06:00 -0000	[thread overview]
Message-ID: <52B1738D.4010409@redhat.com> (raw)
In-Reply-To: <52B17083.7040404@gmail.com>

Hi there,

Adding the binutils folks.  (bfd is maintained by binutils.)

Looks like fallout from the .rsrc merge support.

On 12/18/2013 09:53 AM, asmwarrior wrote:
> I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log
> 
> mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo
> rm -f peigen.c
> sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new
> mv -f peigen.new peigen.c
> /bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK    -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include  -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec  -DBINDIR='"/mingw/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o
> peigen.c: In function 'rsrc_cmp':
> peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration]
>        res = wcsncasecmp (& awc, & bwc, 1);
>        ^
> cc1.exe: all warnings being treated as errors
> make[4]: *** [peigen.lo] Error 1
> make[4]: Leaving directory `/f/build_gdb/mybuild/bfd'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/f/build_gdb/mybuild/bfd'
> make[2]: *** [all] Error 2
> 
> I just see this is related to the change of this commit:
> 
> Revision: 5879bb8fc592e4aea85bdc2a84381d89850e5770
> Author: Nick Clifton <nickc@redhat.com>
> Date: 2013-12-17 23:39:13
> Message:
> * peXXigen.c: Include wchar.h if available.
> 
> Include safe-ctype.h.
>     (HighBitSet, SetHighBit, WithoutHighBit): New macros.
>     (pe_print_resource_entries): Rename to
>     rsrc_print_resource_entries.  Handle names that are not RVAs.
>     (pe_print_resource_directory): Rename to
>     rsrc_print_resource_directory.
>     (pe_print_rsrc): Rename to rsrc_print_section.  Corrupt
>     computation of RVA bias.
>     (rsrc_count_entries): New function.
>     (rsrc_count_directory): New function.
>     (rsrc_parse_entry): New function.
>     (rsrc_parse_entries): New function.
>     (rsrc_parse_directory): New function.
>     (rsrc_write_string): New function.
>     (rsrc_compute_rva): New function.
>     (rsrc_write_leaf): New function.
>     (rsrc_write_entry): New function.
>     (rsrc_write_directory): New function.
>     (u16_mbtouc): New function.
>     (rsrc_cmp): New function.
>     (rsrc_print_name): New function.
>     (rsrc_resource_name): New function.
>     (rsrc_merge_string_entries): New function.
>     (rsrc_sort_entries): New function.
>     (rsrc_attach_chain): New function.
>     (rsrc_merge): New function.
>     (rsrc_process_section): New function - merges the contents of a
>     .rsrc section.
>     (_bfd_XXi_final_link_postscript): Call rsrc_process_section.
>     * configure.in (AC_CHECK_HEADERS): Add wchar.h
>     * config.in: Regenerate.
>     * configure: Regenerate.
> ----
> Modified: bfd/ChangeLog
> Modified: bfd/config.in
> Modified: bfd/configure
> Modified: bfd/configure.in
> Modified: bfd/peXXigen.c
> 
> In my ststem, wchar.h exists, but I see there is no functionwcsncasecmp() here.
> 
> Thanks
> 
> Yuanhui Zhang
> 


-- 
Pedro Alves


  parent reply	other threads:[~2013-12-18 10:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  9:54 GDB " asmwarrior
2013-12-18  9:58 ` asmwarrior
2013-12-18 10:06 ` Pedro Alves [this message]
2013-12-18 12:50   ` BFD " asmwarrior
2013-12-18 15:47     ` Eli Zaretskii
2013-12-18 13:03   ` [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c Pierre Muller
2013-12-18 17:52     ` nick clifton
2013-12-19 11:45       ` [RFC-v2] " Pierre Muller
2013-12-19 12:41         ` nick clifton
2013-12-19 13:02           ` Mark Kettenis
2013-12-19 13:18           ` Pierre Muller
2013-12-19 15:13             ` nick clifton
     [not found]   ` <52b19d01.22cbc20a.69b0.ffffb29eSMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18 13:25     ` [RFC] " asmwarrior
     [not found]   ` <52b19d19.0850420a.7b6a.52dcSMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18 17:56     ` Pedro Alves
2013-12-19 11:15       ` nick clifton
2013-12-18 15:35 ` GDB MinGW build error: implicit declaration of function 'wcsncasecmp' Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B1738D.4010409@redhat.com \
    --to=palves@redhat.com \
    --cc=asmwarrior@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox