Re: [Haskell-cafe] Ease of Haskell development on OS X?

On 20 Mar 2009, at 16:56, Mark Spezzano wrote:
Hi,
I’ve been thinking of changing over to an iMac from my crappy old PC running Windows Vista.
Question: Does the iMac have good support for Haskell development?
As good as, if not better than other platforms I've found, you get none of the weird problems with libraries that aren't designed to run on windows, and more choice of editors than on linux.
Question: What environment setups do people commonly use (e.g. Eclipse Xcode etc)?
I use SubEthaEdit and a Terminal window, I know many people that use emacs/vi, and one or two that use TextMate.
Question: Are there any caveats I should be aware of before changing systems (i.e. unpleasant surprises).
Not particularly – it's mostly like running linux, but without the headaches when things break, and with more choice of software.
I want to be able to use the machine for Haskell OpenGL programming.
Other than chose the graphics card carefully, an iMac will do you very well. Hope that helps. Bob

tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful. Could the Mac users add information (and screenshots?) to the OSX wiki page, http://haskell.org/haskellwiki/OSX

On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™. Is there something that can be extracted from this discussion to add to it? Bob

tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?

On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other. I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it? Bob

tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?

Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts? Martijn.

martijn:
Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
It bootstraps itself.

Don Stewart wrote:
martijn:
Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
It bootstraps itself.
Impressive. I added some text explaining how to install GHC through MacPorts, but I don't really have any experience with it, so if anyone has improvements, feel free to correct. Also, if someone could add some reasons to (not) install through MacPorts instead of the standalone installer, that'd be nice. Martijn.

On Fri, Mar 20, 2009 at 11:06 AM, Don Stewart
martijn:
Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
It bootstraps itself.
??? GHC does or MacPorts does. My experience was that you needed GHC to build GHC :-) Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Mar 20, 2009 at 1:05 PM, David Leimbach
On Fri, Mar 20, 2009 at 11:06 AM, Don Stewart
wrote: martijn:
Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
It bootstraps itself.
??? GHC does or MacPorts does. My experience was that you needed GHC to build GHC :-)
Dave
To be clear the download page says you must have an older version of GHC to build it. "The source distribution needs an installed GHC (version 6.4.2 at least). If your platform isn't currently supported with a binary distribution, then you'll need to consult the section on Porting GHChttp://hackage.haskell.org/trac/ghc/wiki/Building/Porting in the Building Guide."
_______________________________________________
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 20 Mar 2009, at 21:05, David Leimbach wrote:
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
It bootstraps itself.
??? GHC does or MacPorts does. My experience was that you needed GHC to build GHC :-)
MacPort developers tweak sources into packages which can install by themselves. So one just types sudo port install ghc and it does the rest. Here is info about ghc:
$ port info ghc ghc 6.8.3, Revision 1, lang/ghc (Variants: universal, darwin_6, darwin_7, darwin_8_powerpc, darwin_8_i386, darwin_9_powerpc, darwin_9_i386, no_opengl) http://haskell.org/
The Glasgow Haskell Compiler is a robust, fully-featured, optimising compiler and interactive environment for Haskell 98, GHC compiles Haskell to either native code or C. It implements numerous experimental language extensions to Haskell 98, for example: concurrency, a foreign language interface, multi-parameter type classes, scoped type variables, existential and universal quantification, unboxed types, exceptions, weak pointers, and so on. GHC comes with a generational garbage collector, and a space and time profiler.
Library Dependencies: readline, gmp Runtime Dependencies: perl5.8 Platforms: darwin Maintainers: gwright@macports.org
However, as someone needs to do the packaging, the versions tend to be older than from direct sources. So the latter is to be preferred, but the package manager does the package chasing for you (which is a problem with Gtk+ installed directly). Therefore, as mentioned before, it might be best to install the GHC binaries and install libraries like Gtk+ from MacPorts. There is also Intel Gtk+ that binds directly to Aqua, the Mac OS X native GUI (for making native Mac OS X Applications): http://www.gtk-osx.org/ You need to set of environmental variables UNIX style, but there is a Mac OS X way, too (see below). In the traditional way, one must be aware of that the shell 'bash' (see 'man bash') reads different startup files when called as a login shell (as from the Terminal) and non-login-shell (as from X11 and xterm). For the former, one can put the stuff in .profile, and the latter .bashrc. To make things simple, one can put in .bashrc: source ~/.profile thus reading .profile. In .profile, one might put something like the stuff at the bottom of this letter (which also adds support for the other package manager, as well admitting user binaries to be installed). There is another, Mac OS X specific way (also see below): go to Terminal, and make a directory: cd mkdir .MacOSX cd .MacOSX touch environment.plist open -a Xcode environment.plist The last command opens the file into the Xcode editor, which has a facility to create the special format for these files. Pne drawback of this method is the one has to log out and login again to set them. This assumes you have installed Xcode, wither from the installation disk, or by signing up as a developer at http://developer.apple.com/ When working with files, it is convenient to set them so that they open in your favorite program. For that, I have found it convenient to install a System Preferences panel 'Default Apps' found at http://www.rubicode.com/Software/ I see now they have one for editing the environment.plist file. If you come from a non-UNIX (POSIX) platform, then note that in order to work as root, it is most of the time sufficient to use (from an administrator account) sudo -s The 'root' account is by default disabled (can be started from the Directory Utility). Also never edit in /usr/ outside /usr/local/, the other system directories, or /System/ as they belong to the system installation (Mac OS X user modified system files are out into / Library/, but often via some other program which does safety checks.) Hans Aberg ---- # Add to end of searchpath: append_path() { if ! eval test -z "\"\${$1##*:$2:*}\"" -o -z "\"\${$1%%*:$2}\"" -o - z "\"\${$1##$2:*}\"" -o -z "\"\${$1##$2}\"" ; then eval "$1=\$$1:$2" fi } # Add to beginning of searchpath: prepend_path() { if ! eval test -z "\"\${$1##*:$2:*}\"" -o -z "\"\${$1%%*:$2}\"" -o - z "\"\${$1##$2:*}\"" -o -z "\"\${$1##$2}\"" ; then eval "$1=$2:\$$1" fi } # Set system searchpaths: # In the case a directory may exist (depending on the program) both with and without # parent directory 'share/' (like in the cae of MANPATH and INFOPATH), the 'share/' # version is put first, as it is what is used in /usr on Mac OS X FreeSD UNIX. # The idea is that if a program is somehow adapted to this platform, the the stuff will # be moved to the 'share/' variation, and should thus be ovverride the unadapted versions. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin MANPATH=/usr/share/man:/usr/X11R6/man INFOPATH=/usr/share/info LIBPATH=/usr/lib:/usr/X11R6/lib # Prepend Fink searchpaths: test -r /sw/bin/init.sh && . /sw/bin/init.sh # Prepend MacPorts (former DarwinPorts) searchpaths: prepend_path PATH /opt/local/bin:/opt/local/sbin prepend_path MANPATH /opt/local/share/man:/opt/local/man prepend_path INFOPATH /opt/local/share/info:/opt/local/info prepend_path LIBPATH /opt/local/lib # Prepend MacTeX paths prepend_path PATH /usr/texbin prepend_path MANPATH /usr/local/texlive/2007/texmf/doc/man prepend_path INFOPATH /usr/local/texlive/2007/texmf/doc/info # Prepend /usr/local/ searchpaths: prepend_path PATH /usr/local/bin:/usr/local/X11R6/bin prepend_path MANPATH /usr/local/share/man:/usr/local/man prepend_path INFOPATH /usr/local/share/info:/usr/local/info prepend_path LIBPATH /usr/local/lib # Prepend $HOME searchpaths: prepend_path PATH $HOME/local/bin prepend_path MANPATH $HOME/local/share/man:$HOME/local/man prepend_path INFOPATH $HOME/local/share/info:$HOME/local/info prepend_path LIBPATH $HOME/local/lib # Export changed paths: export PATH export MANPATH export INFOPATH export LIBPATH ----

