Difference between revisions of "Yi/FAQ"
< Yi
Jump to navigation
Jump to search
(clariy the clarification) |
(merge in the other FAQS) |
||
Line 14: | Line 14: | ||
:it means that you have no UI package available. You need vty or gtk2hs installed. Get them from hackage. |
:it means that you have no UI package available. You need vty or gtk2hs installed. Get them from hackage. |
||
+ | *On Mac OS X if you get an error message similar to this: |
||
+ | yi: can't load .so/.DLL for: gthread-2.0 (dlopen(libgthread-2.0.dylib, 10): image not found) |
||
+ | |||
+ | :then your dynamic library search path variable is probably not set correctly. You can set it (in bash) using: |
||
+ | |||
+ | export DYLD_LIBRARY_PATH=/opt/local/lib |
||
+ | |||
+ | :(Adjust the specific path to your system. You can find the right location using <tt>locate libgthread</tt>) |
||
+ | |||
+ | *ByteString problems: Yi as of 27 January 2008 cannot use the most recent ByteString library (because of the regexp libraries) which is 0.9.0.4 - it needs a version like 0.9 or 0.9.0.1. You may have the correct ByteString library installed, but still see an error like: |
||
+ | |||
+ | <blockquote>Yi/UI/Vty.hs:342:48:<br> |
||
+ | Couldn't match expected type<br> `bytestring-0.9.0.4:Data.ByteString.Internal.ByteString'<br> |
||
+ | against inferred type `B.ByteString'<br> |
||
+ | In the second argument of `renderBS', namely `(B.pack str)'<br> |
||
+ | In the expression: renderBS (styleToAttr sty) (B.pack str)<br> |
||
+ | In the definition of `withStyle':<br> |
||
+ | withStyle sty str = renderBS (styleToAttr sty) (B.pack str)</blockquote> |
||
+ | |||
+ | :This is because versions of ByteString often aren't compatible, and in this case, the VTY library was compiled with a different version. |
||
;I get "No instance for (RegexLike Regex B.ByteString)" |
;I get "No instance for (RegexLike Regex B.ByteString)" |
||
:It *could* be that the regex-instance in your bytestring package ther is only an instance for the newer regex-package. That is, your newly installed regex-posix-0.72.0.2 doesn't "see" the ByteString instance, because it was only defined for the regex-posix-0.93.1 package that bytestring knew about when it was built. This is yet another aspect of a known, tricky Cabal bug. |
:It *could* be that the regex-instance in your bytestring package ther is only an instance for the newer regex-package. That is, your newly installed regex-posix-0.72.0.2 doesn't "see" the ByteString instance, because it was only defined for the regex-posix-0.93.1 package that bytestring knew about when it was built. This is yet another aspect of a known, tricky Cabal bug. |
Revision as of 16:44, 4 February 2008
Installation
- How do I install yi?
- get it from hackage. Configure, compile and install yi as you would do for any other Cabal package.
- Setup.hs does not compile!
- You need to use Cabal version 1.2.3. To make sure you use it, do:
ghc -package Cabal-1.2.3.0 --make Setup.hs ./Setup configure ...
- Setup configure fails with
"Setup.hs: Package yi-0.3 can't be built on this system."
- it means that you have no UI package available. You need vty or gtk2hs installed. Get them from hackage.
- On Mac OS X if you get an error message similar to this:
yi: can't load .so/.DLL for: gthread-2.0 (dlopen(libgthread-2.0.dylib, 10): image not found)
- then your dynamic library search path variable is probably not set correctly. You can set it (in bash) using:
export DYLD_LIBRARY_PATH=/opt/local/lib
- (Adjust the specific path to your system. You can find the right location using locate libgthread)
- ByteString problems: Yi as of 27 January 2008 cannot use the most recent ByteString library (because of the regexp libraries) which is 0.9.0.4 - it needs a version like 0.9 or 0.9.0.1. You may have the correct ByteString library installed, but still see an error like:
Yi/UI/Vty.hs:342:48:
Couldn't match expected type
`bytestring-0.9.0.4:Data.ByteString.Internal.ByteString'
against inferred type `B.ByteString'
In the second argument of `renderBS', namely `(B.pack str)'
In the expression: renderBS (styleToAttr sty) (B.pack str)
In the definition of `withStyle':
withStyle sty str = renderBS (styleToAttr sty) (B.pack str)
- This is because versions of ByteString often aren't compatible, and in this case, the VTY library was compiled with a different version.
- I get "No instance for (RegexLike Regex B.ByteString)"
- It *could* be that the regex-instance in your bytestring package ther is only an instance for the newer regex-package. That is, your newly installed regex-posix-0.72.0.2 doesn't "see" the ByteString instance, because it was only defined for the regex-posix-0.93.1 package that bytestring knew about when it was built. This is yet another aspect of a known, tricky Cabal bug.