This is the mail archive of the
mailing list for the Cygwin project.
Re: Why only 1 cygwin1.dll?
- From: ericblake at comcast dot net (Eric Blake)
- To: Jeremy Wilkins <jeb at jdwilkins dot co dot uk>, cygwin at cygwin dot com
- Date: Sat, 25 Mar 2006 17:19:24 +0000
- Subject: Re: Why only 1 cygwin1.dll?
> Why can there be only 1 cygwin1.dll in the filesystem? Is this a
> limitation of the dll or is it just a problem with applications
> finding the wrong version of the cygwin1.dll when there are several?
It is an intentional design decision of cygwin. In order to properly
emulate POSIX semantics in a relatively efficient manner, the .dll
opens a shared memory region when it is loaded. If there are
multiple versions of different copies of the .dll trying to play with
this shared memory region, you are practically guaranteed problems,
so the .dll detects if the magic number of the shared region matches
its expectations and forcefully exits before corrupting the other .dll's
> Or is it just that certain cygwin registry keys get initialised wrong
> if its not installed correctly?
The only use of the registry by cygwin is the mount table, and
even that might change in the future. Don't go blaming the
registry for this issue.
> Does the cygwin1.dll have to be in /usr/bin or would it work in system32?
Technically, as long as there is only one cygwin1.dll in the Windows
PATH (including the implicit search of the current directory before
%PATH%), it doesn't matter where it lives. But you are playing with fire
if you put it anywhere besides where setup.exe puts it, namely, /usr/bin.
You are free to remount /usr/bin to live in some other location, if that
helps, but this mailing list will NOT give any support for installations
that put cygwin1.dll in non-standard locations other than to say
delete your duplicate copies. We even have an acronym for it:
> I'm sure this must've been asked before but I couldn't find it in my
> search of the archives and users guide?
This topic came up just last month, although you are right
that without knowing good search terms it might not be
the easiest to find (I did a google for
"site:cygwin.com mismatched dll"):
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html