From: Jean B. <jbo...@ac...> - 2006-02-04 18:46:43
|
Hello, Just to keep you updated: I finally succeeded to build wxHaskell =20 2.6.2 with GHC 6.4.1 on Mac OS 10.4.4. The "trick" was to add a static C++ standard lib to the libraries =20 used to build "master.o" (see the patch hereafter). As I'm not an Mac OS X expert, I don't know if this is valid but it =20 works (the linker now warns for duplicate symbols where before it was =20= complaining that the symbol was undefined). I compiled and ran the different sample applications. They all went =20 OK except the GLCanvas ones (I do not remember if I compiled wxMac =20 with OpenGL... I will check) and NotebookRight.hs that got an Haskell =20= typing error. Hope it helps, Jean *** wxhaskell-0.9.4/makefile Sun May 8 08:45:23 2005 --- wxhaskell-0.9.4-works/makefile Sat Feb 4 14:26:28 2006 *************** *** 715,721 **** # dynamic link library on macOSX: generates single .so file $(basename $(WXC-LIB)).dylib: $(WXC-OBJS) ! $(CXX) -r -keep_private_externs -nostdlib -o $(WXC-OUTDIR)/=20 master.o $^ $(WXC-LIBS) $(CXX) -dynamiclib -install_name $(SHARED-PREFIX)$(notdir =20 $@) -undefined suppress -flat_namespace -o $@ $(WXC-OUTDIR)/master.o $=20= (filter-out %.a,$(WXC-LIBS)) $(RM) -f $(WXC-OUTDIR)/master.o --- 715,721 ---- # dynamic link library on macOSX: generates single .so file $(basename $(WXC-LIB)).dylib: $(WXC-OBJS) ! $(CXX) -r -keep_private_externs -nostdlib -o $(WXC-OUTDIR)/=20 master.o $^ $(WXC-LIBS) /usr/lib/gcc/darwin/3.3/libstdc++.a $(CXX) -dynamiclib -install_name $(SHARED-PREFIX)$(notdir =20 $@) -undefined suppress -flat_namespace -o $@ $(WXC-OUTDIR)/master.o $=20= (filter-out %.a,$(WXC-LIBS)) $(RM) -f $(WXC-OUTDIR)/master.o Le 01-f=E9vr.-06 =E0 20:49, Eric Kow a =E9crit : > Hi, > > Yes, I have encountered this before, and it was very annoying. > See: http://bugzilla.opendarwin.org/show_bug.cgi?id=3D5006 > > The thing that fixed it for me is --disable-shared with wxWidgets, =20 > which is odd because you seem to have configured with that as well. > > Maybe you should make sure you don't still have the shared version =20 > around. For example, you could do wx-config --libs > and wxconfig --libs --static to see if they are different. If you =20 > want to keep both versions, maybe something like (wxhaskell) ./=20 > configure --wx-config=3D"wx-config --static" would help. > > Glad to know I'm not alone there. Luckily, we've also got Gregory =20 > Wright, the guy who takes care of haskell stuff on DarwinPorts, on =20 > our side :-) > > On 1 f=E9vr. 06, at 19:37, Jean Boucquey wrote: >> I'm trying to build wxHaskell 0.9.4 with wxMac 2.6.1 (tried with =20 >> 2.6.2) and GHC 6.4.1 on MacOS 10.4.4 (gcc 4.0.0). >> wxWidget is configured with --disable-shared and --disable-unicode. >> >> Compilation of the "wxc" layer goes fine but the linking of libwxc-=20= >> mac2.6.1-0.9.4.dylib fails complaining about "weak definitions": >> ld: out/wxc/master.o undefined symbol 36218 (__ZdaPv) can't be a =20 >> weak definition >> >> Before I dig into the "dirty" details, I would like to know if I =20 >> missed anything and/or if anybody encourtered this before (and =20 >> maybe knows the solution...). > > > --=20 > Eric Kow http://www.loria.fr/~kow > PGP Key ID: 08AC04F9 Merci de corriger mon fran=E7ais. > > |