Status of Diagrams installation on OS/X Lion?...

85 views
Skip to first unread message

Stuart Hungerford

unread,
Mar 7, 2012, 8:11:02 PM3/7/12
to diagrams...@googlegroups.com
Hi,

I'm currently trying to install Diagrams under Mac OS/X Lion,
following these instructions: https://gist.github.com/1655271

This is with OS/X 10.7.3 and XCode 4.2.1 (need to avoid XCode 4.3 as
it makes some large changes that other projects like the Haskell
Platform may not have caught up with yet).

I've successfully installed GHC 7.0.4 and Haskell Platform 2011.4.0.0
but the instructions in the Gist refer to GHC 7.2.2. I've also
installed the various GTK and other components via Homebrew as per the
Gist.

Trying to install gtk2hs-buildtools though generates thousands of
warnings and things get worse from there. Am I using the wrong
version of GHC or Haskell Platform? Do I need to pass different
compiler/32 bit/64 bit options to Homebrew for the components Diagrams
relies on? Being new to Haskell am I going about this in the wrong
way?

Any advice much appreciated,

Stu

Karl Smeltzer

unread,
Mar 7, 2012, 10:44:35 PM3/7/12
to Stuart Hungerford, diagrams...@googlegroups.com
Hi Stuart,

I'm no expert, but I've been developing a fairly substantial project against Diagrams on both OSX 10.7.x and Linux successfully over the past few months. That said, I am using Macports as opposed to Homebrew because Macports gives me the option to build GTK natively against Quartz as opposed to the awkward X11 implementation on OSX. In theory both should work just fine, though. I've also used both Xcode 4.2.x and 4.3.x successfully so that isn't your problem.

I recommend you use the 64bit build of the Haskell Platform directly form haskell.org if you aren't already. Most tools and libraries seem to default to 64bit on 10.7, leading to fewer/no linking issues with the 64bit build of GHC. The only issue at all that I've encountered with the 7.0.x series of GHC is unrelated, namely the need to pass -fno-ghci-sandbox to GHCi in some circumstances.

With this combination of tools I've not yet encountered any need to pass special compiler flags for building the necessary libraries. I simply issue something along the lines of 'cabal install gtk2hs-buildtools' and make sure the install directory is on $PATH.

Since you don't mention any specific error output, my first instinct is to be sure you're using the 64 bit build of the Haskell Platform as well as ensuring that Homebrew is building 64bit versions of the appropriate libraries. Unfortunately I'm not sure exactly how to do this since I don't use it.

Good luck.

-- Karl

John Lato

unread,
Mar 8, 2012, 11:39:28 AM3/8/12
to Stuart Hungerford, diagrams...@googlegroups.com
Hi,

I've also been developing with OSX Lion with Macports gtk, for the
same reason as Karl.

Would it be possible for you to post the output generated by "cabal
install gtk2hs-buildtools" somewhere?

As this seems to be an issue with gtk2hs rather than diagrams itself,
it might be appropriate to ask on the gtk2hs-users list (although I
expect that many of the relevant people are on here as well).

Sincerely,
John L.

Stuart Hungerford

unread,
Mar 8, 2012, 6:18:09 PM3/8/12
to Karl Smeltzer, diagrams...@googlegroups.com
On Thu, Mar 8, 2012 at 2:44 PM, Karl Smeltzer
<smel...@eecs.oregonstate.edu> wrote:

> I'm no expert, but I've been developing a fairly substantial project against
> Diagrams on both OSX 10.7.x and Linux successfully over the past few months.
> That said, I am using Macports as opposed to Homebrew because Macports gives
> me the option to build GTK natively against Quartz as opposed to the awkward
> X11 implementation on OSX. In theory both should work just fine, though.
> I've also used both Xcode 4.2.x and 4.3.x successfully so that isn't your
> problem.

Thanks for that--I was very happy to leave Macports behind for
Homebrew but I will now go back and look at the Macports GTK builds.

> I recommend you use the 64bit build of the Haskell Platform directly form
> haskell.org if you aren't already. Most tools and libraries seem to default
> to 64bit on 10.7, leading to fewer/no linking issues with the 64bit build of
> GHC. The only issue at all that I've encountered with the 7.0.x series of
> GHC is unrelated, namely the need to pass -fno-ghci-sandbox to GHCi in some
> circumstances.

I've uninstalled the Homebrew versions and used the .pkg version of
the Haskell Platform which seems to be working well. I've temporarily
installed the Homebrew versions of gtk+, cairo etc and "cabal install"
of gtk, Diagrams and chart-gtk seems to be working so far with X11
rendering.

Thanks again,

Stu

Reply all
Reply to author
Forward
0 new messages