David Place | 10 Mar 2010 21:41

Installing wx with cabal using Haskell Platform on Mac OSX.

Hi:

I have just installed the Haskell Platform 2009.2.0.2 on Mac OSX 10.6.2.  When I try to install wx I get the
following error which I do not understand.
Can anyone give me a hint?

$ cabal install wx
Resolving dependencies...
cabal: cannot configure containers-0.3.0.0. It requires base >=4.2 && <6
For the dependency on base >=4.2 && <6 there are these packages: base-4.2.0.0.
However none of them are available.
base-4.2.0.0 was excluded because of the top level dependency base -any

Here are my packages:

$ ghc-pkg list
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/./package.conf:
    Cabal-1.6.0.3, GLUT-2.1.1.2, HTTP-4000.0.6, HUnit-1.2.0.3,
    OpenGL-2.2.1.1, QuickCheck-1.2.0.0, array-0.2.0.0, base-3.0.3.1,
    base-4.1.0.0, bytestring-0.9.1.4, cgi-3001.1.7.1,
    containers-0.2.0.1, directory-1.0.0.3, (dph-base-0.3),
    (dph-par-0.3), (dph-prim-interface-0.3), (dph-prim-par-0.3),
    (dph-prim-seq-0.3), (dph-seq-0.3), editline-0.2.1.0,
    extensible-exceptions-0.1.1.0, fgl-5.4.2.2, filepath-1.1.0.2,
    (ghc-6.10.4), ghc-prim-0.1.0.0, haddock-2.4.2, haskell-src-1.0.1.3,
    haskell98-1.0.1.0, hpc-0.5.0.3, html-1.0.1.2, integer-0.1.0.1,
    mtl-1.1.0.2, network-2.2.1.2, network-2.2.1.4, old-locale-1.0.0.1,
    old-time-1.0.0.2, packedstring-0.1.0.1, parallel-1.1.0.1,
    parsec-2.1.0.1, pretty-1.0.1.0, process-1.0.1.1, random-1.0.0.1,
    regex-base-0.72.0.2, regex-compat-0.71.0.1, regex-posix-0.72.0.3,
(Continue reading)

David Place | 11 Mar 2010 19:37

Re: Installing wx with cabal using Haskell Platform on Mac OSX.


On Mar 10, 2010, at 3:41 PM, David Place wrote:

> I have just installed the Haskell Platform 2009.2.0.2 on Mac OSX 10.6.2.  When I try to install wx I get the
following error which I do not understand.
> Can anyone give me a hint?

With the kind help of several people on haskell-cafe, I have been able to get a version of wxHaskell to
install.  I appear to be missing "macosx-app".  It is not in /usr/local/wxhaskell/bin/macosx-app or
~/.cabal/bin.  I have tried the EnableGUI module, but get the error:

> $ ghci -framework Carbon try.hs
> GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer ... linking ... done.
> Loading package base ... linking ... done.
> Loading object (framework) Carbon ... done
> final link ... done
> [2 of 2] Compiling Main             ( try.hs, interpreted )
> Ok, modules loaded: Main, EnableGUI.
> *Main> enableGUI
> *Main> main
> Loading package syb ... linking ... done.
> Loading package array-0.2.0.0 ... linking ... done.
> Loading package containers-0.2.0.1 ... linking ... done.
> Loading package bytestring-0.9.1.4 ... linking ... done.
> Loading package old-locale-1.0.0.1 ... linking ... done.
> Loading package old-time-1.0.0.2 ... linking ... done.
> Loading package filepath-1.1.0.2 ... linking ... done.
> Loading package unix-2.3.2.0 ... linking ... done.
(Continue reading)

carlos gomez | 11 Mar 2010 22:19
Picon
Gravatar

Re: Installing wx with cabal using Haskell Platform on Mac OSX.

I got the same error, but it is only in the ghc interpreter, so if you compile that with ghc --make, you will not get that error. 

-- carlos gomez

On 11 March 2010 14:37, David Place <d <at> vidplace.com> wrote:

On Mar 10, 2010, at 3:41 PM, David Place wrote:

> I have just installed the Haskell Platform 2009.2.0.2 on Mac OSX 10.6.2.  When I try to install wx I get the following error which I do not understand.
> Can anyone give me a hint?