MacPort developers tweak sources into packages which can install by themselves. So one just types sudo port install ghc and it does the rest. Here is info about ghc:
$ port info ghc ghc 6.8.3, Revision 1, lang/ghc (Variants: universal, darwin_6, darwin_7, darwin_8_powerpc, darwin_8_i386, darwin_9_powerpc, darwin_9_i386, no_opengl) http://haskell.org/
A bit out of date: MigMit:~ MigMit$ port info ghc ghc @6.10.1, Revision 8 (lang, haskell) ...blah-blah... Maybe, your $(port version) is still 1.600?

On 20 Mar 2009, at 22:44, Miguel Mitrofanov wrote:
Here is info about ghc:
$ port info ghc ghc 6.8.3, Revision 1, lang/ghc (Variants: universal, darwin_6, darwin_7, darwin_8_powerpc, darwin_8_i386, darwin_9_powerpc, darwin_9_i386, no_opengl) http://haskell.org/
A bit out of date:
MigMit:~ MigMit$ port info ghc ghc @6.10.1, Revision 8 (lang, haskell) ...blah-blah...
Maybe, your $(port version)
You mean 'port version' (or 'echo $(port version)') :-).
is still 1.600?
That is right. One should from time-to-time run sudo port -d selfupdate I do not have the ports version of GHC installed. So the version of 'port' itself may affect the info about packages, too, it seems. In addition, one may have to download a new copy from the site. This happened when I made a new system installation (though restore from the Time Machine backup worked fine). Also, updating may break some code - libraries are dynamically linked. I used this for a compile of Scala (in Ada) which links to the MacPorts Gtk+ libraries. And now you tricked me to update - let's see if it breaks. Hans

On 20 Mar 2009, at 22:44, Miguel Mitrofanov wrote:
A bit out of date:
MigMit:~ MigMit$ port info ghc ghc @6.10.1, Revision 8 (lang, haskell) ...blah-blah...
Maybe, your $(port version) is still 1.600?
Yes, now it worked: $ port version Version: 1.700 $ port info ghc ghc @6.10.1, Revision 9 (lang, haskell) Variants: darwin_6, darwin_7, darwin_8_i386, darwin_8_powerpc, darwin_9_i386, darwin_9_powerpc ... One more thing to keep in is this line "Variants:...": Packages can have variants, and when installing, one can choose between them, and even have several different installed simultaneously, switching between them. This may make a difference on a package like Gtk+. I get: gtk2 @2.14.7, Revision 1 (x11) Variants: darwin_7, darwin_8, no_x11, quartz, universal, x11 ... So when installing it, one should type sudo install gtk2 Also, MacPorts is very careful using full paths to its own components. This makes a very safe build. But it is a problem for libraries if one wants to redistribute them: They are hardcoded to the MacPorts location in /opt/ (calling each other). If one wants to make programs that can be distributed either in /usr/local/ or as Mac OS X native / Applications/, then the only way seems to be to do all the package chasing. Therefore, it might be best trying to use http://www.gtk-osx.org/ But it will then only work on Intel Macs (or at least when I checked it out). Hans

