* Hassle I had to work around when compiling 24.4 on Windows
@ 2014-10-26 18:08 Joel Bion
2014-10-26 18:41 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Joel Bion @ 2014-10-26 18:08 UTC (permalink / raw)
To: emacs-devel
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!
My question: What am I doing wrong that requires me to do this? And if
this is required, shouldn't a pointer to doing this be in the INSTALL
file in the nt subdirectory?
Thanks for any thoughts,
Joel
...
checking for alloca... yes
...
Configured for `i686-pc-mingw32'.
Where should the build process find the source code? .
What compiler should emacs be built with? gcc
-std=gnu99 -g3 -O
2 -gdwarf-2
Should Emacs use the GNU version of malloc? yes
Should Emacs use a relocating allocator for buffers? yes
Should Emacs use mmap(2) for buffer allocation? no
What window system should Emacs use? w32
What toolkit should Emacs use? none
Where do we find X Windows header files? NONE
Where do we find X Windows libraries? NONE
Does Emacs use -lXaw3d? no
Does Emacs use -lXpm? no
Does Emacs use -ljpeg? no
Does Emacs use -ltiff? no
Does Emacs use a gif library? no
Does Emacs use a png library? no
Does Emacs use -lrsvg-2? no
Does Emacs use imagemagick? no
Does Emacs support sound? yes
Does Emacs use -lgpm? no
Does Emacs use -ldbus? no
Does Emacs use -lgconf? no
Does Emacs use GSettings? no
Does Emacs use a file notification library? yes (w32)
Does Emacs use access control lists? yes
Does Emacs use -lselinux? no
Does Emacs use -lgnutls? no
Does Emacs use -lxml2? no
Does Emacs use -lfreetype? no
Does Emacs use -lm17n-flt? no
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs directly use zlib? no
Does Emacs use toolkit scroll bars? yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib-src/Makefile
config.status: creating oldXMenu/Makefile
config.status: creating doc/emacs/Makefile
config.status: creating doc/misc/Makefile
config.status: creating doc/lispintro/Makefile
config.status: creating doc/lispref/Makefile
config.status: creating src/Makefile
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating nextstep/Makefile
config.status: creating nt/Makefile
config.status: creating admin/unidata/Makefile
config.status: creating admin/grammars/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing src/epaths.h commands
config.status: executing src/.gdbinit commands
User@User-PC /c/usrlocal/emacssrc/emacs-24.4
$ make
[ -r "src/config.in" ] || ( cd . && autoheader )
cd nt && make all \
CC='gcc -std=gnu99' CFLAGS='-g3 -O2 -gdwarf-2'
CPPFLAGS='-mtune=penti
um4 -DUSE_CRT_DLL=1 -I /c/usrlocal/emacssrc/emacs-24.4/nt/inc' \
LDFLAGS='' MAKE='make'
make[1]: Entering directory `/c/usrlocal/emacssrc/emacs-24.4/nt'
windres -I . -O coff -o emacs.res ./emacs.rc
gcc -std=gnu99 -mtune=pentium4 -I. -I. -mtune=pentium4
-DUSE_CRT_DLL=1 -
I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2 ./runemacs.c
emacs.re
s -mwindows \
-o runemacs.exe
gcc -std=gnu99 -mtune=pentium4 -I. -I. -mtune=pentium4
-DUSE_CRT_DLL=1 -
I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2 ./addpm.c
-lole32 -lu
uid -o addpm.exe
gcc -std=gnu99 -mtune=pentium4 -I. -I. -mtune=pentium4
-DUSE_CRT_DLL=1 -
I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2 ./cmdproxy.c
-o cmdpr
oxy.exe
gcc -std=gnu99 -mtune=pentium4 -I. -I. -mtune=pentium4
-DUSE_CRT_DLL=1 -
I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2 ./ddeclient.c
-o ddec
lient.exe
gcc -std=gnu99 -mtune=pentium4 -I. -I. -mtune=pentium4
-DUSE_CRT_DLL=1 -
I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2 -gdwarf-2
./addsection.c -o add
section.exe
make[1]: Leaving directory `/c/usrlocal/emacssrc/emacs-24.4/nt'
cd lib && make all \
CC='gcc -std=gnu99' CFLAGS='-g3 -O2 -gdwarf-2'
CPPFLAGS='-mtune=penti
um4 -DUSE_CRT_DLL=1 -I /c/usrlocal/emacssrc/emacs-24.4/nt/inc' \
LDFLAGS='' MAKE='make'
make[1]: Entering directory `/c/usrlocal/emacssrc/emacs-24.4/lib'
rm -f alloca.h-t alloca.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat ./alloca.in.h; \
} > alloca.h-t && \
mv -f alloca.h-t alloca.h
rm -f byteswap.h-t byteswap.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat ./byteswap.in.h; \
} > byteswap.h-t && \
mv -f byteswap.h-t byteswap.h
rm -f errno.h-t errno.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''INCLUDE_NEXT''@|include_next|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC
system_header|g' \
-e 's|@''PRAGMA_COLUMNS''@||g' \
-e 's|@''NEXT_ERRNO_H''@|<errno.h>|g' \
-e 's|@''EMULTIHOP_HIDDEN''@|0|g' \
-e 's|@''EMULTIHOP_VALUE''@||g' \
-e 's|@''ENOLINK_HIDDEN''@|0|g' \
-e 's|@''ENOLINK_VALUE''@||g' \
-e 's|@''EOVERFLOW_HIDDEN''@|0|g' \
-e 's|@''EOVERFLOW_VALUE''@||g' \
< ./errno.in.h; \
} > errno.h-t && \
mv errno.h-t errno.h
rm -f execinfo.h-t execinfo.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat ./execinfo.in.h; \
} > execinfo.h-t && \
mv execinfo.h-t execinfo.h
rm -f arg-nonnull.h-t arg-nonnull.h && \
sed -n -e '/GL_ARG_NONNULL/,$p' \
< ../build-aux/snippet/arg-nonnull.h \
> arg-nonnull.h-t && \
mv arg-nonnull.h-t arg-nonnull.h
rm -f getopt.h-t getopt.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''HAVE_GETOPT_H''@|0|g' \
-e 's|@''INCLUDE_NEXT''@|include_next|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC
system_header|g' \
-e 's|@''PRAGMA_COLUMNS''@||g' \
-e 's|@''NEXT_GETOPT_H''@|<getopt.h>|g' \
-e '/definition of _GL_ARG_NONNULL/r arg-nonnull.h' \
< ./getopt.in.h; \
} > getopt.h-t && \
mv -f getopt.h-t getopt.h
rm -f c++defs.h-t c++defs.h && \
sed -n -e '/_GL_CXXDEFS/,$p' \
< ../build-aux/snippet/c++defs.h \
> c++defs.h-t && \
mv c++defs.h-t c++defs.h
rm -f warn-on-use.h-t warn-on-use.h && \
sed -n -e '/^.ifndef/,$p' \
< ../build-aux/snippet/warn-on-use.h \
> warn-on-use.h-t && \
mv warn-on-use.h-t warn-on-use.h
make all-am
make[2]: Entering directory `/c/usrlocal/emacssrc/emacs-24.4/lib'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../lib -I../src -I../src
-mtune=pentium4
-DUSE_CRT_DLL=1 -I /c/usrlocal/emacssrc/emacs-24.4/nt/inc -g3 -O2
-gdwarf-
2 -MT c-ctype.o -MD -MP -MF .deps/c-ctype.Tpo -c -o c-ctype.o c-ctype.c
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"
^
make[2]: *** [c-ctype.o] Error 1
make[2]: Leaving directory `/c/usrlocal/emacssrc/emacs-24.4/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/usrlocal/emacssrc/emacs-24.4/lib'
make: *** [lib] Error 2
User@User-PC /c/usrlocal/emacssrc/emacs-24.4
$
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Hassle I had to work around when compiling 24.4 on Windows
2014-10-26 18:08 Hassle I had to work around when compiling 24.4 on Windows Joel Bion
@ 2014-10-26 18:41 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2014-10-26 18:41 UTC (permalink / raw)
To: j-comm; +Cc: emacs-devel
> Date: Sun, 26 Oct 2014 11:08:44 -0700
> From: Joel Bion <j-comm@westvi.com>
>
> 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 <alloca.h>
#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?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-26 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-26 18:08 Hassle I had to work around when compiling 24.4 on Windows Joel Bion
2014-10-26 18:41 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).