ghc-6.2.2: unknown package name: Main (again)
Donald Bruce Stewart
dons at cse.unsw.edu.au
Tue Nov 30 23:26:04 EST 2004
gwright:
>
> Hi,
>
> Using ghc-6.2.2 on Mac OS X 10.3.6, I've found another instance
> of the "unknown package name: Main" problem mentioned last April.
> When I build my program I see:
>
> crossroads-able> ghc --make -package hsshellscript -o asgraph asgraph.hs
> Chasing modules from: asgraph.hs
> Skipping Reformat ( ./Reformat.hs, ./Reformat.o )
> Skipping Main ( asgraph.hs, asgraph.o )
> Linking ...
> ghc-6.2.2: unknown package name: Main
>
>
> However, building the package (hsshellscript) with the additional
> option
>
> -package-name hsshellscript
>
> doesn't fix the problem; the error message persists.
>
> Has anyone else noticed this probelm? Is it specific to OS X?
I had this problem in yi at one point, when trying to link against a
package, in the same directory as the package .o files. Check the
resulting .hi files (--show-iface) to see if you linked against the
-package hsshellscript, or the individual .o files. The .o files were
getting picked up by -I., overriding the -package flag.
The solution was to use either -I to explicitly rule out certain dirs
from the search path. Another soln (that is backwards compatible with
ghc-6.2.1) is to cd to another dir, so that the -I. doesn't mean
anything.
-- Don
More information about the Glasgow-haskell-bugs
mailing list