
Hi I had wxHaskell working but since I installed the gtk2hs, which updated some packages I’m having some trouble. I’ve installed wxWidgets and wxHaskell again following the instructions in it’s webpage. When I compile a simple wxHaskell program* I get this error: dyld: Symbol not found: _wxTheAssertHandler Referenced from: /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Expected in: /usr/local/lib/libwx_baseu-2.9.3.0.0.dylib in /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Trace/BPT trap: 5 How can I fix this ? thank you, Miguel Negrão I’m on OSX 10.7.3 haskell platform with ghc 7.0.4 brew info wxmac wxmac 2.8.12 http://www.wxwidgets.org /usr/local/Cellar/wxmac/2.9.3.1 (764 files, 26M) * Installed with: --devel https://github.com/mxcl/homebrew/commits/master/Library/Formula/wxmac.rb cabal info wx * wx (library) Synopsis: wxHaskell Versions available: 0.11.1.0, 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6, 0.13.2, 0.13.2.1, 0.90, 0.90.0.1 (and 10 others) Versions installed: 0.13.1, 0.90 Program : module Main where import Graphics.UI.WX main :: IO() main = start gui gui :: IO() gui = do f <- frame [text := "window"] txt <- staticText f [text:= "test 123"] but <- button f [text:="button", on command:=set txt [text:="clicked"]] check <- checkBox f [text:="test"] rbox <- radioBox f Vertical ["hello","wold"] [] set f [layout:= boxed "all" (row 0 [ column 0 [widget check, widget rbox], boxed "second2" $ column 0 [widget txt, widget but] ]) ] return ()

