From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15292 invoked by alias); 26 Oct 2011 12:25:44 -0000 Received: (qmail 15272 invoked by uid 22791); 26 Oct 2011 12:25:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_DB X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 12:25:28 +0000 Received: by iagf6 with SMTP id f6so2345080iag.0 for ; Wed, 26 Oct 2011 05:25:28 -0700 (PDT) Received: by 10.42.151.4 with SMTP id c4mr49974607icw.39.1319631928172; Wed, 26 Oct 2011 05:25:28 -0700 (PDT) Received: from [192.168.1.102] ([60.186.233.63]) by mx.google.com with ESMTPS id l28sm2966726ibc.3.2011.10.26.05.25.23 (version=SSLv3 cipher=OTHER); Wed, 26 Oct 2011 05:25:27 -0700 (PDT) Message-ID: <4EA7FCF2.7050402@gmail.com> Date: Wed, 26 Oct 2011 14:36:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: MinGW Users List , gdb@sourceware.org CC: Chris Sutcliffe , Xun Xun Subject: gdb (gdbserver.exe) build problem under msys Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-10/txt/msg00181.txt.bz2 Hi, when using msys + gcc 4.6.1 to build the latest version of gdb (gdb cvs head code), I found a problem. the build step looks like: mkdir build cd build CFLAGS="-O2 -fno-omit-frame-pointer -mtune=i686" \ ../gdb/configure \ --prefix=/mingw \ --host=mingw32 \ --build=mingw32 \ --target=mingw32 \ --with-python=/python/python \ --with-expat \ --disable-nls Then, I just run "make" under the build folder. I found that gdb.exe was successfully built, but the gdbserver.exe failed. the error log is below: make[3]: Entering directory `/f/build_gdb/gdb/gdbgit/build/gdb' make[4]: Entering directory `/f/build_gdb/gdb/gdbgit/build/gdb/doc' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/f/build_gdb/gdb/gdbgit/build/gdb/doc' make[4]: Entering directory `/f/build_gdb/gdb/gdbgit/build/gdb/gdbserver' CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in /bin/sh ./config.status config.status: creating config.h config.status: config.h is unchanged config.status: executing default commands gcc -c -O2 -fno-omit-frame-pointer -mtune=i686 -D__USE_MINGW_ACCESS -I. -I../../../gdb/gdb/gdbserver -I../../../gdb/gdb/gdbserver/../common -I../../../gdb/gdb/gdbserver/../regformats -I../../../gdb/gdb/gdbserver/../../include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror ../../../gdb/gdb/gdbserver/inferiors.c gcc -c -O2 -fno-omit-frame-pointer -mtune=i686 -D__USE_MINGW_ACCESS -I. -I../../../gdb/gdb/gdbserver -I../../../gdb/gdb/gdbserver/../common -I../../../gdb/gdb/gdbserver/../regformats -I../../../gdb/gdb/gdbserver/../../include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror ../../../gdb/gdb/gdbserver/regcache.c gcc -c -O2 -fno-omit-frame-pointer -mtune=i686 -D__USE_MINGW_ACCESS -I. -I../../../gdb/gdb/gdbserver -I../../../gdb/gdb/gdbserver/../common -I../../../gdb/gdb/gdbserver/../regformats -I../../../gdb/gdb/gdbserver/../../include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror ../../../gdb/gdb/gdbserver/remote-utils.c ../../../gdb/gdb/gdbserver/remote-utils.c: In function 'handle_accept_event': ../../../gdb/gdb/gdbserver/remote-utils.c:150:22: error: storage size of 'sockaddr' isn't known ../../../gdb/gdb/gdbserver/remote-utils.c:157:3: error: implicit declaration of function 'accept' [-Werror=implicit-function-declaration] .... I just looked at the build tree, and found that the file: build/gdb/gdbserver/config.h (this file size if about 9K) there contains some code: /* Define if we should use the Windows API, instead of the POSIX API. On Windows, we use the Windows API when building for MinGW, but the POSIX API when building for Cygwin. */ #undef USE_WIN32API This is wrong, because the USE_WIN32API should be defined under Windows MSYS. But when I check the file in the parent folder "build/gdb/config.h", the USE_WIN32API is correctly defined, so that's why gdb.exe can build successfully. By checking the file "build/gdb/gdbserver/config.log", it looks like all the checking works fine. So, I guess that something was wrong one the time when "build\gdb\gdbserver\config.status" was creating the config.h. Any one can help me to test it or find the problem? Thanks. asmwarrior ollydbg from codeblocks' forum