On 2009 Mar 20, at 17:02, Hans Aberg wrote:
Therefore, as mentioned before, it might be best to install the GHC binaries and install libraries like Gtk+ from MacPorts. There is also Intel Gtk+ that binds directly to Aqua, the
This won;t work as you expect: since there's a dependency on ghc, the ports version of ghc will be installed. (No, it doesn't behave like BSD ports, and can't: breaking "base", which is outside of their control, could have severe consequences, so it doesn't simply accept installed versions of programs.) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On 21 Mar 2009, at 01:10, Brandon S. Allbery KF8NH wrote:
On 2009 Mar 20, at 17:02, Hans Aberg wrote:
Therefore, as mentioned before, it might be best to install the GHC binaries and install libraries like Gtk+ from MacPorts. There is also Intel Gtk+ that binds directly to Aqua, the
This won;t work as you expect: since there's a dependency on ghc, the ports version of ghc will be installed. (No, it doesn't behave like BSD ports, and can't: breaking "base", which is outside of their control, could have severe consequences, so it doesn't simply accept installed versions of programs.)
I'm not sure what you are saying here: installing MacPorts Gtk does not cause its GHC to be installed, nor does it bind to it. The way it works with Gnat, is that there is a GtkAda package which binds to Gtk, and the paths of this package must be set to whatever Gtk one is using. Using an external Gnat binding to MacPorts Gtk works just fine. As for the Intel Gtk package that binds to to Aqua, it is integrated with the Xcode GCC. So one must do some extra tweaking there. Hans Aberg

No, you don't. On 20 Mar 2009, at 21:03, Martijn van Steenbergen wrote:
Don Stewart wrote:
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
Since GHC is written in Haskell, do you need to have another Haskell compiler installed before GHC 6.10.1 can be installed through MacPorts?
Martijn. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

cabal-install works for me. The one thing that would be REALLY REALLY
nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X.
There exists a ports build for it, but it won't use the GHC that is
installed via .dmg to build it - it insists instead on installing ghc
again via ports, which I find both odd and undesirable. It really
comes down to the fact that gtk2hs is the only thing in the
haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie:
Other than chose the graphics card carefully, an iMac will do you very well.
Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess.. http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework -Ross On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
tom.davie: > > Other than chose the graphics card carefully, an iMac will do > you > very well. > > Hope that helps.
This is very useful.
Could the Mac users add information (and screenshots?) to the OSX wiki page,
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

That one doesn't work with OpenGL, however and won't in the forseeable
future. Incidentally, just now doing a ports install gtk2hs gives
me the following error on my brand new MacBook:
$ sudo port install gtk2hs
... stuff happens normally ... then:
opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o
tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf
package.conf.inplace -hide-all-packages -package base
package.conf.inplace: openBinaryFile: does not exist (No such file or directory)
/opt/local/bin/ghc +RTS -RTS -c tools/callbackGen/HookGenerator.hs -o
tools/callbackGen/HookGenerator.o -O -I. -itools/callbackGen
-package-conf package.conf.inplace -hide-all-packages -package base
package.conf.inplace: openBinaryFile: does not exist (No such file or directory)
rm -rf glib/System/Glib.o glib/System/Glib_split/; mkdir -p
glib/System/Glib_split
/opt/local/bin/ghc +RTS -RTS -split-objs -c glib/System/Glib.hs -o
glib/System/Glib.o -O -fffi -iglib -package-conf package.conf.inplace
-hide-all-packages -ignore-package glib -package base -package-name
glib-0.9.13 '-#include
While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess..
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
-Ross
On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie:
On 20 Mar 2009, at 18:08, Don Stewart wrote:
> tom.davie: >> >> Other than chose the graphics card carefully, an iMac will do you >> very well. >> >> Hope that helps. > > This is very useful. > > Could the Mac users add information (and screenshots?) to the OSX > wiki > page, > > http://haskell.org/haskellwiki/OSX
I'm not really sure there's much to add. It mostly just works™.
Is there something that can be extracted from this discussion to add to it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Ah wait... I can't read. section 4.1.2 explains the macports
installation. I'll try that.
On Fri, Mar 20, 2009 at 2:56 PM, Jeff Heard
That one doesn't work with OpenGL, however and won't in the forseeable future. Incidentally, just now doing a ports install gtk2hs gives me the following error on my brand new MacBook:
$ sudo port install gtk2hs
... stuff happens normally ... then:
opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) /opt/local/bin/ghc +RTS -RTS -c tools/callbackGen/HookGenerator.hs -o tools/callbackGen/HookGenerator.o -O -I. -itools/callbackGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) rm -rf glib/System/Glib.o glib/System/Glib_split/; mkdir -p glib/System/Glib_split /opt/local/bin/ghc +RTS -RTS -split-objs -c glib/System/Glib.hs -o glib/System/Glib.o -O -fffi -iglib -package-conf package.conf.inplace -hide-all-packages -ignore-package glib -package base -package-name glib-0.9.13 '-#include
' -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2
On Fri, Mar 20, 2009 at 2:27 PM, Ross Mellgren
wrote: While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess..
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
-Ross
On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie: > > On 20 Mar 2009, at 18:08, Don Stewart wrote: > >> tom.davie: >>> >>> Other than chose the graphics card carefully, an iMac will do you >>> very well. >>> >>> Hope that helps. >> >> This is very useful. >> >> Could the Mac users add information (and screenshots?) to the OSX >> wiki >> page, >> >> http://haskell.org/haskellwiki/OSX > > I'm not really sure there's much to add. It mostly just works™. > > Is there something that can be extracted from this discussion to add > to > it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Ah, true. Sorry, my mistake -- I forgot that wasn't supported with the framework version. -Ross On Mar 20, 2009, at 2:56 PM, Jeff Heard wrote:
That one doesn't work with OpenGL, however and won't in the forseeable future. Incidentally, just now doing a ports install gtk2hs gives me the following error on my brand new MacBook:
$ sudo port install gtk2hs
... stuff happens normally ... then:
opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) /opt/local/bin/ghc +RTS -RTS -c tools/callbackGen/HookGenerator.hs -o tools/callbackGen/HookGenerator.o -O -I. -itools/callbackGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) rm -rf glib/System/Glib.o glib/System/Glib_split/; mkdir -p glib/System/Glib_split /opt/local/bin/ghc +RTS -RTS -split-objs -c glib/System/Glib.hs -o glib/System/Glib.o -O -fffi -iglib -package-conf package.conf.inplace -hide-all-packages -ignore-package glib -package base -package-name glib-0.9.13 '-#include
' -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2
On Fri, Mar 20, 2009 at 2:27 PM, Ross Mellgren
wrote: While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess..
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
-Ross
On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
tom.davie: > > On 20 Mar 2009, at 18:08, Don Stewart wrote: > >> tom.davie: >>> >>> Other than chose the graphics card carefully, an iMac will >>> do you >>> very well. >>> >>> Hope that helps. >> >> This is very useful. >> >> Could the Mac users add information (and screenshots?) to the >> OSX >> wiki >> page, >> >> http://haskell.org/haskellwiki/OSX > > I'm not really sure there's much to add. It mostly just works™. > > Is there something that can be extracted from this discussion > to add > to > it?
Imagine you're new to Haskell, or the Mac. What do you need to know to get started developing new Haskell software? Is that information on the page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