Miguel Negrao wrote:
I had wxHaskell working but since I installed the gtk2hs, which updated some packages I’m having some trouble. I’ve installed wxWidgets and wxHaskell again following the instructions in it’s webpage. When I compile a simple wxHaskell program* I get this error:
dyld: Symbol not found: _wxTheAssertHandler Referenced from: /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Expected in: /usr/local/lib/libwx_baseu-2.9.3.0.0.dylib in /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Trace/BPT trap: 5
How can I fix this ?
thank you, Miguel Negrão
I’m on OSX 10.7.3 haskell platform with ghc 7.0.4 brew info wxmac wxmac 2.8.12 http://www.wxwidgets.org /usr/local/Cellar/wxmac/2.9.3.1 (764 files, 26M) * Installed with: --devel https://github.com/mxcl/homebrew/commits/master/Library/Formula/wxmac.rb cabal info wx * wx (library) Synopsis: wxHaskell Versions available: 0.11.1.0, 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6, 0.13.2, 0.13.2.1, 0.90, 0.90.0.1 (and 10 others) Versions installed: 0.13.1, 0.90
I don't really know what's going on, but there seem to be two potential issues: * Your wx package has version 0.90 while your wxc package has version 0.90.0.3. I recommend to use the latest patch level releases of all three: wx, wxcore and wxc. * Your wxWidgets (wxmax) version is reported both as 2.8.12 and 2.9.3.1 Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Hi Heinrich, Thanks for helping out. Seems I’m really unlucky with cabal and wxHaskell... A 28/05/2012, às 12:57, Heinrich Apfelmus escreveu:
Miguel Negrao wrote:
I had wxHaskell working but since I installed the gtk2hs, which updated some packages I’m having some trouble. I’ve installed wxWidgets and wxHaskell again following the instructions in it’s webpage. When I compile a simple wxHaskell program* I get this error: dyld: Symbol not found: _wxTheAssertHandler Referenced from: /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Expected in: /usr/local/lib/libwx_baseu-2.9.3.0.0.dylib in /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Trace/BPT trap: 5 How can I fix this ? thank you, Miguel Negrão I’m on OSX 10.7.3 haskell platform with ghc 7.0.4 brew info wxmac wxmac 2.8.12 http://www.wxwidgets.org /usr/local/Cellar/wxmac/2.9.3.1 (764 files, 26M) * Installed with: --devel https://github.com/mxcl/homebrew/commits/master/Library/Formula/wxmac.rb cabal info wx * wx (library) Synopsis: wxHaskell Versions available: 0.11.1.0, 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6, 0.13.2, 0.13.2.1, 0.90, 0.90.0.1 (and 10 others) Versions installed: 0.13.1, 0.90
I don't really know what's going on, but there seem to be two potential issues:
* Your wx package has version 0.90 while your wxc package has version 0.90.0.3. I recommend to use the latest patch level releases of all three: wx, wxcore and wxc.
When I try to install wx after updating cabal it is failing on version 0.90.0.1: miguelnegrao@Mac-Miguel:~$ cabal install wx Resolving dependencies... Configuring wx-0.90.0.1... Preprocessing library wx-0.90.0.1... Building wx-0.90.0.1... [ 1 of 16] Compiling Graphics.UI.WX.Types ( src/Graphics/UI/WX/Types.hs, dist/build/Graphics/UI/WX/Types.o ) [ 2 of 16] Compiling Graphics.UI.WX.Attributes ( src/Graphics/UI/WX/Attributes.hs, dist/build/Graphics/UI/WX/Attributes.o ) [ 3 of 16] Compiling Graphics.UI.WX.Layout ( src/Graphics/UI/WX/Layout.hs, dist/build/Graphics/UI/WX/Layout.o ) [ 4 of 16] Compiling Graphics.UI.WX.Classes ( src/Graphics/UI/WX/Classes.hs, dist/build/Graphics/UI/WX/Classes.o ) [ 5 of 16] Compiling Graphics.UI.WX.Media ( src/Graphics/UI/WX/Media.hs, dist/build/Graphics/UI/WX/Media.o ) [ 6 of 16] Compiling Graphics.UI.WX.Events ( src/Graphics/UI/WX/Events.hs, dist/build/Graphics/UI/WX/Events.o ) [ 7 of 16] Compiling Graphics.UI.WX.Window ( src/Graphics/UI/WX/Window.hs, dist/build/Graphics/UI/WX/Window.o ) src/Graphics/UI/WX/Window.hs:134:52: Not in scope: `textCtrlChangeValue' cabal: Error: some packages failed to install: wx-0.90.0.1 failed during the building phase. The exception was: ExitFailure 1 Does this mean that the package that was pushed to cabal has an actual error ? How do I "use the latest patch level releases” of the packages ?
* Your wxWidgets (wxmax) version is reported both as 2.8.12 and 2.9.3.1
right. But that is because the current stable version is 2.8.12 and to use the latest version in homebrew I have to use the switch --devel which will install 2.9.3.1. I followed the instructions here :http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X best, Miguel

Miguel Negrao wrote:
When I try to install wx after updating cabal it is failing on version 0.90..0.1:
miguelnegrao@Mac-Miguel:~$ cabal install wx Resolving dependencies... Configuring wx-0.90.0.1... Preprocessing library wx-0.90.0.1... Building wx-0.90.0.1... [ 1 of 16] Compiling Graphics.UI.WX.Types ( src/Graphics/UI/WX/Types.hs, dist/build/Graphics/UI/WX/Types.o ) [ 2 of 16] Compiling Graphics.UI.WX.Attributes ( src/Graphics/UI/WX/Attributes.hs, dist/build/Graphics/UI/WX/Attributes.o ) [ 3 of 16] Compiling Graphics.UI.WX.Layout ( src/Graphics/UI/WX/Layout.hs, dist/build/Graphics/UI/WX/Layout.o ) [ 4 of 16] Compiling Graphics.UI.WX.Classes ( src/Graphics/UI/WX/Classes.hs, dist/build/Graphics/UI/WX/Classes.o ) [ 5 of 16] Compiling Graphics.UI.WX.Media ( src/Graphics/UI/WX/Media.hs, dist/build/Graphics/UI/WX/Media.o ) [ 6 of 16] Compiling Graphics.UI.WX.Events ( src/Graphics/UI/WX/Events.hs, dist/build/Graphics/UI/WX/Events.o ) [ 7 of 16] Compiling Graphics.UI.WX.Window ( src/Graphics/UI/WX/Window.hs, dist/build/Graphics/UI/WX/Window.o )
src/Graphics/UI/WX/Window.hs:134:52: Not in scope: `textCtrlChangeValue' cabal: Error: some packages failed to install: wx-0.90.0.1 failed during the building phase. The exception was: ExitFailure 1
Does this mean that the package that was pushed to cabal has an actual error ? How do I "use the latest patch level releases” of the packages ?
Jeremy forgot to narrow the version dependencies of the family of wx packages, not every combination that cabal accepts will actually work. The effect is that you have to reinstall the packages in the right order and with the right version number to get it to work. The following should do the trick cabal install wxdirect-0.90.0.1 cabal install wxc-0.90.0.3 cabal install wxcore-0.90.0.1 cabal install wx-0.90.0.1 The last number in the version number indicates bug fixes, that's why I refer to it as "patch-level".
Thanks for helping out. Seems I’m really unlucky with cabal and wxHaskell..
Not only you, I am afraid. In fact, I am tempted to purchase a lucky charm for cabal issues. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

