> ghci (5.00.1) rejects my packages
>
> (ghc compiled from source for Linux, i386-unknown).
>
> Let us take some simplest project foo, consisting of a single
> file
> /t/A.hs
> containing
> module A where a = True
>
> Suppose the user is going to work in the directory /u/,
> to refer to the library kept in /t/export/
> and to command
> cd /u
> ghci -package foo
> ...
> Prelude> :l A
> ...
> A> a
>
> Please, how to compile a project creating a package foo for this?
> -------------------------------------------------------------------
>
> I try starting with ghc-pkg -a foo < p.txt
> ...
> Then, cd /t
> ghc -package-name foo --make A
>
> does not differ from ghc --make A
>
> in any visible effect: A.hi, A.o appear as usual.
A.hi will contain the package name "foo" in the first line, but
otherwise everything should be the same.
> Then, after creating manually /t/export/libHSfoo.a
> and converting it by
> ld -r --whole-archive libHSfoo.a -o libHSfoo.o
>
> (without -r, it reports error of non-found reference PrelBase...),
ok...
> it still does not work. ghci -package foo
> yields
> Loading package foo ... can't find .o or .so/.DLL for: HSfoo
> (libHSfoo.so: cannot open shared object file: No such file
It looks like there may be a problem with your package spec. Could you
list the contents of p.txt that you used to create the package?
> Please, can you reproduce the whole this business with making,
> packaging and interpreting and show me how it sould be built?
You seem to have the right steps.
> How should look a package for this?
The "package" consists of libraries, .hi files, and a package
specification. Which bit did you mean?
> Is it created manually or by ghc -package-name ... ?
The user's guide says, about -package-name:
This option is added to the command line when compiling a
module that is destined to be part of package foo. If this
flag is omitted then the default package Main is assumed.
seems fairly clear to me... which part are you confused about?
> For I have an impression that the ghc-5.00 User's guide cannot
> help in this situation.
Which parts of the documentation aren't being helpful to you? If you
tell us what's wrong, we can try to improve the docs for the next
version.
Cheers,
Simon
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs