[Yhc] Re: YHC build finished successfully, but install is not "fairly trivial"

Jared Updike jupdike at gmail.com
Wed Dec 21 15:24:26 EST 2005


I went over the archive at
http://www.haskell.org/pipermail/yhc/2005-December.txt (for some
reason my message didn't copy itself and I'm hoping yhc at haskell.org
sends this to me correctly so sorry if this message is not really
asking a question) and found the solution. It was as simply as copying

src/yhc/bootstrap/packages/yhc-base/1.0/Data/Ratio.hbc
to
/usr/lib/yhc/lib/yhc/packages/yhc-base/1.0/Data/

I imagine this all has to do with the way that yhi loads more than
just the Prelude before interpreting the hbc file? My guess is that
YHI has two modes and that by default it is running in "hierarchical
library mode" which is a superset of haskell-98 (but uses a different
package), which means it includes more than just the Prelude to do any
normal task? That also explains why yhc/lib/yhc/packages has yhc-base/
and haskell98/ with what looks like similar files with different file
hierarchy (i.e h98 = flat, yhc-core = hierarchical).

Cheers,
  Jared.

On 12/21/05, Jared Updike <jupdike at gmail.com> wrote:
> Hello all,
>
> I just 'darcs got' the sources and compiled YHC on Linux (Ubuntu) last
> night. I got it to compile just fine with 'make' but on the install
> side of things I ran into a number of problems.
>
> I read on the wiki (YHC/Building) that
>
> > There currently isn't a 'make install', but it is fairly trivial: simply copy the contents of the
> > 'inst' directory into where everything should be installed.
>
> I didn't find this to be the case. I copied the 'inst' folder to
> '/usr/lib/yhc', but then (1) I had to set up an environment variable
> YHC_BASE_PATH to point there, (2) I had to symlink 'yhi' and 'yhc' to
> '/usr/bin'.
>
> That really wasn't that big of a deal. I ran YHC on a test Haskell
> script, called Main.hs:
>
> > module Main (main) where
> >
> > fac 0 = 1
> > fac n | n > 0 = n * fac (n-1)
> >
> > main = print $ fac 30
>
> and it succeeds. But, trying to run the .hbc file with yhi fails:
> --------
> ERROR: couldn't find module named 'Data/Ratio'
> tried:
>         Data/Ratio.hbc
>         /usr/lib/yhc/lib/yhc/packages/yhc-base/1.0/Data/Ratio.hbc
> --------
> In that directory, there exist a bunch of .hbc and .hi file pairs
> (Char, Array, List, Ix, Complex, Maybe, PackedString, _CharNumeric) ,
> AND Ratio.hi, but no Ratio.hbc ...,
> (incidentally, /usr/lib/yhc/lib/yhc/packages/haskell98/1.0/Ratio.hbc
> DOES exist...)
>
> The question is, why does running my factorial program trigger a
> Data.Ratio error? I think it's an installation problem, and it's
> probably related to the fact that...
>
> ... I can't really get most of the test suite to run. (Here is a link
> to the error output stream of runtests.py:
> http://www.updike.org/~jared/here/err.txt (164kB))
>
> This is not "fairly trivial", this is disheartening. What am I
> missing? I will update the wiki when I get it working, if I can get
> some help with the path and directory scheme, environment variables,
> and other black magic.
>
>   Jared.
>
> P.S. I am still really excited about YHC!
>
> --
> jupdike at gmail.com
> http://www.updike.org/~jared/
> reverse ")-:"
>


--
jupdike at gmail.com
http://www.updike.org/~jared/
reverse ")-:"


More information about the Yhc mailing list