RE: [Haskell] Dynamically loading wxhaskell?

On Thu, Apr 01, 2004 at 10:00:23AM +0100, Simon Marlow wrote:
Has anyone succeeded in getting wxhaskell to work under
ghci on Linux?
On my system, I get an error message
Loading package unix ... ghc-6.2: can't load .so/.DLL for: dl (libdl.so: cannot open shared object file: No such file or directory)
This sounds like it has nothing to do with wxhaskell, but is a GHC problem. Any pointers?
Is libdl.so in the usual place? (/usr/lib on my system)
Yes.
(FYI, this is a Debian unstable system.)
Everything works with GHC, by the way.
Very strange. Is /usr/lib/libdl.so perhaps a symlink to a library that doesn't exist? That could happen if an upgrade had gone wrong, perhaps. Cheers, Simon

On Fri, Apr 02, 2004 at 01:59:08PM +0100, Simon Marlow wrote:
Very strange. Is /usr/lib/libdl.so perhaps a symlink to a library that doesn't exist? That could happen if an upgrade had gone wrong, perhaps.
Thanks, it was a dangling symlink due to my filesystem layout. Sorry for the stupidity. But it still won't run, because (apparently) ghci won't work with stripped .so files, and Debian policy is to strip them. From the Debian policy manual, section 10.2: All installed shared libraries should be stripped with strip --strip-unneeded <your-lib> (The option `--strip-unneeded' makes `strip' remove only the symbols which aren't needed for relocation processing.) Shared libraries can function perfectly well when stripped, since the symbols for dynamic linking are in a separate part of the ELF object file.[1] [1] You might also want to use the options `--remove-section=.comment' and `--remove-section=.note' on both shared libraries and executables, and `--strip-debug' on static libraries. Any chance of fixing this in ghci, or do I have to keep an extra copy of wxwidgets installed? What tool does ghci use for its dynamic loading? Peace, Dylan
participants (2)
-
dpt@lotus.bostoncoop.net
-
Simon Marlow