(Edited cabal instructions to no longer require downloading tarball+editing leksah.cabal)
m (→Install gtk2hs)
|(One intermediate revision by one user not shown)|
Latest revision as of 11:23, 8 April 2011
First look to the general information in the Manual.
When you get the following error:
src/IDE/Completion.hs:87:26: Not in scope: `sourceLanguageManagerGuessLanguage'</code>
you have to install gtksourceview2 in a version > 2.4.0
When you get the following error:
Linking dist/build/leksah/leksah ... /usr/bin/ld: cannot find -ledit collect2: ld returned 1 exit status</code>
you have to install libedit development files.
The package type-level considered toxic! This package defines > 20000 newtypes for numbers and wastes a lot of space for metadata. So consider to unregister it, if you don't really need it.
 1 Installation of 0.6.1 on Windows from binary
 2 Installation of 0.4.3 on Windows (Vista) from scratch
In the future when Leksah reaches production quality I hope we can provide a Windows installer.
0. cabal-install was not working for me. Probably because currently there is no gtk2hs >= 0.10.0 on Hackage right now.
1. Install your GHC from http://www.haskell.org/ghc. Duh. Mine was GHC 6.10.1.
3. Install Cygwin with the online installer from http://www.cygwin.com/ Select packages wget, curl and gcc-core in adition to the standard selection. I used the 1.7.0 version of Cygwin setup, but it is still beta.
4*. Download darcs from http://wiki.darcs.net/DarcsWiki/Binaries, unpack it in under Program Files and add the path to your environment variables. The file I downloaded was darcsdir-cygwin-2.2.0.tar.bz2.
5. Download the GHC sources from http://www.haskell.org/ghc. Open a Cygwin shell, make a directory Haskell, copy the source tarballs here and unpack them.
6*. Download the binary and utf-8 packages from Hackage and copy them to the Haskell folder. Open a Cygwin shell in Administrator mode and unpack the tar files. Go to the directories and do runhaskell Setup configure, runhaskell Setup build, runhaskell Setup install.
7*. In the Haskell directory do a darcs get http://code.haskell.org/leksah. Go to the leksah directory and do a runhaskell Setup configure, runhaskell Setup build, runhaskell Setup install.
7a) Although I probably didn't get this, previously some gtk error message was resolved by editting C:/Program Files/Gtk2Hs/0.10.0/etc/gtk-2.0/gtkrc and change the theme name from MS-Windows to Raleigh: gtk-theme-name = "Raleigh"
8. You may wish to install a full Unicode monospace font if you want to use the source candy feature of leksah. e.g. Everson Mono or Deja Vu Sans Mono (or perhaps the GNU FreeFonts which are aesthetically pleasing to my eyes).
9. Start leksah and give your Haskell directory as source root. Select the right font from Help/Prefs.
10. Have fun with leksah, but remember it is a beta version!
NB* I actually experienced a bit of a problem here, darcs was taking too much time. While in Cygwin, I cabal-installed it! Voila! So the starred portions are actually unnecessary, I think.
 3 Installation of 0.6.1 on Ubuntu 9.04
Built in Ubuntu 9.04 using GHC 6.10.4 from Someone561's PPA. cabal-install was bootstrapped using original ghc from the distribution, because of dependency problems. GHC 6.10.4 was installed afterwards.
 3.1 Install cabal-install from CabalInstall
 3.2 Upgrade GHC to 6.10.4
 3.3 Install gtk2hs
$ sudo aptitude build-dep libghc6-gtk-dev $ sudo aptitude install libgtk2.0-dev libgtksourceview2.0-dev libcairo2-dev checkinstall
in gtk2hs sources:
$ ./configure $ make $ checkinstall
(say 'n' to question about making docs. checkinstall makes a deb package gtk2hs that could be easily uninstalled - normally you could do make install)
 3.4 Install Leksah using cabal
$ cd ~/.cabal/bin $ ./cabal update $ ./cabal install leksah Resolving dependencies... cabal: cannot configure regex-compat-0.92. It requires regex-base >=0.93 For the dependency on regex-base >=0.93 there are these packages: regex-base-0.93 and regex-base-0.93.1. However none of them are available. regex-base-0.93 was excluded because regex-base-0.72.0.2 was selected instead regex-base-0.93 was excluded because leksah-0.6.0 requires regex-base ==0.72.0.2 regex-base-0.93.1 was excluded because regex-base-0.72.0.2 was selected instead regex-base-0.93.1 was excluded because leksah-0.6.1 requires regex-base 0.72.0.2
To solve these dependency problems, we need to add some constraints to the installation process like so:
$ ~/.cabal/bin/cabal install --constraint='regex-posix ==0.72.0.3' --constraint='regex-compat ==0.71.0.1' leksah
 3.5 running the IDE
Leksah should now work. If you have problems running with config from older version, consider removing the old configuration:
$ rm ~/.leksah -r
To start the IDE:
$ export PATH=$PATH:~/.cabal/bin $ leksah
 4 Installation of 0.4.4.1 on Ubuntu 8.10
Hello, I've installed Leksah 0.4.4.1 today in Ubuntu 8.10. This procedure is based on the one given in the manual, but uses GHC 6.10.2. Hope it will be useful. (Maciej Noszczyński)
# compile ghc 6.10.2
sudo aptitude build-dep ghc6
tar jxf ghc-6.10.2-src.tar.bz2
tar jxf ghc-6.10.2-src-extralibs.tar.bz2
./configure --prefix ~/ghc
# cleanup and setup paths
sudo aptitude remove ghc6
(you should put this export into some startup file e.g. .bash_profile
and source it when needed)
# gtk2hs from darcs (> 0.10.0) is needed for 6.10.2
sudo aptitude install darcs
darcs get --partial http://code.haskell.org/gtk2hs/
aptitude install happy alex libglib2.0-dev libgtk2.0-dev
libgtksourceview2.0-dev libgmp3-dev autoconf libtool
sudo make install
# cabal install
tar zxf cabal-install-0.6.2.tar.gz
# build and install Leksah
tar zxf leksah-0.4.4.1.tar.gz
mv leksah.cabal leksah.cabal.old
sed -e 's/Cabal ==184.108.40.206/Cabal >=220.127.116.11/g' leksah.cabal.old > leksah.cabal
cabal install binary
cabal install utf8-string
runhaskell Setup configure --user
runhaskell Setup build
runhaskell Setup install
# run the IDE
 5 Running
To run Leksah after installation using cabal, you could use this simple script:
export PATH=$PATH:~/.cabal/bin leksah &> ~/leksah.log
Leksah outputs quite a lot of useful information to stdout at the moment, so it might be useful to watch the log by issuing
$ tail -f ~/leksah.log
in the terminal window.
If you want a nice icon for graphical environment shortcut, you could use data/leksah.png.
WARNING: Running leksah 0.6.1 from GNOME accelerator without terminal seemed to crash the whole X session for me (MNo) after a while of editing. If you have the same problem, you might be better off without output redirection ("&> ~/leksah.log") and setting accelerator type to "terminal program".