logo       

RE: ghc-6.2.2: unknown package name: Main (again): msg#00013

lang.haskell.glasgow.bugs

Subject: RE: ghc-6.2.2: unknown package name: Main (again)

On 02 December 2004 09:06, Axel Simon wrote:

> On Wed, 2004-12-01 at 19:07, Gregory Wright wrote:
>> No, I patched the hsshellscript library distribution to build using
>>
>> -package-name hsshellscript
>>
>> as you mentioned. I still got the error. (The documentation
>> asserts that -package-name is a no-op on unices anyway.
>> I wonder if that is really still true?)
>
> The name you provide with -package-name must wind up in the .hi files
> of the *application* and the library you are compiling. I
> inadvertently passed the file name of the package file as package
> name and it gave me back the whole file name.

Right. .hi files track package dependencies. -package-name isn't a
no-op on any platform with respect to dependencies, but it is a no-op
with respect to dynamic linking on Unix. You should still use
-package-name.

As Simon said, the package handling is changing quite a bit for 6.4. In
particular, .hi files no longer contain the contents of the
-package-name flag when they were built. However, you still need to
pass a flag when building a package, but now you say '-ignore-package P'
to cause GHC to ignore any installed version of P when building modules
that are contained in P. To ease migration, we made -package-name be a
synonym for -ignore-package.

So this particular error message should be a thing of the past.
Furthermore, you can build a collection of modules once and then put
them in two or more separate packages, or a package and a binary,
without having to build them multiple times with different -package-name
flags.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise