From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 683 invoked by alias); 6 Mar 2018 11:04:36 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 672 invoked by uid 89); 6 Mar 2018 11:04:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Mar 2018 11:04:34 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [IPv6:2001:718:2:2901:0:0:0:238] (may be forged)) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id w26B4T56015091 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Tue, 6 Mar 2018 12:04:30 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Received: from sao (02de09d2.bb.sky.com [2.222.9.210] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id w26B4SXv072185 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 6 Mar 2018 12:04:28 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: <1520334268.16358.20.camel@fit.cvut.cz> Subject: Re: Compiling GDB on Windows using mingw64 toolchain From: Jan Vrany To: "gdb@sourceware.org" Date: Tue, 06 Mar 2018 11:04:00 -0000 In-Reply-To: References: <1520183955.32035.2.camel@fit.cvut.cz> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-FIT-MailScanner-Information: X-FIT-MailScanner-ID: w26B4T56015091 X-FIT-MailScanner: Found to be clean X-FIT-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.11, required 6, autolearn=not spam, BAYES_00 -0.10, T_RP_MATCHES_RCVD -0.01) X-FIT-MailScanner-From: jan.vrany@fit.cvut.cz X-FIT-MailScanner-Watermark: 1520355871.37613@mPD6/cT1Tj5eAE00VlK0HA X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00015.txt.bz2 Hi, > This probably means that something did "#define wint_t int" before > we get here (or some #undef doesn't trigger), which makes the > compiler see: > > using ::int; > Yes, you're right. I dug a little deeper and tried to compile following program: -- #include #include int main(int argc, char **argv) { return 0; } -- using following: -- x86_64-w64-mingw32-g++ -x c++ -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. - I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -DTUI=1 - I/c/msys64/mingw64/include -DMS_WIN64 -I/mingw64/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-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o wchar.o -MT wchar.o -MMD -MP -MF ./.deps/wchar.Tpo wchar.cpp -- The above g++ invocation is essentially the same as used to compile (failing) i386-tdep.c, just with i386-tdep.c replaced by wchar.c. It fails with the very same error. Of course, the wchar.c test program compiles just fine "normally". So, it must be some of the command line switches that confuses the compiler, most likely so that it takes some incompatible "system" header. When I remove the `-I../../gdb/gnulib/import -Ibuild-gnulib/import` from the command, it compiles just fine. It seems to me that the problem originats in gdb/gnulib/import/wchar.in.h., line ~111. How to fix that, I don't know (yet). Thanks, Jan