With the kind help of several people on haskell-cafe, I have been able to get a version of wxHaskell to install.  I appear to be missing "macosx-app".  It is not in /usr/local/wxhaskell/bin/macosx-app or ~/.cabal/bin.  I have tried the EnableGUI module, but get the error:

> $ ghci -framework Carbon try.hs
> GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer ... linking ... done.
> Loading package base ... linking ... done.
> Loading object (framework) Carbon ... done
> final link ... done
> [2 of 2] Compiling Main             ( try.hs, interpreted )
> Ok, modules loaded: Main, EnableGUI.
> *Main> enableGUI
> *Main> main
> Loading package syb ... linking ... done.
> Loading package array-0.2.0.0 ... linking ... done.
> Loading package containers-0.2.0.1 ... linking ... done.
> Loading package bytestring-0.9.1.4 ... linking ... done.
> Loading package old-locale-1.0.0.1 ... linking ... done.
> Loading package old-time-1.0.0.2 ... linking ... done.
> Loading package filepath-1.1.0.2 ... linking ... done.
> Loading package unix-2.3.2.0 ... linking ... done.
> Loading package directory-1.0.0.3 ... linking ... done.
> Loading package stm-2.1.1.2 ... linking ... done.
> Loading package parsec-2.1.0.1 ... linking ... done.
> Loading package time-1.1.4 ... linking ... done.
> Loading package wxdirect-0.12.1.1 ... linking ... done.
> Loading package wxcore-0.12.1.2 ... can't load .so/.DLL for: stdc++ (dlopen(libstdc++.dylib, 9): image not found)
> *Main>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
David Place | 11 Mar 2010 23:30

Re: Installing wx with cabal using Haskell Platform on Mac OSX.

Interesting.  When I try that, the program compiles.  When I try to run it however, the window pops up, but the
button does not accept a click.  

I thought to just get the macosx-app script from the source distribution.  In there, I find something called
macosx-app-template.  I don't know how to generate the former from the latter.

On Mar 11, 2010, at 4:19 PM, carlos gomez wrote:

> I got the same error, but it is only in the ghc interpreter, so if you compile that with ghc --make, you will
not get that error. 
> 
> -- carlos gomez
> 
> On 11 March 2010 14:37, David Place <d <at> vidplace.com> wrote:
> 
> On Mar 10, 2010, at 3:41 PM, David Place wrote:
> 
> > I have just installed the Haskell Platform 2009.2.0.2 on Mac OSX 10.6.2.  When I try to install wx I get the
following error which I do not understand.
> > Can anyone give me a hint?
> 
> With the kind help of several people on haskell-cafe, I have been able to get a version of wxHaskell to
install.  I appear to be missing "macosx-app".  It is not in /usr/local/wxhaskell/bin/macosx-app or
~/.cabal/bin.  I have tried the EnableGUI module, but get the error:
> 
> > $ ghci -framework Carbon try.hs
> > GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
> > Loading package ghc-prim ... linking ... done.
> > Loading package integer ... linking ... done.
> > Loading package base ... linking ... done.
> > Loading object (framework) Carbon ... done
> > final link ... done
> > [2 of 2] Compiling Main             ( try.hs, interpreted )
> > Ok, modules loaded: Main, EnableGUI.
> > *Main> enableGUI
> > *Main> main
> > Loading package syb ... linking ... done.
> > Loading package array-0.2.0.0 ... linking ... done.
> > Loading package containers-0.2.0.1 ... linking ... done.
> > Loading package bytestring-0.9.1.4 ... linking ... done.
> > Loading package old-locale-1.0.0.1 ... linking ... done.
> > Loading package old-time-1.0.0.2 ... linking ... done.
> > Loading package filepath-1.1.0.2 ... linking ... done.
> > Loading package unix-2.3.2.0 ... linking ... done.
> > Loading package directory-1.0.0.3 ... linking ... done.
> > Loading package stm-2.1.1.2 ... linking ... done.
> > Loading package parsec-2.1.0.1 ... linking ... done.
> > Loading package time-1.1.4 ... linking ... done.
> > Loading package wxdirect-0.12.1.1 ... linking ... done.
> > Loading package wxcore-0.12.1.2 ... can't load .so/.DLL for: stdc++ (dlopen(libstdc++.dylib, 9):
image not found)
> > *Main>
> >
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> wxhaskell-users mailing list
> wxhaskell-users@...
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
> 

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Andy Gimblett | 24 Mar 2010 12:21
Picon
Gravatar

