RE: [Haskell] Dynamically loading wxhaskell?

I tried stripping /usr/lib/libwx_gtk-2.4.so.0.1.1 and
On Tue, Apr 13, 2004 at 03:53:31PM +0100, Simon Marlow wrote: libwxc-0.6.so, and
GHCi was still able to load the wx package successfully. In fact, libwx_gtk appeared to be already stripped.
What error messages do you get, specifically?
Here it is: ------------------------------- Loading package base ... linking ... done. Loading package haskell98 ... linking ... done. Loading package lang ... linking ... done. Loading package concurrent ... linking ... done. Loading package QuickCheck ... linking ... done. Loading package readline ... linking ... done. Loading package unix ... linking ... done. Loading package posix ... linking ... done. Loading package util ... linking ... done. Loading package data ... linking ... done. Loading package wxcore ... ghc-6.2.1: can't load .so/.DLL for: wxc-gtk2.4.2-0.7 (/usr/local/stow/wxhaskell//lib/libwxc-gtk2.4.2-0.7.so: undefined symbol: _ZN10wxGLCanvasC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxStringPi RK9wxPalette) ------------------------------
I suspect it's something funny with Debian's setup, and quite possibly a bug somewhere else in Debian.
That symbol looks suspiciously like it comes from the separate OpenGL parts of WX, which reside in a separate library (/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an explicit dependency on libwx_gtk_gl, because it was linked against it. Did you configure wxHaskell with --with-opengl? Cheers, Simon

On Wed, 14 Apr 2004 09:37:02 +0100, Simon Marlow
What error messages do you get, specifically?
Here it is: ------------------------------- Loading package data ... linking ... done. Loading package wxcore ... ghc-6.2.1: can't load .so/.DLL for: wxc-gtk2.4.2-0.7 (/usr/local/stow/wxhaskell//lib/libwxc-gtk2.4.2-0.7.so: undefined symbol: _ZN10wxGLCanvasC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxStringPi RK9wxPalette) ------------------------------
I suspect it's something funny with Debian's setup, and quite possibly a bug somewhere else in Debian.
That symbol looks suspiciously like it comes from the separate OpenGL parts of WX, which reside in a separate library
That is probably the problem. I did not see all messages of this thread, but one should indeed use "--with-opengl" on wxHaskell configure if wxWidgets was build with "--with-opengl". Unfortunately, due to wxWidgets changes, I can not automatically detect the need for this flag, but I promise to discuss it with the wxWidgets devs. fyi. it seems ghci can not handle stripped dynamic libraries on windows, but that may be due to the use of both a *.dll and an "import" library *.a. Funnily enough, ghc can handle link with those. (I haven't tested extensively though, and it might be related with the use of the upx packer). All the best, Daan.
(/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an explicit dependency on libwx_gtk_gl, because it was linked against it. Did you configure wxHaskell with --with-opengl?
Cheers, Simon
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&opÌk _______________________________________________ wxhaskell-users mailing list wxhaskell-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

That is probably the problem. I did not see all messages of this thread, but one should indeed use "--with-opengl" on wxHaskell configure if wxWidgets was build with "--with-opengl".
Unfortunately, due to wxWidgets changes, I can not automatically detect the need for this flag, but I promise to discuss it with the wxWidgets devs.
I think this has been discussed before: as far as I can see, the flag --with-opengl is always safe, and should therefore be the default. The call to "wx-config --gl-libs" returns the empty string if wxWidgets has not been built using GL. Best, Andres

On Wed, Apr 14, 2004 at 09:37:02AM +0100, Simon Marlow wrote: ...
That symbol looks suspiciously like it comes from the separate OpenGL parts of WX, which reside in a separate library (/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an explicit dependency on libwx_gtk_gl, because it was linked against it. Did you configure wxHaskell with --with-opengl?
No, and that fixed it, thanks! I was confused because I had gotten wx to work with ghc (not ghci) earlier. Peace, Dylan
participants (4)
-
Andres Loeh
-
Daan Leijen
-
dpt@exoskeleton.math.harvard.edu
-
Simon Marlow