all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: emacs-devel@gnu.org, drobinow@gmail.com
Subject: Re: Compilation problems with latest MSVC
Date: Sun, 31 Dec 2006 00:13:18 +0000	[thread overview]
Message-ID: <4597009E.4040809@gnu.org> (raw)
In-Reply-To: <uodpl31s8.fsf@gnu.org>

Eli Zaretskii wrote:
>> Date: Fri, 29 Dec 2006 23:43:17 +0000
>> From: Jason Rumney <jasonr@gnu.org>
>> Cc: drobinow@gmail.com, emacs-devel@gnu.org
>>
>> The crash is happening within the initialization code before any Emacs 
>> code gets run (__tmainCRTStartup). This code is calling _free_internal, 
>> which we are redefining in gmalloc.c.
>>     
>
> That rings a bell: during linking, the linker complained about
> multiple definitions of some memory-related functions, I think calloc
> and realloc.  Did you have those warnings in your build?
>   
Yes, they appear as errors if you link against libcmt.lib, unless you 
include -force:multiple in LINK_FLAGS. I suspect that the single 
threaded library is required for Emacs, as the multithreaded library 
will be allocating heap memory for each thread behind your back to avoid 
problems with global variables, so there will always be a conflict 
between Emacs's and the C library's malloc routines.

I also tried linking against msvcrt.lib (the dynamic linked version of 
libcmt). It doesn't complain about the multiple definitions, but there 
are more unresolved symbols. I also recall Andrew Innes trying in the 
past to get Emacs working with the dynamic linked c runtime, I'm not 
sure if he succeeded in the end by ensuring that Emacs's memory 
allocations do not intertwine with the system library's or whether he 
gave up.

  reply	other threads:[~2006-12-31  0:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-24 11:25 Compilation problems with latest MSVC Eli Zaretskii
2006-12-24 11:35 ` Lennart Borgman
2006-12-29  2:40 ` David Robinow
2006-12-29  3:01   ` David Robinow
2006-12-29 11:40     ` Eli Zaretskii
2006-12-29 16:25       ` Jason Rumney
2006-12-29 16:52         ` Eli Zaretskii
2006-12-29 23:05           ` Jason Rumney
2006-12-30 14:15             ` Eli Zaretskii
2006-12-29 23:43           ` Jason Rumney
2006-12-30 14:18             ` Eli Zaretskii
2006-12-31  0:13               ` Jason Rumney [this message]
2006-12-31  4:24                 ` Eli Zaretskii
2006-12-29 16:29   ` Jason Rumney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4597009E.4040809@gnu.org \
    --to=jasonr@gnu.org \
    --cc=drobinow@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.