
Hi all Trying to work out how to get wxHaskell correctly installed on mac os x (10.6.8 snow leopard). Have decided to try and get the older version working (0.13) so as to use the pre-installed wxWidgets (2.8.8 it seems). I was looking at the wxHAskell install info for mac os x at (1) http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X - which only talks about widgets 2.9, but I have now been reading (2) http://www.haskell.org/haskellwiki/WxHaskell/2.8 Question: The variable "$wxwin" is referred to in the page at link (2) above, where it says: "We assume in this guide that the variable $wxwin points to your wxWidgets installation directory, for example: ~/dev/wxGTK-2.8.10." And in the page at link (1), step 3, it says: "Check your path to make sure you are using your wxWidgets and not the default Mac one" Are these referring to the same thing? ( I had originally interpreted 'path' as referring to $PATH.) The reference to $wxwin is in instructions for building wxWidgets 2.8 which I should not need to do if I am using the already installed 2.8.8 widgets library, but if I echo $wxwin it is blank and does not therefore appear to point to my wxWidgets installation directory. Is this an issue or is it only relevant to the initial build process for wxWidgets? Can anyone throw any light on this? Thanks/ Henry

A 06/06/2012, às 00:39, Henry Lockyer escreveu:
Hi all Trying to work out how to get wxHaskell correctly installed on mac os x (10.6.8 snow leopard). Have decided to try and get the older version working (0.13) so as to use the pre-installed wxWidgets (2.8.8 it seems). I was looking at the wxHAskell install info for mac os x at (1) http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X - which only talks about widgets 2.9, but I have now been reading (2) http://www.haskell.org/haskellwiki/WxHaskell/2.8
Question: The variable "$wxwin" is referred to in the page at link (2) above, where it says: "We assume in this guide that the variable $wxwin points to your wxWidgets installation directory, for example: ~/dev/wxGTK-2.8.10." And in the page at link (1), step 3, it says: "Check your path to make sure you are using your wxWidgets and not the default Mac one"
Are these referring to the same thing? ( I had originally interpreted 'path' as referring to $PATH.)
The reference to $wxwin is in instructions for building wxWidgets 2.8 which I should not need to do if I am using the already installed 2.8.8 widgets library, but if I echo $wxwin it is blank and does not therefore appear to point to my wxWidgets installation directory. Is this an issue or is it only relevant to the initial build process for wxWidgets?
Can anyone throw any light on this?
Not exactly what you are asking for but I recently installed wxHaskell latest version with wxWidgets 2.9 on osx 10.7.3 successfully using the instructions here http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X and some help from the list. I installed wxWidgets from homebrew (http://mxcl.github.com/homebrew/) which is very easy to do, a one liner. I think the 2.9 version is much better for osx, it has 64 bit support and uses cocoa: "2.9 series bring many improvements compared to 2.8 series such as much better and simpler to use support for Unicode and the new wxOSX/Cocoa port, suitable for development of 64 bit GUI applications under OS X, as well as a huge number of other new features and bug fixes." It should be something like: brew install wxmac --devel then cabal install wx cabal-macosx or if have issues with the command above install the correct versions of the dependencies in the right order by hand: 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 cabal install cabal-macosx When I did this I got it working inside EclipseFP although I couldn’t get ghc to compile a hello world program, which I guess means I should be passing it some flag that I don’t know about. Hope this helps, Miguel Negrão

Thanks a lot Miguel. I recently discovered your posts about 'reactive banana' and wxHaskell and started looking through them. Unfortunately I am a c/c++ compilation/make/etc. and general unix newbie, or oldbie in my case, (amongst many other areas of deep ignorance ;-) so I am finding some of the information/instructions a little hard to follow. I went for version 2.9 of widgets first, as it seemed better, for the reasons you mention. In fact the wxHAskell mac-specific advice only refers to 2.9, on the page you refer to. I downloaded 2.9.3 from wxWidgets.org as I'm not familiar with homebrew. I followed the wxWidgets installation instructions to build it. Which mostly seemed to be OK but with a warning about QuickTime which is evidently a 32 vs 64 bit issue. I tried to make sure everything was OK at each step before going on to the next one, to avoid Too Many Variables syndrome, so before installing wxHaskell I checked out wxWidgets 2.9.3 with some of the demos. Some of them did not seem to be working quite right, also I had questions about the path variable, removing the 2.8.8 libraries, 32 vs 64 bit, QuickTime etc. and started thinking it might be more efficient to just go with the existing 2.8.8 widgets in the meantime, but then immediately hit the $wxwin question ! I did wonder if $wxwin might be specific to Windows, but on the wxHaskell page I linked below it is in the main flow of the text rather than in the Windows/MacOSX-specific parts. I posted my earlier questions on the "wxhaskell-users" list but it seems a bit quiet there so I might re-post them here. How did you establish that your wxWidgets was installed and working as expected, and can I ask how you removed the pre-loaded mac os version of widgets (if you had this) ? Regards/ Henry On 6 Jun 2012, at 09:04, Miguel Negrao wrote:
A 06/06/2012, às 00:39, Henry Lockyer escreveu:
Hi all Trying to work out how to get wxHaskell correctly installed on mac os x (10.6.8 snow leopard). Have decided to try and get the older version working (0.13) so as to use the pre-installed wxWidgets (2.8.8 it seems). I was looking at the wxHAskell install info for mac os x at (1) http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X - which only talks about widgets 2.9, but I have now been reading (2) http://www.haskell.org/haskellwiki/WxHaskell/2.8
Question: The variable "$wxwin" is referred to in the page at link (2) above, where it says: "We assume in this guide that the variable $wxwin points to your wxWidgets installation directory, for example: ~/dev/wxGTK-2.8.10." And in the page at link (1), step 3, it says: "Check your path to make sure you are using your wxWidgets and not the default Mac one"
Are these referring to the same thing? ( I had originally interpreted 'path' as referring to $PATH.)
The reference to $wxwin is in instructions for building wxWidgets 2.8 which I should not need to do if I am using the already installed 2.8.8 widgets library, but if I echo $wxwin it is blank and does not therefore appear to point to my wxWidgets installation directory. Is this an issue or is it only relevant to the initial build process for wxWidgets?
Can anyone throw any light on this?
Not exactly what you are asking for but I recently installed wxHaskell latest version with wxWidgets 2.9 on osx 10.7.3 successfully using the instructions here http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X and some help from the list.
I installed wxWidgets from homebrew (http://mxcl.github.com/homebrew/) which is very easy to do, a one liner. I think the 2.9 version is much better for osx, it has 64 bit support and uses cocoa:
"2.9 series bring many improvements compared to 2.8 series such as much better and simpler to use support for Unicode and the new wxOSX/Cocoa port, suitable for development of 64 bit GUI applications under OS X, as well as a huge number of other new features and bug fixes."
It should be something like:
brew install wxmac --devel
then
cabal install wx cabal-macosx
or if have issues with the command above install the correct versions of the dependencies in the right order by hand:
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 cabal install cabal-macosx
When I did this I got it working inside EclipseFP although I couldn’t get ghc to compile a hello world program, which I guess means I should be passing it some flag that I don’t know about.
Hope this helps, Miguel Negrão
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Hi Henry, A 06/06/2012, às 12:31, Henry Lockyer escreveu:
Thanks a lot Miguel. I recently discovered your posts about 'reactive banana' and wxHaskell and started looking through them.
Unfortunately I am a c/c++ compilation/make/etc. and general unix newbie, or oldbie in my case, (amongst many other areas of deep ignorance ;-) so I am finding some of the information/instructions a little hard to follow.
Well, that’s exactly why I use homebrew and you should too . :-) It’s designed to make installing stuff easier, it will also download and install for you any dependencies of what you are trying to install. It’s quite easy to install homebrew just type in the terminal: /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)” Don’t use sudo. If you can’t install to /usr/local then make sure you own that directory, since homebrew wants to make sure you don’t need to sudo to install stuff.
How did you establish that your wxWidgets was installed and working as expected,
Well, when I had wxHaskell working I compiled a wxHaskell program and it worked but I didn’t test wxWidgets independently.
and can I ask how you removed the pre-loaded mac os version of widgets (if you had this) ?
No need for that, the pre-installed ones are older versions. best, Miguel

