* Building Emacs with MSVC
@ 2010-04-07 2:37 Christoph
2010-04-07 3:13 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Christoph @ 2010-04-07 2:37 UTC (permalink / raw)
To: emacs-devel
Does anybody know which version of MSVC successfully built Emacs last?
This blog post
http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
points to MSVC 2003 as a version that apparently worked. According to
the post and comments in the Emacs makefiles, MSVC 2005 does not work.
I have MSVC 2008 Express Edition installed and I have the trunk to the
point where it compiles and links, but crashes when dumping Emacs on
nmake bootstrap. The necessary changes to get to this point included
various source files, and nmake.defs. I will submit patches for some of
these.
Anyway, I was wondering what the general status of MSVC support is.
While working on the make dist target I realized how painful MSVC
support can be.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building Emacs with MSVC
2010-04-07 2:37 Building Emacs with MSVC Christoph
@ 2010-04-07 3:13 ` Eli Zaretskii
2010-04-07 4:49 ` Christoph
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07 3:13 UTC (permalink / raw)
To: Christoph; +Cc: emacs-devel
> Date: Tue, 06 Apr 2010 20:37:22 -0600
> From: Christoph <cschol2112@googlemail.com>
>
> Does anybody know which version of MSVC successfully built Emacs last?
>
> This blog post
> http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
> points to MSVC 2003 as a version that apparently worked. According to
> the post and comments in the Emacs makefiles, MSVC 2005 does not work.
Yes, Studio 2003 is the last version known to build a working binary.
> I have MSVC 2008 Express Edition installed and I have the trunk to the
> point where it compiles and links, but crashes when dumping Emacs on
> nmake bootstrap.
That's a known problem. I forget the details (you can find them in
the archives), but there's some problem with the library functions
supplied by later versions of Studio, and/or conflicts with our
customized malloc, that cause the crash.
> The necessary changes to get to this point included
> various source files, and nmake.defs. I will submit patches for some of
> these.
What for? If we cannot build a working binary, why pollute the
sources with more MSVC-specific patches?
> Anyway, I was wondering what the general status of MSVC support is.
> While working on the make dist target I realized how painful MSVC
> support can be.
Right. And since MinGW is available and in pretty good shape, we
decided at the time not to invest any effort in MSVC.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building Emacs with MSVC
2010-04-07 3:13 ` Eli Zaretskii
@ 2010-04-07 4:49 ` Christoph
2010-04-07 7:22 ` Eli Zaretskii
2010-04-19 16:26 ` Eli Zaretskii
0 siblings, 2 replies; 5+ messages in thread
From: Christoph @ 2010-04-07 4:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On 4/6/2010 9:13 PM, Eli Zaretskii wrote:
> Yes, Studio 2003 is the last version known to build a working binary.
>
OK.
> That's a known problem. I forget the details (you can find them in
> the archives), but there's some problem with the library functions
> supplied by later versions of Studio, and/or conflicts with our
> customized malloc, that cause the crash.
>
Yes, one issue is the library libc.lib (single threaded) which was
replaced by libcmt.lib (multithreaded). But there were other issues like
shadowing functions, for example sys_ctime and utime.
Also, maybe this is interesting for you Eli: bidi.c failed because MSVC
does not support the inline keyword for C files (only for C++ files).
__inline is the correct keyword for C files
(http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx) in MSVC.
It might not matter, since GCC compiles fine, but I though I'd mention
it anyway.
> What for? If we cannot build a working binary, why pollute the
> sources with more MSVC-specific patches?
>
The patch is actually for a bug in the existing MSVC makefile in
lib-src. I am pretty sure even older versions would not run with this,
since nmake fails right away:
=== modified file 'lib-src/makefile.w32-in'
--- lib-src/makefile.w32-in 2010-04-03 01:54:24 +0000
+++ lib-src/makefile.w32-in 2010-04-06 03:06:03 +0000
@@ -195,8 +195,8 @@
$(lispsource)term/pc-win.elc \
$(lispsource)x-dnd.elc \
$(lispsource)term/x-win.elc \
- ${lispsource}emacs-lisp/easymenu.elc \
- ${lispsource}term/ns-win.elc
+ $(lispsource)emacs-lisp/easymenu.elc \
+ $(lispsource)term/ns-win.elc
> Right. And since MinGW is available and in pretty good shape, we
> decided at the time not to invest any effort in MSVC.
>
I agree. MinGW works absolutely fine, so is there even any reason to
keep the MSVC stuff around? Was MSVC supported earlier than MinGW? I
surely don't want to start another discussion about backwards
compatibility and supporting older versions but a lot areas could be
cleaned up quite a bit if MSVC/nmake support was dropped in favor of
MinGW/gmake. The only reason for the zipdist batch file was nmake, which
turns out to be horribly limited compared to gmake.
Just my $0.02,
Christoph
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building Emacs with MSVC
2010-04-07 4:49 ` Christoph
@ 2010-04-07 7:22 ` Eli Zaretskii
2010-04-19 16:26 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07 7:22 UTC (permalink / raw)
To: Christoph; +Cc: emacs-devel
> Date: Tue, 06 Apr 2010 22:49:27 -0600
> From: Christoph <cschol2112@googlemail.com>
> CC: emacs-devel@gnu.org
>
> Also, maybe this is interesting for you Eli: bidi.c failed because MSVC
> does not support the inline keyword for C files (only for C++ files).
> __inline is the correct keyword for C files
> (http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx) in MSVC.
Right, I will look into this. Maybe I can just remove that attribute,
since the reordering engine is fast enough even in a non-optimized
build, and GCC will inline static functions anyway. Thanks for
pointing this out.
> The patch is actually for a bug in the existing MSVC makefile in
> lib-src. I am pretty sure even older versions would not run with this,
> since nmake fails right away:
>
> === modified file 'lib-src/makefile.w32-in'
> --- lib-src/makefile.w32-in 2010-04-03 01:54:24 +0000
> +++ lib-src/makefile.w32-in 2010-04-06 03:06:03 +0000
> @@ -195,8 +195,8 @@
> $(lispsource)term/pc-win.elc \
> $(lispsource)x-dnd.elc \
> $(lispsource)term/x-win.elc \
> - ${lispsource}emacs-lisp/easymenu.elc \
> - ${lispsource}term/ns-win.elc
> + $(lispsource)emacs-lisp/easymenu.elc \
> + $(lispsource)term/ns-win.elc
Yes, braces are a no-no in Windows makefiles. In any case, we do
still try to support Nmake, even though newer MSVC is not supported.
> > Right. And since MinGW is available and in pretty good shape, we
> > decided at the time not to invest any effort in MSVC.
> >
> I agree. MinGW works absolutely fine, so is there even any reason to
> keep the MSVC stuff around?
Probably not.
> Was MSVC supported earlier than MinGW? I
Yes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building Emacs with MSVC
2010-04-07 4:49 ` Christoph
2010-04-07 7:22 ` Eli Zaretskii
@ 2010-04-19 16:26 ` Eli Zaretskii
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-19 16:26 UTC (permalink / raw)
To: Christoph; +Cc: emacs-devel
> Date: Tue, 06 Apr 2010 22:49:27 -0600
> From: Christoph <cschol2112@googlemail.com>
> CC: emacs-devel@gnu.org
>
> Also, maybe this is interesting for you Eli: bidi.c failed because MSVC
> does not support the inline keyword for C files (only for C++ files).
> __inline is the correct keyword for C files
> (http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx) in MSVC.
>
> It might not matter, since GCC compiles fine, but I though I'd mention
> it anyway.
I fixed this by using `INLINE' rather than `inline', as we do
elsewhere in Emacs sources.
Thanks for pointing this out.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-19 16:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-07 2:37 Building Emacs with MSVC Christoph
2010-04-07 3:13 ` Eli Zaretskii
2010-04-07 4:49 ` Christoph
2010-04-07 7:22 ` Eli Zaretskii
2010-04-19 16:26 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.