[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hassle I had to work around when compiling 24.4 on Windows

From: Eli Zaretskii
Subject: Re: Hassle I had to work around when compiling 24.4 on Windows
Date: Sun, 26 Oct 2014 20:41:14 +0200

> Date: Sun, 26 Oct 2014 11:08:44 -0700
> From: Joel Bion <address@hidden>
> 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

  #ifndef WINDOWSNT
  /* On AIX 3 this must be included before any other include file.  */
  #include <alloca.h>
  # error "alloca not available on this machine"

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
      $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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]