A 28/05/2012, às 19:44, Heinrich Apfelmus escreveu:
Miguel Negrao wrote:
When I try to install wx after updating cabal it is failing on version 0.90..0.1: miguelnegrao@Mac-Miguel:~$ cabal install wx Resolving dependencies... Configuring wx-0.90.0.1... Preprocessing library wx-0.90.0.1... Building wx-0.90.0.1... [ 1 of 16] Compiling Graphics.UI.WX.Types ( src/Graphics/UI/WX/Types.hs, dist/build/Graphics/UI/WX/Types.o ) [ 2 of 16] Compiling Graphics.UI.WX.Attributes ( src/Graphics/UI/WX/Attributes.hs, dist/build/Graphics/UI/WX/Attributes.o ) [ 3 of 16] Compiling Graphics.UI.WX.Layout ( src/Graphics/UI/WX/Layout.hs, dist/build/Graphics/UI/WX/Layout.o ) [ 4 of 16] Compiling Graphics.UI.WX.Classes ( src/Graphics/UI/WX/Classes.hs, dist/build/Graphics/UI/WX/Classes.o ) [ 5 of 16] Compiling Graphics.UI.WX.Media ( src/Graphics/UI/WX/Media.hs, dist/build/Graphics/UI/WX/Media.o ) [ 6 of 16] Compiling Graphics.UI.WX.Events ( src/Graphics/UI/WX/Events.hs, dist/build/Graphics/UI/WX/Events.o ) [ 7 of 16] Compiling Graphics.UI.WX.Window ( src/Graphics/UI/WX/Window.hs, dist/build/Graphics/UI/WX/Window.o ) src/Graphics/UI/WX/Window.hs:134:52: Not in scope: `textCtrlChangeValue' cabal: Error: some packages failed to install: wx-0.90.0.1 failed during the building phase. The exception was: ExitFailure 1 Does this mean that the package that was pushed to cabal has an actual error ? How do I "use the latest patch level releases” of the packages ?
Jeremy forgot to narrow the version dependencies of the family of wx packages, not every combination that cabal accepts will actually work. The effect is that you have to reinstall the packages in the right order and with the right version number to get it to work. The following should do the trick
cabal install wxdirect-0.90.0.1 cabal install wxc-0.90.0.3 cabal install wxcore-0.90.0.1 cabal install wx-0.90.0.1
The last number in the version number indicates bug fixes, that's why I refer to it as "patch-level”.
Ah, ok. I ran all those commands, but with --reinstall since some were already installed, in that order. Everything installed correctly. Now when I try to compile a hello world program * I get : ghc test.hs [1 of 1] Compiling Main ( test.hs, test.o ) Linking test ... ld: warning: ignoring file /System/Library/Frameworks//QuickTime.framework/QuickTime, file was built for unsupported file format which is not the architecture being linked (x86_64) ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame Undefined symbols for architecture x86_64: "_wxListItemAttr_CreateEx", referenced from: _sUn6_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _sUng_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_Create", referenced from: _wxcorezm0zi90zi0zi1_GraphicsziUIziWXCoreziWxcClassesAL_listItemAttrCreate1_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_CreateWithCb", referenced from: _sW0i_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _sW0E_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_Create", referenced from: _sWbY_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _sWcg_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_SetTextColour", referenced from: _s15xV_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_SetFont", referenced from: _s15BK_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s15BO_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_SetBackgroundColour", referenced from: _s15Gu_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_HasTextColour", referenced from: _s1BbT_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2Jq5_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_HasFont", referenced from: _s1Bdd_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2JnT_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_HasBackgroundColour", referenced from: _s1Bex_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2JlH_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_GetTextColor", referenced from: _s1BfQ_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2JjR_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_GetFont", referenced from: _s1Bh9_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2Ji1_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListItemAttr_GetBackgroundColor", referenced from: _s1Bis_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2Jgb_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_SetOnGetItemTextCallback", referenced from: _s1BB6_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2IKc_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_SetOnGetItemImageCallback", referenced from: _s1BCC_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2IIo_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_SetOnGetItemColumnImageCallback", referenced from: _s1BE8_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2IGA_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrlVirtual_SetOnGetItemAttrCallback", referenced from: _s1BFE_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2IEM_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrl_RefreshItem", referenced from: _s1C5g_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2HVB_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrl_IsVirtual", referenced from: _s1C6N_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2HTp_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) "_wxListCtrl_GetItemFont", referenced from: _s1Cz0_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) _s2H2z_info in libHSwxcore-0.90.0.1.a(WxcClassesAL.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status *module Main where import Graphics.UI.WX main :: IO () main = start hello hello :: IO () hello = do f <- frame [text := "Hello!"] quit <- button f [text := "Quit", on command := close f] set f [layout := widget quit] best, Miguel

On Mon, May 28, 2012 at 3:20 PM, Miguel Negrao < miguel.negrao-lists@friendlyvirus.org> wrote:
Now when I try to compile a hello world program * I get :
ghc test.hs
If this is not ghc 7.4.1, you need --make there for it to follow and link the required system libraries.
ld: warning: ignoring file /System/Library/Frameworks//QuickTime.framework/QuickTime, file was built for unsupported file format which is not the architecture being linked (x86_64)
And this sounds like you have a version of the C wx libraries that is not for 64-bit architectures. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

A 28/05/2012, às 20:28, Brandon Allbery escreveu:
On Mon, May 28, 2012 at 3:20 PM, Miguel Negrao < miguel.negrao-lists@friendlyvirus.org> wrote:
Now when I try to compile a hello world program * I get :
ghc test.hs
If this is not ghc 7.4.1, you need --make there for it to follow and link the required system libraries.
ld: warning: ignoring file /System/Library/Frameworks//QuickTime.framework/QuickTime, file was built for unsupported file format which is not the architecture being linked (x86_64)
And this sounds like you have a version of the C wx libraries that is not for 64-bit architectures.
Ok, can’t seem to make it work with ghc, but it is working from inside EclipseFP, which means that wxHaskell should be correctly installed now. Good enough for me. Thanks for the help, Miguel
participants (3)
-
Brandon Allbery
-
Heinrich Apfelmus
-
Miguel Negrao