This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Xemacs broken after postgresql upgrade


Brian Dessent wrote:
René Berber wrote:


A better fix is to link cygpq.dll to pq.dll:

# ln /usr/bin/cygpq.dll /usr/bin/pq.dll

^^^^ that's a hardlink command, Brian -- which devolves to a copy on FAT32.


That's not a great habit to get into.  It will only work if the program
uses Cygwin methods (e.g. dlopen()) to dynamically load the dll at
runtime.  It will absolutely not work for a .exe that was linked to a
.dll in the normal way, or for a program that uses LoadLibrary() at
runtime, because the windows dynamic loader has no idea what a symlink
is and you will get the "Can't locate DLL" popup.

It's a temporary workaround and won't always work, especially if the API has changed between two different versions of the DLL. But, given the hardlink not softlink, if XEmacs still fails it won't be because the dynamic loader can't find the target.


However, in a larger sense, THIS ruckus is exactly why public utility DLLs should not be packaged with the executables, and instead packaged in their own 'libfooN' package. So that when you upgrade the main application, you get a new DLL but don't loose the old one.

Now, it is a question as to whether the postgresql DLL is actually a public utility DLL, regardless of XEmacs' use of it. IF the on-disk format of the database changed between pq-7 and pq-8, you really wouldn't want to a mixture of apps on your system, some using pq-7 and some using pq-8, to access your database. The implication is that the pq DLL is NOT a public utility, and the "interface" to the pq database that XEmacs and other clients should use is the postgres APP, not the postgres DLL. If that's the case, then (a) it's okay for Jason to package postgres the way he does, and even to include the (private) DLL in the same package with the all, and (b) XEmacs was too ambitious to attempt to use the sharedlib interface, and should have instead used the app.

But I don't know enough about pq (or XEmacs) to definitively answer these questions.

--
Chuck

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]