As this continues to build, I guess the issue for me, and I'm willing
to help with it, is trying to figure out how to redistribute programs
written with gtk2hs. on Windows, people can just install the gtk2hs
libraries via the installer -- although this does bork a little
because it assumes you have a haskell compiler on the machine.
Ignoring the errors, however, works. I don't see a similar situation
on Mac OS.
If I wanted to package an application, which I often do, because
firefighters, police officers, and emergency managers (my research
currently targets these people, and we're actually beginning to really
deploy our apps) don't have the time nor inclination to compile
programs on their machines, I can basically just hope they're running
windows. It'd be nice if there was a binary "redistributable" on
windows that doesn't generate errors because of no haskell compiler
installed and a similar package on OS X that includes the X11 Gtk
binaries and precompiled Gtk2Hs binaries.
I guess I just don't know yet how to package things for OS X or find
everything I'd need to find to build a redistributable image in the
first place. I haven't yet drunk the coolade on the whole Mac
development process, having sidestepped the normal process by being a
Haskell developer. I'm sure they have standard procedures for finding
and packaging libraries.
-- Jeff
On Fri, Mar 20, 2009 at 3:06 PM, Ross Mellgren
Ah, true. Sorry, my mistake -- I forgot that wasn't supported with the framework version.
-Ross
On Mar 20, 2009, at 2:56 PM, Jeff Heard wrote:
That one doesn't work with OpenGL, however and won't in the forseeable future. Incidentally, just now doing a ports install gtk2hs gives me the following error on my brand new MacBook:
$ sudo port install gtk2hs
... stuff happens normally ... then:
opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) /opt/local/bin/ghc +RTS -RTS -c tools/callbackGen/HookGenerator.hs -o tools/callbackGen/HookGenerator.o -O -I. -itools/callbackGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) rm -rf glib/System/Glib.o glib/System/Glib_split/; mkdir -p glib/System/Glib_split /opt/local/bin/ghc +RTS -RTS -split-objs -c glib/System/Glib.hs -o glib/System/Glib.o -O -fffi -iglib -package-conf package.conf.inplace -hide-all-packages -ignore-package glib -package base -package-name glib-0.9.13 '-#include
' -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2
On Fri, Mar 20, 2009 at 2:27 PM, Ross Mellgren
wrote: While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess..
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
-Ross
On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie:
On 20 Mar 2009, at 18:46, Don Stewart wrote:
> tom.davie: >> >> On 20 Mar 2009, at 18:08, Don Stewart wrote: >> >>> tom.davie: >>>> >>>> Other than chose the graphics card carefully, an iMac will do you >>>> very well. >>>> >>>> Hope that helps. >>> >>> This is very useful. >>> >>> Could the Mac users add information (and screenshots?) to the OSX >>> wiki >>> page, >>> >>> http://haskell.org/haskellwiki/OSX >> >> I'm not really sure there's much to add. It mostly just works™. >> >> Is there something that can be extracted from this discussion to add >> to >> it? > > Imagine you're new to Haskell, or the Mac. What do you need to know > to > get started developing new Haskell software? Is that information on > the > page?
Thankfully, yes, all you need to know are either (a) go to haskell.org and download it, or (b) download macports, and port install ghc... Now you've got a Haskell environment like any other.
I guess I could add a chunk of text about good editors, but I'm not sure if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Good to hear you're shipping graphical Haskell apps, Jefferson. Well done. We do have tools for packaging for various distros: * Mac OSX: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mkbndl * Windows http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bamse * Linux http://hackage.haskell.org/packages/archive/pkg-list.html#cat:distribution * cabal-rpm * cabal2arch * cabalmdvrpm * hackport * hslackbuilder I'm not sure that anyone's attempted to write a tutorial on taking an arbitrary cabalized application, and generating shippable installers for the major systems, but we're close. bamse is used by Galois, afaik, for some of our windows applications. -- Don jefferson.r.heard:
As this continues to build, I guess the issue for me, and I'm willing to help with it, is trying to figure out how to redistribute programs written with gtk2hs. on Windows, people can just install the gtk2hs libraries via the installer -- although this does bork a little because it assumes you have a haskell compiler on the machine. Ignoring the errors, however, works. I don't see a similar situation on Mac OS.
If I wanted to package an application, which I often do, because firefighters, police officers, and emergency managers (my research currently targets these people, and we're actually beginning to really deploy our apps) don't have the time nor inclination to compile programs on their machines, I can basically just hope they're running windows. It'd be nice if there was a binary "redistributable" on windows that doesn't generate errors because of no haskell compiler installed and a similar package on OS X that includes the X11 Gtk binaries and precompiled Gtk2Hs binaries.
I guess I just don't know yet how to package things for OS X or find everything I'd need to find to build a redistributable image in the first place. I haven't yet drunk the coolade on the whole Mac development process, having sidestepped the normal process by being a Haskell developer. I'm sure they have standard procedures for finding and packaging libraries.
-- Jeff
On Fri, Mar 20, 2009 at 3:06 PM, Ross Mellgren
wrote: Ah, true. Sorry, my mistake -- I forgot that wasn't supported with the framework version.
-Ross
On Mar 20, 2009, at 2:56 PM, Jeff Heard wrote:
That one doesn't work with OpenGL, however and won't in the forseeable future. Incidentally, just now doing a ports install gtk2hs gives me the following error on my brand new MacBook:
$ sudo port install gtk2hs
... stuff happens normally ... then:
opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) /opt/local/bin/ghc +RTS -RTS -c tools/callbackGen/HookGenerator.hs -o tools/callbackGen/HookGenerator.o -O -I. -itools/callbackGen -package-conf package.conf.inplace -hide-all-packages -package base package.conf.inplace: openBinaryFile: does not exist (No such file or directory) rm -rf glib/System/Glib.o glib/System/Glib_split/; mkdir -p glib/System/Glib_split /opt/local/bin/ghc +RTS -RTS -split-objs -c glib/System/Glib.hs -o glib/System/Glib.o -O -fffi -iglib -package-conf package.conf.inplace -hide-all-packages -ignore-package glib -package base -package-name glib-0.9.13 '-#include
' -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2
On Fri, Mar 20, 2009 at 2:27 PM, Ross Mellgren
wrote: While there is not a .dmg for Gtk2Hs, you can use a .dmg installed GHC with a .dmg installed Gtk, and then build gtk2hs straight on top of that, without having to deal with the dual-GHC macports mess..
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
-Ross
On Mar 20, 2009, at 2:10 PM, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X. There exists a ports build for it, but it won't use the GHC that is installed via .dmg to build it - it insists instead on installing ghc again via ports, which I find both odd and undesirable. It really comes down to the fact that gtk2hs is the only thing in the haskellverse that requires ports to get compiled in an intuitive way.
On Fri, Mar 20, 2009 at 1:51 PM, Don Stewart
wrote: tom.davie: > > On 20 Mar 2009, at 18:46, Don Stewart wrote: > >> tom.davie: >>> >>> On 20 Mar 2009, at 18:08, Don Stewart wrote: >>> >>>> tom.davie: >>>>> >>>>> Other than chose the graphics card carefully, an iMac will do you >>>>> very well. >>>>> >>>>> Hope that helps. >>>> >>>> This is very useful. >>>> >>>> Could the Mac users add information (and screenshots?) to the OSX >>>> wiki >>>> page, >>>> >>>> http://haskell.org/haskellwiki/OSX >>> >>> I'm not really sure there's much to add. It mostly just works™. >>> >>> Is there something that can be extracted from this discussion to add >>> to >>> it? >> >> Imagine you're new to Haskell, or the Mac. What do you need to know >> to >> get started developing new Haskell software? Is that information on >> the >> page? > > Thankfully, yes, all you need to know are either (a) go to haskell.org > and download it, or (b) download macports, and port install ghc... Now > you've got a Haskell environment like any other. > > I guess I could add a chunk of text about good editors, but I'm not > sure > if that's suitable, is it?
Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

