From: Malcolm W. <Mal...@cs...> - 2008-02-07 15:03:23
|
I'm attempting to install wxHaskell from the darcs repo at darcs.haskell.org, under ghc-6.6. on MacOS 10.4.11, with wxMac-2.6.4. The compilation of wxHaskell seems to proceed OK until the link stage: g++ -r -keep_private_externs -nostdlib -o out/wxc/master.o .... which failed because there is no -lstdc++-static on my machine. I found the place in the makefile to replace -lstdc++-static with the dynamic -lstdc++, and compilation proceeds further, but not much: g++ -dynamiclib -install_name /usr/local/wxhaskell/lib/libwxc-mac2.6.4-0.10.1.dylib -undefined suppress -flat_namespace -o out/wxc/libwxc-mac2.6.4-0.10.1.dylib out/wxc/master.o -lwx_macu_gl-2.6 -L/usr/local/lib -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System -lwx_macu_media-2.6 -lwx_macu-2.6 ld: out/wxc/master.o undefined symbol 12387 (__ZTI10wxListBase) can't be a weak definition /usr/bin/libtool: internal link edit command failed The offending symbol __ZTI10wxListBase looks like it might be a z-encoded symbol from Haskell-land, but I'm not sure how to proceed. Regards, Malcolm |
From: Eric K. <eri...@gm...> - 2008-02-07 16:33:29
|
Hi Malcolm, On 07/02/2008, Malcolm Wallace <Mal...@cs...> wrote: > I'm attempting to install wxHaskell from the darcs repo at > darcs.haskell.org, under ghc-6.6. on MacOS 10.4.11, with wxMac-2.6.4. > > The compilation of wxHaskell seems to proceed OK until the link stage: > > g++ -r -keep_private_externs -nostdlib -o out/wxc/master.o .... Does obliterating this patch help at all? (OS X) Check architecture to use intermediate step of compiling master.o or not. Cheers, -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9 |
From: Malcolm W. <Mal...@cs...> - 2008-02-07 17:28:26
|
"Eric Kow" <eri...@gm...> wrote: > > The compilation of wxHaskell seems to proceed OK until the link > > stage: > > > > g++ -r -keep_private_externs -nostdlib -o out/wxc/master.o .... > > Does obliterating this patch help at all? > (OS X) Check architecture to use intermediate step of compiling > master.o or not. Yes! Removing that patch allowed the build to complete without errors. I can even build some of the demo programs in the sample/contrib directory. But unfortunately, they all seem to crash with the following dynamic link error: dyld: Symbol not found: __ZN8wxThread11TestDestroyEv Referenced from: /usr/local/wxhaskell/lib/libwxc-mac2.6.4-0.10.1.dylib Expected in: flat namespace Trace/BPT trap Could this be anything to do with me building the underlying wxMac library with --disable-shared (which was a suggestion I found on the mailing list from a couple of years ago, originally to fix a similar problem)? Regards, Malcolm |
From: Malcolm W. <Mal...@cs...> - 2008-02-08 14:17:14
|
I wrote: > Could this be anything to do with me building the underlying wxMac > library with --disable-shared The answer is yes. A correct build on MacOS 10.4.11 with ghc-6.6 requires that wxWidgets is configured with --enable-shared, and that this patch: (OS X) Check architecture to use intermediate step of compiling master.o or not. be darcs unpulled from your local repo. (Incidentally, unpulling requires first that one must darcs unpull a tag, then re-run darcs, in order to find this patch.) With these tweaks, wxHaskell builds, compiles, and runs the demo programs. There is still one tiny problem, specifically and only with the demo program: samples/contrib/GLCanvas.hs, which continues to give a dynamic linking error. I tracked this down to the shared library /usr/local/wxhaskell/lib/libwxc-mac2.6.4-0.10.1.dylib which does not (but _ought_ to) have a dependency on /usr/local/lib/libwx_macu_gl-2.6.0.4.0.dylib for the OpenGL stuff to be found. I simply added the latter into the .cabal file for wxcore (under "extra-libraries"), but there is probably a better way of fixing it. Regards, Malcolm |
From: Eric K. <eri...@gm...> - 2008-02-08 14:59:19
|
Hi Malcolm, > There is still one tiny problem, specifically and only with the demo > program: samples/contrib/GLCanvas.hs, which continues to give a dynamic > linking error. I tracked this down to the shared library Did you also put in '--with-opengl' into your wxhaskell configure options? Best, -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9 |
From: Eric Y. K. <eri...@gm...> - 2008-02-15 23:38:30
|
Hi Malcolm, On Fri, Feb 08, 2008 at 14:11:28 +0000, Malcolm Wallace wrote: > (OS X) Check architecture to use intermediate step of compiling > master.o or not. By the way, are you on PowerPC or Intel? (i guess the former?) > There is still one tiny problem, specifically and only with the demo > program: samples/contrib/GLCanvas.hs, which continues to give a dynamic > linking error. I tracked this down to the shared library > > /usr/local/wxhaskell/lib/libwxc-mac2.6.4-0.10.1.dylib > > which does not (but _ought_ to) have a dependency on > > /usr/local/lib/libwx_macu_gl-2.6.0.4.0.dylib Can you report the contents of config/config.mk (specifically WXWIN-LIBS)? Also, what does /usr/local/bin/wx-config --libs std media --gl-libs say? Thanks! -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9 |