Hi Miguel As you say, the pre-loaded mac os version is older than 2.9 (mine is 2.8). I was not very clear - it was not really 'removing' the old one that I meant to ask about, but how did you perform the instruction (at http://www.haskell.org/haskellwiki/WxHaskell/MacOS_X which says: "3. Check your path to make sure you are using your wxWidgets and not the default Mac one" I have installed and built wxWidgets 2.9 but not made any changes to path variables (whichever may be involved). If I type command "wx-config --release" it tells me the widgets version is 2.8. If I type command "wx-config --prefix it tells me it is in "/usr" If I type command "wx-config --static it says there is no config to match this. So I conclude (if I interpret it right...) that I have a dll version of widgets 2.8 in my path at /usr Does homebrew take care of this somehow when it loads 2.9? I am not sure if anything else is using this 2.8 dll, and/or how to best set the path up so I can use 2.9 with wxHaskell. Sounds like I should definitely take a look at homebrew, so thanks for the recommendation. I'd also be interested to know what you get in response to wx-config (with parameters as above) if you have not made any manual changes to path variables etc. yourself. I also just saw this posted by Gregory Guthrie in another wxHaskell thread ("wxHaskell install errors"): "If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are." This makes me think that the 'instruction 3' in the wxHaskell macosx instructions I quoted above is perhaps not necessary, or at least there is an alternative when it comes to the cabal step. This may solve one of my problems/questions at least, but needs more investigation. Cheers/ Henry On 6 Jun 2012, at 22:18, Miguel Negrao wrote:
Hi Henry,
A 06/06/2012, às 12:31, Henry Lockyer escreveu:
Thanks a lot Miguel. I recently discovered your posts about 'reactive banana' and wxHaskell and started looking through them.
Unfortunately I am a c/c++ compilation/make/etc. and general unix newbie, or oldbie in my case, (amongst many other areas of deep ignorance ;-) so I am finding some of the information/instructions a little hard to follow.
Well, that’s exactly why I use homebrew and you should too . :-) It’s designed to make installing stuff easier, it will also download and install for you any dependencies of what you are trying to install. It’s quite easy to install homebrew just type in the terminal:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)”
Don’t use sudo. If you can’t install to /usr/local then make sure you own that directory, since homebrew wants to make sure you don’t need to sudo to install stuff.
How did you establish that your wxWidgets was installed and working as expected,
Well, when I had wxHaskell working I compiled a wxHaskell program and it worked but I didn’t test wxWidgets independently.
and can I ask how you removed the pre-loaded mac os version of widgets (if you had this) ?
No need for that, the pre-installed ones are older versions.
best, Miguel _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Anyone know if/how $wxwin also needs to be set on macosx for wxHaskell 0.9 /wxWidgets 2.8 ? and/or wxHAskell 0.13 / wxWidgets 2.9 ?