dons:
Good to hear you're shipping graphical Haskell apps, Jefferson. Well done.
We do have tools for packaging for various distros:
* Mac OSX: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mkbndl
* Windows http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bamse
* Linux http://hackage.haskell.org/packages/archive/pkg-list.html#cat:distribution * cabal-rpm * cabal2arch * cabalmdvrpm * hackport * hslackbuilder
And also for .deb bundles. http://haskell.org/haskellwiki/Creating_Debian_packages_from_Cabal_package

Don, good to know; I hadn't checked for packaging tools outside of
cabal in Hackage :)
2009/3/20 Don Stewart
dons:
Good to hear you're shipping graphical Haskell apps, Jefferson. Well done.
We do have tools for packaging for various distros:
* Mac OSX: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mkbndl
* Windows http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bamse
* Linux http://hackage.haskell.org/packages/archive/pkg-list.html#cat:distribution * cabal-rpm * cabal2arch * cabalmdvrpm * hackport * hslackbuilder
And also for .deb bundles.
http://haskell.org/haskellwiki/Creating_Debian_packages_from_Cabal_package

Hello Jeff, Friday, March 20, 2009, 10:22:35 PM, you wrote:
As this continues to build, I guess the issue for me, and I'm willing to help with it, is trying to figure out how to redistribute programs written with gtk2hs. on Windows, people can just install the gtk2hs libraries via the installer -- although this does bork a little because it assumes you have a haskell compiler on the machine. Ignoring the errors, however, works.
i distribute my gtk2hs program for windows and linux. no problems, i just included runtime libraries provided by gtk2hs team. it was with gtk2hs 0.9.12.1 though, may be they don't provided updated archive for newer gtk2hs versions? -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