Re: Installing wx with cabal using Haskell Platform on Mac OSX.

Dear David,

You might like to look at cabal-macosx

http://hackage.haskell.org/package/cabal-macosx
http://github.com/gimbo/cabal-macosx

-Andy

On 11 Mar 2010, at 22:30, David Place wrote:

> Interesting.  When I try that, the program compiles.  When I try to  
> run it however, the window pops up, but the button does not accept a  
> click.
>
> I thought to just get the macosx-app script from the source  
> distribution.  In there, I find something called macosx-app- 
> template.  I don't know how to generate the former from the latter.
>
> On Mar 11, 2010, at 4:19 PM, carlos gomez wrote:
>
>> I got the same error, but it is only in the ghc interpreter, so if  
>> you compile that with ghc --make, you will not get that error.
>>
>> -- carlos gomez
>>
>> On 11 March 2010 14:37, David Place <d <at> vidplace.com> wrote:
>>
>> On Mar 10, 2010, at 3:41 PM, David Place wrote:
>>
>>> I have just installed the Haskell Platform 2009.2.0.2 on Mac OSX  
>>> 10.6.2.  When I try to install wx I get the following error which  
>>> I do not understand.
>>> Can anyone give me a hint?
>>
>> With the kind help of several people on haskell-cafe, I have been  
>> able to get a version of wxHaskell to install.  I appear to be  
>> missing "macosx-app".  It is not in /usr/local/wxhaskell/bin/macosx- 
>> app or ~/.cabal/bin.  I have tried the EnableGUI module, but get  
>> the error:
>>
>>> $ ghci -framework Carbon try.hs
>>> GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
>>> Loading package ghc-prim ... linking ... done.
>>> Loading package integer ... linking ... done.
>>> Loading package base ... linking ... done.
>>> Loading object (framework) Carbon ... done
>>> final link ... done
>>> [2 of 2] Compiling Main             ( try.hs, interpreted )
>>> Ok, modules loaded: Main, EnableGUI.
>>> *Main> enableGUI
>>> *Main> main
>>> Loading package syb ... linking ... done.
>>> Loading package array-0.2.0.0 ... linking ... done.
>>> Loading package containers-0.2.0.1 ... linking ... done.
>>> Loading package bytestring-0.9.1.4 ... linking ... done.
>>> Loading package old-locale-1.0.0.1 ... linking ... done.
>>> Loading package old-time-1.0.0.2 ... linking ... done.
>>> Loading package filepath-1.1.0.2 ... linking ... done.
>>> Loading package unix-2.3.2.0 ... linking ... done.
>>> Loading package directory-1.0.0.3 ... linking ... done.
>>> Loading package stm-2.1.1.2 ... linking ... done.
>>> Loading package parsec-2.1.0.1 ... linking ... done.
>>> Loading package time-1.1.4 ... linking ... done.
>>> Loading package wxdirect-0.12.1.1 ... linking ... done.
>>> Loading package wxcore-0.12.1.2 ... can't load .so/.DLL for: stdc+ 
>>> + (dlopen(libstdc++.dylib, 9): image not found)
>>> *Main>
>>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> wxhaskell-users mailing list
>> wxhaskell-users@...
>> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
>>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> wxhaskell-users mailing list
> wxhaskell-users@...
> https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

--
Andy Gimblett
http://gimbo.org.uk/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Eric Y. Kow | 25 Mar 2010 17:22
Picon
Gravatar

haskell-platform-2010.1.0.0, MacPorts & wxHaskell works w/ work

Hi everyone,

Here's a user report with some good and bad news.  If somebody from
the wxHaskell Team could bless or comment on this, I might forward it
along to Haskell-Café.

I'm Bcc'ing Gregory Wright from the MacPorts team as I think he may
be interested.

