From: Grzegorz J. <ja...@ac...> - 2004-07-14 15:21:30
|
Grigorenko Dmitriy wrote: > Hello > > I checked which library is used by occ. > > H:\cygwin\home\Dima\opencxx-2.7\src>cygcheck occ > Found: .\occ.exe > occ.exe > h:\cygwin\bin\cygltdl-3.dll > h:\cygwin\bin\cygwin1.dll > H:\WINDOWS\System32\ADVAPI32.DLL > H:\WINDOWS\System32\ntdll.dll > H:\WINDOWS\System32\KERNEL32.dll > H:\WINDOWS\System32\RPCRT4.dll > Yes, this is exactly the information that was needed. As you see when occ.exe is loaded the dynamic linker will pick the global cygltdl.dll; > It couses sigsegv when cygltdl-3.dll builds from opencxx/libltdl. > In case of native cygltdl-3.dll using it`s ok. I suppose that the version of ltdl in opencxx/libltdl is different from your system-wide version. The problem is that ld sets function offsets in occ.exe according to the layout of opencxx/cygltdl-3.dll, but at load-time /cygwin/bin/cygltdl-3.dll is linked dynamically and there is a mismatch between offsets and entries in /cygwin/bin/cygltdl-3.dll > Why does it make libltdl instead of using the native one? I had problems on Compile Farm --- the version of libtool installed there system-wide was too old and crashed with libgc. So I decided to force occ to use the libltdl bundled with OpenC++. > How can it be fixed? (1) On Linux you can tell the dynamic linker where to look for shared libraries by setting the environment variable LD_LIBRARY_PATH. There must be a way to tell this to cygwin dynamic linker also. This will instruct dynamic linker to pick opencxx/libltdl/cygltdl-3.dll, not the system-wide one. (2) Another solution would be to make OpenC++ by default use system-wide cygltdl.dll on Cygwin, as anyway there is no Cygwin on Compile Farm. This requires modifying configure.in/Makefile.am, so that it does not use libltdl if it is installed. The key point that needs to be changed is --enable-ltdl-install in Makefile.am, because it forces installation of libltdl.so/cygltdl-3.dll even if it is already present. (3) Ultimate solution, which I think is the way to go in the long term, would be to - remove libltdl from OpenC++ at all - add --with-libltdl=DIR to ./configure Then OpenC++ will use system-wide libltdl by default. On Compile Farm the tests build would be configured with ./configure --with-libltdl=PATH_TO_RECENT_VERSION_OF_LIBLTDL. If you could help with implementing (2) or (3), please do. > Thank you > > P.S. Your last letter was only for me, not for the hole mail list. Is it > right? I am sorry, I make this mistake recently. I switched from Pine to Mozilla and they handle replies differently (when replying in Pine you have an option to reply to all, but in Mozilla it by default replies only to main recipient). As the thread came from the list, I intended to reply to the list. Sorry again, I am forwarding these e-mails. BR Grzegorz |