bulat.ziganshin:
Hello Jeff,
Friday, March 20, 2009, 10:22:35 PM, you wrote:
As this continues to build, I guess the issue for me, and I'm willing to help with it, is trying to figure out how to redistribute programs written with gtk2hs. on Windows, people can just install the gtk2hs libraries via the installer -- although this does bork a little because it assumes you have a haskell compiler on the machine. Ignoring the errors, however, works.
i distribute my gtk2hs program for windows and linux. no problems, i just included runtime libraries provided by gtk2hs team. it was with gtk2hs 0.9.12.1 though, may be they don't provided updated archive for newer gtk2hs versions?
Awesome! Do you have a URL? -- Don

Hello Don, Saturday, March 21, 2009, 12:06:48 AM, you wrote:
i distribute my gtk2hs program for windows and linux. no problems, i just included runtime libraries provided by gtk2hs team. it was with gtk2hs 0.9.12.1 though, may be they don't provided updated archive for newer gtk2hs versions?
Awesome! Do you have a URL?
http://freearc.org btw, it have 35.000 downloads ATM -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

bulat.ziganshin:
Hello Don,
Saturday, March 21, 2009, 12:06:48 AM, you wrote:
i distribute my gtk2hs program for windows and linux. no problems, i just included runtime libraries provided by gtk2hs team. it was with gtk2hs 0.9.12.1 though, may be they don't provided updated archive for newer gtk2hs versions?
Awesome! Do you have a URL?
btw, it have 35.000 downloads ATM
Awesome, and congratulations! I wonder: have you thought about adding a cabal file, so we can package it automatically for all the Linux distros? Then you'd have access to the distro packaging teams to help disperse the code. -- Don

Don Stewart
bulat.ziganshin:
btw, it have 35.000 downloads ATM
Awesome, and congratulations!
I wonder: have you thought about adding a cabal file, so we can package it automatically for all the Linux distros? Then you'd have access to the distro packaging teams to help disperse the code.
A graphical frontend for a packer, under unix? Heresy! -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.

On Fri, 2009-03-20 at 15:22 -0400, Jeff Heard wrote:
As this continues to build, I guess the issue for me, and I'm willing to help with it, is trying to figure out how to redistribute programs written with gtk2hs. on Windows, people can just install the gtk2hs libraries via the installer -- although this does bork a little because it assumes you have a haskell compiler on the machine.
It's quite possible to make a Windows installer that just bundles the Gtk+ dlls and does not need ghc etc. For example, here's a demo: http://haskell.org/~duncan/gtk2hs/LSystemSetup.exe It's an installer (built using InnoSetup - which is Free software) for a Haskell program that uses gtk2hs and opengl. It installs on a clean machine, no gtk2hs or ghc is required. Constructing such an installer is not hard. The zip files containing all the necessary gtk dlls are available so it's just a matter of the installing them all along with your application .exe file. Duncan

"Ross" == Ross Mellgren
writes:
Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess.. Ross> http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework I just tried this. The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire

I tried making this work, but librsvg requires pango, and pango is a huge pain in the ass -- I managed to get the whole thing to compile, but now it can't find any fonts, apparently due to some dynaloading issues. I think if you need any of the extended modules (e.g. svgcairo, gl) that the DMG doesn't directly support then you're best served by shedding a couple tears and going with macports. The steps I used to get the broken version were (FYI -- doing this causes all fonts to load as the no-character square in all gtk2hs apps): export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/ pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/ pkgconfig:/Library/Frameworks/GLib.framework/Resources/dev/lib/ pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig export PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/dev/bin cd pango-1.24.0 CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure --prefix=/usr/local make -j4 sudo make install cd librsvg-2.26.0 ./configure --prefix=/usr/local make -j4 sudo make install cd gtk2hs-0.10.0 ./configure --disable-gio make -j4 sudo make install Running apps linked with this version of gtk2hs gets: (svgviewer:43314): Pango-CRITICAL **: No modules found: No builtin or dynamically loaded modules were found. PangoFc will not work correctly. This probably means there was an error in the creation of: '/usr/local/etc/pango/pango.modules' You should create this file by running: pango-querymodules > '/usr/local/etc/pango/pango.modules' (svgviewer:43314): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderATSUI', script='latin' So if anyone knows what Pango is trying to do, maybe they could help resolve this. I'm probably going to ditch the use of GTK in my own project and use FFI bindings to Carbon/Win32, since I don't really need widgets for my own stuff and the whole family of GTK related packages is a total pain in the ass (as are most things in the GNU family of software, IMO) -Ross On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
"Ross" == Ross Mellgren
writes: Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess..
Ross> http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire

Minor correction -- pango in general is installed with the .DMG of Gtk... it's pangoft2 (the freetype2 bindings) that librsvg requires and aren't provided. -Ross On Mar 21, 2009, at 12:35 PM, Ross Mellgren wrote:
I tried making this work, but librsvg requires pango, and pango is a huge pain in the ass -- I managed to get the whole thing to compile, but now it can't find any fonts, apparently due to some dynaloading issues.
I think if you need any of the extended modules (e.g. svgcairo, gl) that the DMG doesn't directly support then you're best served by shedding a couple tears and going with macports.
The steps I used to get the broken version were (FYI -- doing this causes all fonts to load as the no-character square in all gtk2hs apps):
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/ pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/ pkgconfig:/Library/Frameworks/GLib.framework/Resources/dev/lib/ pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/ pkgconfig
export PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/dev/bin
cd pango-1.24.0 CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure --prefix=/usr/local make -j4 sudo make install
cd librsvg-2.26.0 ./configure --prefix=/usr/local make -j4 sudo make install
cd gtk2hs-0.10.0 ./configure --disable-gio make -j4 sudo make install
Running apps linked with this version of gtk2hs gets:
(svgviewer:43314): Pango-CRITICAL **: No modules found: No builtin or dynamically loaded modules were found. PangoFc will not work correctly. This probably means there was an error in the creation of: '/usr/local/etc/pango/pango.modules' You should create this file by running: pango-querymodules > '/usr/local/etc/pango/pango.modules'
(svgviewer:43314): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderATSUI', script='latin'
So if anyone knows what Pango is trying to do, maybe they could help resolve this.
I'm probably going to ditch the use of GTK in my own project and use FFI bindings to Carbon/Win32, since I don't really need widgets for my own stuff and the whole family of GTK related packages is a total pain in the ass (as are most things in the GNU family of software, IMO)
-Ross
On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
> "Ross" == Ross Mellgren
writes: Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess..
Ross> http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

