From: asmwarrior <asmwarrior@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Eli Zaretskii <eliz@gnu.org>, Yao Qi <yao@codesourcery.com>,
gdb-patches@sourceware.org
Subject: [MinGW-w64]Build gdb/ctf.c failed
Date: Mon, 25 Mar 2013 04:08:00 -0000 [thread overview]
Message-ID: <514FA117.9030604@gmail.com> (raw)
In-Reply-To: <87vc8m7z1d.fsf@fleche.redhat.com>
On 2013-3-21 1:37, Tom Tromey wrote:
>>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Wed, 20 Mar 2013 10:35:35 +0800
>>> From: Yao Qi <yao@codesourcery.com>
>>> CC: gdb-patches <gdb-patches@sourceware.org>, Eli Zaretskii <eliz@gnu.org>
>>>
>>> Also define a macro 'mkdir' in this patch, as Eli suggested before. Is
>>> it OK?
>
> Eli> The macro is OK, but please make sure unistd.h is included by this
> Eli> file, because that's where MinGW defines the prototype of _mkdir.
>
> defs.h includes unistd.h.
>
> Tom
>
Hi, all. I'm using the GCC suite with MinGW-w64 SDKs. There is a little different from the MinGW SDKs.
I get the build error:
mingw32-gcc -O0 -g -D__USE_MINGW_ACCESS -I. -I../../gdb/gdb -I../../gdb/gdb/common -I../../gdb/gdb/config -DLOCALEDIR="\"/mingw/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/gdb/../include/opcode -I../../gdb/gdb/../opcodes/.. -I../../gdb/gdb/../readline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../libdecnumber -I../../gdb/gdb/../libdecnumber -I../../gdb/gdb/gnulib/import -Ibuild-gnulib/import -IE:/code/python273/include -IE:/code/python273/include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wno-format -Werror -c -o ctf.o -MT ctf.o -MMD -MP -MF .deps/ctf.Tpo ../../gdb/gdb/ctf.c
../../gdb/gdb/ctf.c: In function 'ctf_start':
../../gdb/gdb/ctf.c:304:3: error: implicit declaration of function '_mkdir' [-Werror=implicit-function-declaration]
cc1.exe: all warnings being treated as errors
make[2]: *** [ctf.o] Error 1
I found that _mkdir was declared in the file: direct.h in MinGW-w64 SDKs:
_CRTIMP int __cdecl _mkdir(const char *_Path);
And it looks like no other header files include direct.h, so #include <direct.h> is needed here.
For MinGW SDKs, as Tom said, it was indirectly included in defs.h, this there is no such issue.
Yuanhui Zhang
BTW:
Do we need to add a check like below(We don't have such check in GDB, but I found such a check in other place):
/* Define to 1 if you have the <direct.h> header file. */
#define HAVE_DIRECT_H 1
next prev parent reply other threads:[~2013-03-25 0:53 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 2:02 New ARI warning Fri Mar 15 02:02:12 UTC 2013 in -D 2013-03-15-gmt GDB Administrator
2013-03-15 9:05 ` Yao Qi
2013-03-15 9:48 ` Compilation failure for mingw64 target (was New ARI warning Fri Mar 15 02:02:12 UTC 2013 in -D 2013-03-15-gmt) Pierre Muller
2013-03-15 11:06 ` Yao Qi
2013-03-15 11:24 ` Pierre Muller
2013-03-15 14:05 ` Yao Qi
2013-03-15 14:43 ` Yao Qi
2013-03-15 16:52 ` Tom Tromey
2013-03-15 16:55 ` Pierre Muller
[not found] ` <20313.4872871034$1363366373@news.gmane.org>
2013-03-15 17:01 ` Tom Tromey
2013-03-15 18:22 ` Eli Zaretskii
2013-03-15 18:24 ` Tom Tromey
2013-03-15 18:33 ` Eli Zaretskii
2013-03-15 18:53 ` Mike Frysinger
2013-03-15 18:58 ` Eli Zaretskii
2013-03-15 19:45 ` Mike Frysinger
2013-03-16 4:23 ` [PATCH 0/3] Fix build failure caused by ctf.c Yao Qi
2013-03-16 4:23 ` [PATCH 3/3] Don't use unportable macros Yao Qi
2013-03-19 17:12 ` Doug Evans
2013-03-20 2:48 ` Yao Qi
2013-03-20 15:17 ` Doug Evans
2013-03-21 1:58 ` Yao Qi
2013-03-20 17:36 ` Eli Zaretskii
2013-03-20 17:40 ` Tom Tromey
2013-03-25 4:08 ` asmwarrior [this message]
2013-03-25 6:41 ` [MinGW-w64]Build gdb/ctf.c failed asmwarrior
2013-03-25 8:28 ` Yao Qi
2013-03-25 8:39 ` Eli Zaretskii
2013-03-25 8:40 ` Eli Zaretskii
2013-03-25 9:15 ` Kai Tietz
2013-03-25 9:42 ` Yao Qi
2013-03-25 10:12 ` Kai Tietz
2013-03-25 12:43 ` Eli Zaretskii
2013-03-25 14:40 ` Yao Qi
2013-03-25 9:54 ` Eli Zaretskii
2013-03-25 10:50 ` Kai Tietz
2013-03-25 13:12 ` Eli Zaretskii
2013-03-25 13:21 ` Kai Tietz
2013-03-25 14:25 ` Eli Zaretskii
2013-03-25 15:18 ` Kai Tietz
2013-03-25 15:44 ` Eli Zaretskii
2013-03-25 16:14 ` Kai Tietz
2013-03-25 16:25 ` Eli Zaretskii
2013-03-16 4:23 ` [PATCH 2/3] Write CTF in host byte order Yao Qi
2013-03-19 21:26 ` Joel Brobecker
2013-03-20 3:48 ` Yao Qi
2013-03-16 7:35 ` [PATCH 1/3] Import mkdir module Yao Qi
2013-03-19 16:32 ` Doug Evans
2013-03-19 17:20 ` Eli Zaretskii
2013-03-19 21:23 ` Joel Brobecker
2013-03-15 16:22 ` New ARI warning Fri Mar 15 02:02:12 UTC 2013 in -D 2013-03-15-gmt Pedro Alves
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=514FA117.9030604@gmail.com \
--to=asmwarrior@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=yao@codesourcery.com \
/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