X-Spam-Check-By: sourceware.org From: ericblake AT comcast DOT net (Eric Blake) To: Jeremy Wilkins , cygwin AT cygwin DOT com Subject: Re: Why only 1 cygwin1.dll? Date: Sat, 25 Mar 2006 17:19:24 +0000 Message-Id: <032520061719.9189.44257B9C0003FD3F000023E522058891160A050E040D0C079D0A@comcast.net> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > 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 memory. > 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: http://cygwin.com/acronyms/#3PP > > 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"): http://www.cygwin.com/ml/cygwin/2006-02/msg00085.html -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/