First the good: with MacOS X 10.6 (but 32 bit), the new wxHaskell
packages by Daniel Fischer seem to work fine with GHC 6.12 and the
latest Haskell Platform.

And now the bad news: you have to work a little to get there if
you're using MacPorts.

Summary
=======
1. No more MacPorts wxWidgets; build one yourself
2. Don't forget to --enable-unicode
3. Don't forget grab your wxWidgets and not the system one
4. Or maybe wait for haskell-platform-2010.x to arrive in MacPorts

1. no more macports wxwidgets
=============================
you may see this error message (see Conor McBride's suffering on
http://www.haskell.org/pipermail/haskell-cafe/2009-December/071117.html ).

Undefined symbols:
 "_iconv_close", referenced from:
     _hs_iconv_close in libHSbase-4.2.0.0.a(iconv.o)
 "_iconv", referenced from:
     _hs_iconv in libHSbase-4.2.0.0.a(iconv.o)
 "_iconv_open", referenced from:
     _hs_iconv_open in libHSbase-4.2.0.0.a(iconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

As I vaguely understand the issue, the problem is that
 (a) new libHSbase gets built using iconv.h and the like from -I/usr/include,
     but
 (b) having *any* package that introduces a -L/opt/local/lib in there (eg. a
     MacPorts-friendly Haskeline) 
and that some sort of difference between the two versions of iconv make (a) and
(b) an unhappy combination.

Having your wxHaskell be linked against your MacPorts wxWidgets causes similar
trouble if you have MacPorts iconv as well.

I didn't want to think about this any harder, so I just took MacPorts out of
the equation altogether by building my own wxWidgets 2.8.10 from source
http://www.wxwidgets.org/downloads/#latest_stable (Hooray for stow)

2. Don't forget to --enable-unicode when configuring wxWidgets
==============================================================
After untarring the wxWidgets source, I did this, the main point being the
Unicode stuff; the stow related business being extra details to make life
easier:

  port install stow
  ./configure --prefix=/usr/local/stow/wxMac-2.8.10 --enable-unicode
  make && sudo make install
  cd /usr/local/stow
  sudo stow wxMac-2.8.10

If you forget to enable Unicode, everything will build fine, but you'll get
widgets with only one letter on them.

3. Don't forget to build wxHaskell against YOUR wxWidgets
=========================================================
I did this:

  PATH=/usr/local/bin:$PATH cabal install wx

If you do not temporarily re-order the path, the Setup.lhs file in wxcore
will pick up the system wxWidgets which does not have the wxThread symbols
wxHaskell wants (so says the wiki for OS X 10.4), and when you launch your
application you'll be greeted by lots of annoying dialogue boxes that you
have to chase away.  Other things may break.

  http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X

I wish there was some way we could just use the system wxWidgets with maybe
some sort of way of filling in the missing bits :-(

4. Maybe just wait for MacPorts haskell-platform to catch up
============================================================
Perhaps that would be the path of least resistance.

--

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Conal Elliott | 26 Mar 2010 23:34
Gravatar

build error on hackage

wx and wxcore are failing to build on hackage.  wx fails due to wxcore; and i don't know what the failure is for wx.  Here's the log: http://hackage.haskell.org/packages/archive/wxcore/0.12.1.3/logs/failure/ghc-6.12 .

   - Conal

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Eric Y. Kow | 26 Mar 2010 23:53
Picon
Gravatar

Re: build error on hackage

On Fri, Mar 26, 2010 at 15:34:16 -0700, Conal Elliott wrote:
> wx and wxcore are failing to build on hackage.  wx fails due to wxcore; and
> i don't know what the failure is for wx.  Here's the log:
> http://hackage.haskell.org/packages/archive/wxcore/0.12.1.3/logs/failure/ghc-6.12.

Perhaps the machine on hackage is missing wxWidgets?
I'm CC'ing Ross in case he has any insights into the matter.

--

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Ross Paterson | 27 Mar 2010 00:56
Picon
Favicon

Re: build error on hackage

On Fri, Mar 26, 2010 at 10:53:24PM +0000, Eric Y. Kow wrote:
> Perhaps the machine on hackage is missing wxWidgets?

The build client was missing the dev packages, but I've added them now.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

Gmane