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

Gregory Wright gwright at comcast.net
Wed Dec 1 12:36:03 EST 2004


Hi Don,

I cleaned out all of the *.o and *.hi files and rebuilt. Everything
was OK. No doubt there was something stale in one of the *.hi
files, although the error message is perplexing to those of us
who don't channel Simonness ;--)

Best Wishes,
Greg


On Nov 30, 2004, at 11:26 PM, Donald Bruce Stewart wrote:

> 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