I'm trying to build Yi (from the darcs repository) to take a look at it. The README that comes with it says "it's a standard Cabal project so do what you normally do" (paraphrased slightly). The problem is that I'm not a cabal user just yet and have no idea where to go from here. Just throwing caution to the wind and typing "make" built a setup program which was then executed and failed complaining about not having yi-lib0.3 (which I kind of thought the project should be building for me) and such. Editing the config.mk (which has some options left almost entirely undocumented) got me a step farther (specifically giving it a prefix that actually existed), but then had it choking out that it couldn't find the vty library -- even when I specifically told it to build the gtk version. Is there some painfully obvious thing I'm missing in trying to build this? And is it something that's applicable in the broader Cabal world or is it just this project? Compiling GHC (which is a lot bigger and more complex, I'd have guessed) was painless in comparison, so I'm kind of in the dark here. -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) If there's one thing that computers do well, it's to make the same mistake uncountable times at inhuman speed. (Peter Coffee)
I'm trying to build Yi (from the darcs repository) to take a look at it. The README that comes with it says "it's a standard Cabal project so do what you normally do" (paraphrased slightly). The problem is that I'm not a cabal user just yet and have no idea where to go from here.
The standard cabal usage is: runhaskell Setup.hs configure runhaskell Setup.hs build runhaskell Setup.hs install http://www.haskell.org/haskellwiki/How_to_install_a_Cabal_package Alistair
On Sun, 2007-17-06 at 08:18 +0100, Alistair Bayley wrote:
I'm trying to build Yi (from the darcs repository) to take a look at it. The README that comes with it says "it's a standard Cabal project so do what you normally do" (paraphrased slightly). The problem is that I'm not a cabal user just yet and have no idea where to go from here.
The standard cabal usage is: runhaskell Setup.hs configure runhaskell Setup.hs build runhaskell Setup.hs install
http://www.haskell.org/haskellwiki/How_to_install_a_Cabal_package
Alistair
I eventually hit that Wiki and still had no joy. On a clean darcs get: ---8<--- $ runhaskell Setup.hs build "/usr/local/share/yi-0.3" Preprocessing executables for yi-0.3... Building yi-0.3... [1 of 4] Compiling Yi.Kernel ( Yi/Kernel.hs, dist/build/yi/yi-tmp/Yi/Kernel.o ) [2 of 4] Compiling Yi.Debug ( Yi/Debug.hs, dist/build/yi/yi-tmp/Yi/Debug.o ) [3 of 4] Compiling Yi.Boot ( Yi/Boot.hs, dist/build/yi/yi-tmp/Yi/Boot.o ) [4 of 4] Compiling Main ( Main.hs, dist/build/yi/yi-tmp/Main.o ) Linking dist/build/yi/yi ... Precompiling vty Yi/Vty.hs:10:7: Could not find module `Graphics.Vty': Use -v to see a list of the files searched for. Precompile of vty failed. Install the corresponding library if needed. Precompiling gtk Yi/Vty.hs:10:7: Could not find module `Graphics.Vty': Use -v to see a list of the files searched for. Precompile of gtk failed. Install the corresponding library if needed. ---8<--- Now I know that gtk is installed, given that I'm able to build gtk2hs (or at least was able to -- I haven't tried it with GHC 6.6.1 yet). I have no idea what Vty is, so I don't know how to solve this problem. I am interested in why the gtk build is looking for what appears to be a console library, however. Any further guidance? -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) Experts in advanced countries underestimate by a factor of two to four the ability of people in underdeveloped countries to do anything technical. (Charles P Issawi)
Michael T. Richter <ttmrichter <at> gmail.com> writes: I am Yi maintainer, and therefore responsible for this mess :) The Yi build is rather involved (due among others to its dynamic nature), and to make things worse, the build procedure is not up to date. I'm working on simplifying things though. Your problem apparently is that I've made the GTK build depending on Vty (accidentally). I'm going to fix this and contact you when it's done. Incidentally I've created a mailing list for discussing this sort of issues: http://groups.google.com/group/yi-devel Cheers, JP.
Michael T. Richter:
I'm trying to build Yi (from the darcs repository) to take a look at it.
I tried that, too, and it seems to me that if you use a different GHC version than the developers have, you're very likely to be struck. (Now how will I know what version they use?)
The README that comes with it says "it's a standard Cabal project so do what you normally do" (paraphrased slightly).
That seems to be a README bug. The following steps seem to be necessary: cd packages/yi-lib/ runghc Setup.hs configure runghc Setup.hs build sudo runghc Setup.hs install cd ../.. runghc Setup.hs configure runghc Setup.hs build You will need specific filepath and Vty libraries, as stated in the Readme.
OK, got the builds to work. I did, in fact, have to go two layers down to build yi-lib and install it before building yi proper. (I think this needs to be updated in the docs or repaired, whichever is appropriate.) So, I have a Yi build. I type "Yi" and it... dies. It complains about not having a YiConfig.hs and suggests something to read. (I like this touch, actually.) And, unlike, say, emacs, it tells you how to exit. So I copy the examples/YiConfig.hs to ~/.yi and try again. I'll let the console speak for itself: /home/michael/.yi/YiConfig.hs:15:2: Couldn't match expected type `GHC.IOBase.IORef Editor' ^I against inferred type `Yi' Expected type: Control.Monad.Reader.ReaderT (GHC.IOBase.IORef Editor) ^I^I^I^I^I^I IO ^I^I^I^I^I^I t Inferred type: Action In the expression: changeKeymapE myKeymap In a 'do' expression: changeKeymapE myKeymap This is the stock YiConfig.hs left completely untouched and boilerplate. What's the next step? (Running yi --as=whatever doesn't help either. Same errors.) -- Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com) Our outrage at China notwithstanding, we should remember that before 1891 the copyrights of foreigners were not protected in the United States. (Lawrence Lessig)
Michael T. Richter <ttmrichter <at> gmail.com> writes:
OK, got the builds to work. I did, in fact, have to go two layers down to build yi-lib and install it before building yi proper. (I think this needs to be updated in the docs or repaired, whichever is appropriate.)
Please provide (doc) patches. :)
This is the stock YiConfig.hs left completely untouched and boilerplate. What's the next step? (Running yi --as=whatever doesn't help either. Same errors.)
I forgot to update the sample YiConfig.hs after a change I made; please pull the latest patches and copy YiConfig.hs to ~/.yi This should fix the problem. Thanks for trying Yi! JP.
On Sunday 17 June 2007 08:26:45 Michael T. Richter wrote:
I'm trying to build Yi (from the darcs repository) to take a look at it. The README that comes with it says "it's a standard Cabal project so do what you normally do" (paraphrased slightly).
GNU autotools comes with a standard boilerplate INSTALL file to include with your projects. There is some command you run in the process of autoconfiscation that inserts it automatically. Maybe there should be a standard boilerplate INSTALL file to be included with Cabal packages. Yesterday, I wrote and uploaded a simple Cabal package called csv (mostly as an exercise, since it's only a screenful of code, really, but it is actually a somewhat useful library because it saves you the trouble of reading an RFC). I included the following INSTALL file:
To install the package, use the standard Cabal incantations:
runhaskell Setup.hs configure runhaskell Setup.hs build runhaskell Setup.hs install
If you want to install into a nonstandard directory, do
runhaskell Setup.hs configure --prefix /bla/di/bla
If you want documentation, try
runhaskell Setup.hs haddock
I think that simply adding those instructions would probably lower the hurdle a bit. Maybe the Cabal could look into automatically inserting an instructions file like that if it doesn't exist yet. Another idea for making things more accessible is to include a shell script called configure and a Makefile called Makefile, both of which just print the above instructions when executed. /jaap
On 18 jun 2007, at 18.31, Jaap Weel wrote:
If you want to install into a nonstandard directory, do
runhaskell Setup.hs configure --prefix /bla/di/bla
Are you sure this works? I think it is important that there be no whitespace between flag and parameter:
runhaskell Setup.hs configure --prefix=/bla/di/bla
/ Thomas
participants (6)
-
Alistair Bayley -
Jaap Weel -
Jean-Philippe Bernardy -
Malte Milatz -
Michael T. Richter -
Thomas Schilling