Henry Lockyer wrote:
Anyone know if/how $wxwin also needs to be set on macosx for wxHaskell 0.9 /wxWidgets 2.8 ? and/or wxHAskell 0.13 / wxWidgets 2.9 ?
I don't think it's needed. Installation instruction found on the internet are not always accurate. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Thanks Heinrich. I conclude that, at the very least, normally I should not need to do anything with it 'manually'. On 7 Jun 2012, at 13:44, Heinrich Apfelmus wrote:
Henry Lockyer wrote:
Anyone know if/how $wxwin also needs to be set on macosx for wxHaskell 0.9 /wxWidgets 2.8 ? and/or wxHAskell 0.13 / wxWidgets 2.9 ?
I don't think it's needed. Installation instruction found on the internet are not always accurate.
Best regards, Heinrich Apfelmus
-- http://apfelmus.nfshost.com
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Just in case anyone else was puzzling about the $WXWIN instructions on the wxHAskell installation page for wxWidgets 2.8, I think the following information I just now found in my latest trip through the Hall of Mirrors indicates that it is a windows-specific item, not a general one as may be suggested by the structure of the wxHaskell page at http://www.haskell.org/haskellwiki/WxHaskell/2.8 and it *seems* to be a general instruction, not just for 2.8. The following is listed specifically under windows install at http://wiki.wxwidgets.org/Downloading_and_installing_wxWidgets Set the WXWIN environment variable If you used the installer, in addition to installing the wxWidgets source files, it also automatically adds a WXWIN environment variable on your system pointing to the location where you installed wxWidgets. If you didn't use the installer, it is highly recommended that you do so by hand. You will need to setup WXWIN to the full location where you installed wxWidgets to (e.g. C:\wx\wx288). To do so see Adding an Environment Variable under Windows. / Henry On 7 Jun 2012, at 15:05, Henry Lockyer wrote:
Thanks Heinrich. I conclude that, at the very least, normally I should not need to do anything with it 'manually'.
On 7 Jun 2012, at 13:44, Heinrich Apfelmus wrote:
Henry Lockyer wrote:
Anyone know if/how $wxwin also needs to be set on macosx for wxHaskell 0.9 /wxWidgets 2.8 ? and/or wxHAskell 0.13 / wxWidgets 2.9 ?
I don't think it's needed. Installation instruction found on the internet are not always accurate.
Best regards, Heinrich Apfelmus
-- http://apfelmus.nfshost.com
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
participants (3)
-
Heinrich Apfelmus
-
Henry Lockyer
-
Miguel Negrao