[Haskell-beginners] problems with wxHaskell installation

Miguel Negrao miguel.negrao-lists at friendlyvirus.org
Mon May 28 21:20:21 CEST 2012


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 at 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




More information about the Beginners mailing list