If I try this, pango fails to compile with lots of error messages
about error: macro names must be identifiers.
I think I've seen this before - some well-known Mac OSX problem? (I'm
a linux man myself - so I'm not used to the mac)
2009/3/21 Ross Mellgren
I tried making this work, but librsvg requires pango, and pango is a huge pain in the ass -- I managed to get the whole thing to compile, but now it can't find any fonts, apparently due to some dynaloading issues.
I think if you need any of the extended modules (e.g. svgcairo, gl) that the DMG doesn't directly support then you're best served by shedding a couple tears and going with macports.
The steps I used to get the broken version were (FYI -- doing this causes all fonts to load as the no-character square in all gtk2hs apps):
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig
export PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/dev/bin
cd pango-1.24.0 CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure --prefix=/usr/local make -j4 sudo make install
cd librsvg-2.26.0 ./configure --prefix=/usr/local make -j4 sudo make install
cd gtk2hs-0.10.0 ./configure --disable-gio make -j4 sudo make install
Running apps linked with this version of gtk2hs gets:
(svgviewer:43314): Pango-CRITICAL **: No modules found: No builtin or dynamically loaded modules were found. PangoFc will not work correctly. This probably means there was an error in the creation of: '/usr/local/etc/pango/pango.modules' You should create this file by running: pango-querymodules > '/usr/local/etc/pango/pango.modules'
(svgviewer:43314): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderATSUI', script='latin'
So if anyone knows what Pango is trying to do, maybe they could help resolve this.
I'm probably going to ditch the use of GTK in my own project and use FFI bindings to Carbon/Win32, since I don't really need widgets for my own stuff and the whole family of GTK related packages is a total pain in the ass (as are most things in the GNU family of software, IMO)
-Ross
On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
> "Ross" == Ross Mellgren
writes: Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess..
Ross> http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I didn't get any errors like that (nor do I remember ever having them), though if you want to paste them here maybe I can help with them. -Ross On Mar 21, 2009, at 1:27 PM, Colin Adams wrote:
If I try this, pango fails to compile with lots of error messages about error: macro names must be identifiers.
I think I've seen this before - some well-known Mac OSX problem? (I'm a linux man myself - so I'm not used to the mac)
2009/3/21 Ross Mellgren
: I tried making this work, but librsvg requires pango, and pango is a huge pain in the ass -- I managed to get the whole thing to compile, but now it can't find any fonts, apparently due to some dynaloading issues.
I think if you need any of the extended modules (e.g. svgcairo, gl) that the DMG doesn't directly support then you're best served by shedding a couple tears and going with macports.
The steps I used to get the broken version were (FYI -- doing this causes all fonts to load as the no-character square in all gtk2hs apps):
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/ Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig:/ Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/ Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig
export PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/dev/ bin
cd pango-1.24.0 CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure --prefix=/usr/local make -j4 sudo make install
cd librsvg-2.26.0 ./configure --prefix=/usr/local make -j4 sudo make install
cd gtk2hs-0.10.0 ./configure --disable-gio make -j4 sudo make install
Running apps linked with this version of gtk2hs gets:
(svgviewer:43314): Pango-CRITICAL **: No modules found: No builtin or dynamically loaded modules were found. PangoFc will not work correctly. This probably means there was an error in the creation of: '/usr/local/etc/pango/pango.modules' You should create this file by running: pango-querymodules > '/usr/local/etc/pango/pango.modules'
(svgviewer:43314): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderATSUI', script='latin'
So if anyone knows what Pango is trying to do, maybe they could help resolve this.
I'm probably going to ditch the use of GTK in my own project and use FFI bindings to Carbon/Win32, since I don't really need widgets for my own stuff and the whole family of GTK related packages is a total pain in the ass (as are most things in the GNU family of software, IMO)
-Ross
On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
>> "Ross" == Ross Mellgren
writes: Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess..
Ross> http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

