From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Hassle I had to work around when compiling 24.4 on Windows Date: Sun, 26 Oct 2014 20:41:14 +0200 Message-ID: <83bnoy4qt1.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1414348912 30070 80.91.229.3 (26 Oct 2014 18:41:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2014 18:41:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: j-comm@westvi.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 26 19:41:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XiSl6-0002ve-Af for ged-emacs-devel@m.gmane.org; Sun, 26 Oct 2014 19:41:44 +0100 Original-Received: from localhost ([::1]:58029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiSl5-0006NH-Vv for ged-emacs-devel@m.gmane.org; Sun, 26 Oct 2014 14:41:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiSkx-0006Mx-Ex for emacs-devel@gnu.org; Sun, 26 Oct 2014 14:41:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiSkr-0006nM-1a for emacs-devel@gnu.org; Sun, 26 Oct 2014 14:41:35 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:38880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiSkq-0006n7-QA for emacs-devel@gnu.org; Sun, 26 Oct 2014 14:41:28 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NE200K00EI4HE00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sun, 26 Oct 2014 20:41:27 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NE200KETEL25X70@a-mtaout20.012.net.il>; Sun, 26 Oct 2014 20:41:27 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175873 Archived-At: > Date: Sun, 26 Oct 2014 11:08:44 -0700 > From: Joel Bion > > I keep Emacs up to date on both GNU/Linux and Windows machines. > Installing the GNU/Linux from source was trivial, as would be expected. > > However, compiling the Windows version from source gave me the following > error (at end of email). To work around this quite annoying error, I had > to manually edit malloc.h in MinGW/include and have it forcibly define > alloca and _alloca as __builtin_alloca. When I do this, things all > compile fine and I have a brand-spanking new Emacs 24.4 on my Windows > machine that runs as well as my 24.3 build from last year. > > My point: It really, REALLY doesn't feel nice to edit malloc.h! You shouldn't need to. There's some snafu at work here, see below. > In file included from ../src/config.h:1840:0, > from c-ctype.c:18: > ../src/conf_post.h:49:3: error: #error "alloca not available on this > machine" > # error "alloca not available on this machine" > ^ I don't understand how this happened. src/conf_post.h around line 49 says: #ifndef WINDOWSNT /* On AIX 3 this must be included before any other include file. */ #include #if ! HAVE_ALLOCA # error "alloca not available on this machine" #endif #endif So this fragment, including the #error directive, should not be compiled on Windows, unless WINDOWSNT is not defined in your build. WINDOWSNT is defined by src/config.h: /* Define if compiling for native MS Windows. */ #define WINDOWSNT 1 which happens because of this snippet in the configure script: case $opsys in [...] mingw32) $as_echo "#define DOS_NT /**/" >>confdefs.h $as_echo "#define WINDOWSNT 1" >>confdefs.h So if your configuration was recognized as "mingw32" (and it was, according to the summary displayed by the configure script), which means opsys was set to mingw32, how come WINDOWSNT is not defined? Can you look into config.log and config.h and figure out what went wrong there?