In file included from ../pango/pango.h:31,
from pango-impl-utils.h:28,
from fonts.c:30:
../pango/pango-enum-types.h:12:9: error: macro names must be identifiers
../pango/pango-enum-types.h:14:9: error: macro names must be identifiers
../pango/pango-enum-types.h:17:9: error: macro names must be identifiers
../pango/pango-enum-types.h:19:9: error: macro names must be identifiers
../pango/pango-enum-types.h:22:9: error: macro names must be identifiers
../pango/pango-enum-types.h:25:9: error: macro names must be identifiers
../pango/pango-enum-types.h:27:9: error: macro names must be identifiers
../pango/pango-enum-types.h:29:9: error: macro names must be identifiers
../pango/pango-enum-types.h:31:9: error: macro names must be identifiers
../pango/pango-enum-types.h:33:9: error: macro names must be identifiers
../pango/pango-enum-types.h:36:9: error: macro names must be identifiers
../pango/pango-enum-types.h:38:9: error: macro names must be identifiers
../pango/pango-enum-types.h:41:9: error: macro names must be identifiers
../pango/pango-enum-types.h:43:9: error: macro names must be identifiers
../pango/pango-enum-types.h:45:9: error: macro names must be identifiers
../pango/pango-enum-types.h:48:9: error: macro names must be identifiers
../pango/pango-enum-types.h:51:9: error: macro names must be identifiers
../pango/pango-enum-types.h:54:9: error: macro names must be identifiers
In file included from ../pango/pango.h:31,
from pango-impl-utils.h:28,
from glyphstring.c:26:
../pango/pango-enum-types.h:12:9: error: macro names must be identifiers
../pango/pango-enum-types.h:14:9: error: macro names must be identifiers
../pango/pango-enum-types.h:17:9: error: macro names must be identifiers
../pango/pango-enum-types.h:19:9: error: macro names must be identifiers
../pango/pango-enum-types.h:22:9: error: macro names must be identifiers
../pango/pango-enum-types.h:25:9: error: macro names must be identifiers
../pango/pango-enum-types.h:27:9: error: macro names must be identifiers
../pango/pango-enum-types.h:29:9: error: macro names must be identifiers
../pango/pango-enum-types.h:31:9: error: macro names must be identifiers
../pango/pango-enum-types.h:33:9: error: macro names must be identifiers
../pango/pango-enum-types.h:36:9: error: macro names must be identifiers
../pango/pango-enum-types.h:38:9: error: macro names must be identifiers
../pango/pango-enum-types.h:41:9: error: macro names must be identifiers
../pango/pango-enum-types.h:43:9: error: macro names must be identifiers
../pango/pango-enum-types.h:45:9: error: macro names must be identifiers
../pango/pango-enum-types.h:48:9: error: macro names must be identifiers
../pango/pango-enum-types.h:51:9: error: macro names must be identifiers
../pango/pango-enum-types.h:54:9: error: macro names must be identifiers
2009/3/21 Ross Mellgren
I didn't get any errors like that (nor do I remember ever having them), though if you want to paste them here maybe I can help with them.
-Ross
On Mar 21, 2009, at 1:27 PM, Colin Adams wrote:
If I try this, pango fails to compile with lots of error messages about error: macro names must be identifiers.
I think I've seen this before - some well-known Mac OSX problem? (I'm a linux man myself - so I'm not used to the mac)
2009/3/21 Ross Mellgren
: I tried making this work, but librsvg requires pango, and pango is a huge pain in the ass -- I managed to get the whole thing to compile, but now it can't find any fonts, apparently due to some dynaloading issues.
I think if you need any of the extended modules (e.g. svgcairo, gl) that the DMG doesn't directly support then you're best served by shedding a couple tears and going with macports.
The steps I used to get the broken version were (FYI -- doing this causes all fonts to load as the no-character square in all gtk2hs apps):
export
PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig
export PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/dev/bin
cd pango-1.24.0 CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure --prefix=/usr/local make -j4 sudo make install
cd librsvg-2.26.0 ./configure --prefix=/usr/local make -j4 sudo make install
cd gtk2hs-0.10.0 ./configure --disable-gio make -j4 sudo make install
Running apps linked with this version of gtk2hs gets:
(svgviewer:43314): Pango-CRITICAL **: No modules found: No builtin or dynamically loaded modules were found. PangoFc will not work correctly. This probably means there was an error in the creation of: '/usr/local/etc/pango/pango.modules' You should create this file by running: pango-querymodules > '/usr/local/etc/pango/pango.modules'
(svgviewer:43314): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderATSUI', script='latin'
So if anyone knows what Pango is trying to do, maybe they could help resolve this.
I'm probably going to ditch the use of GTK in my own project and use FFI bindings to Carbon/Win32, since I don't really need widgets for my own stuff and the whole family of GTK related packages is a total pain in the ass (as are most things in the GNU family of software, IMO)
-Ross
On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
>>> "Ross" == Ross Mellgren
writes: Ross> While there is not a .dmg for Gtk2Hs, you can use a .dmg Ross> installed GHC with a .dmg installed Gtk, and then build Ross> gtk2hs straight on top of that, without having to deal with Ross> the dual-GHC macports mess..
Ross>
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable svgcairo. Is there anyway round this, or do I have to revert to the macports gtk? (my application uses svgcairo) -- Colin Adams Preston Lancashire
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, 2009-03-20 at 14:10 -0400, Jeff Heard wrote:
cabal-install works for me. The one thing that would be REALLY REALLY nice (and I'm cc-ing Duncan on this) is a .dmg for Gtk2Hs on Mac OS X.
I'm sorry I can't directly help with this. I have no access to any hardware running OS X. I presume you've also asked on the gtk2hs-users mailing list? Duncan

Yes, anything that is relevant to the development experience on this platform. Remember: it is more than just getting ghc. How do they get hold of new libraries and apps? Is cabal-install available?
I would be wondering about OS-specific functionality. For example, it might be worth mentioning HOC. Donn Cave, donn@avvanta.com
participants (15)
-
Achim Schneider
-
Brandon S. Allbery KF8NH
-
Bulat Ziganshin
-
Colin Adams
-
Colin Paul Adams
-
David Leimbach
-
Don Stewart
-
Donn Cave
-
Duncan Coutts
-
Hans Aberg
-
Jeff Heard
-
Martijn van Steenbergen
-
Miguel Mitrofanov
-
Ross Mellgren
-
Thomas Davie