small bug archive enclosed

Simon Marlow simonmar at microsoft.com
Wed Sep 26 10:45:04 EDT 2001


> You cannot load my project of 2 small modules, using package:
> 
>   ghci -package docon B
>     ...
>     Loading package data ... linking ... done.
>     Loading package docon ... linking ... done.
>     Compiling B                ( B.hs, interpreted )
>     ghc-5.02: panic! (the `impossible' happened, GHC version 5.02):
>             ByteCodeLink.lookupCE A.a{-r41-}

The linker is complaining that it can't find the object code for A.a,
and quite rightly so, because your library files don't contain any
objects!

Try the patch below to your Makefile.

Cheers,
	SImon

*** Makefile~	Wed Sep 26 15:42:38 2001
--- Makefile	Wed Sep 26 15:42:54 2001
***************
*** 29,35 ****
  docon:
  	ghc  -odir $(e) -hidir $(e)  -package-name docon  --make A
  	rm -f $(e)/libHSdocon.a
! 	ar -qc $(e)/libHSdocon.a $(filter-out *HSdocon*, $(wildcard
$(e)/\*.o))
  	$(RANLIB)  $(e)/libHSdocon.a
  	ld -r -x --whole-archive $(e)/libHSdocon.a -o $(e)/HSdocon.o
  
--- 29,35 ----
  docon:
  	ghc  -odir $(e) -hidir $(e)  -package-name docon  --make A
  	rm -f $(e)/libHSdocon.a
! 	ar -qc $(e)/libHSdocon.a $(filter-out *HSdocon*, $(wildcard
$(e)/*.o))
  	$(RANLIB)  $(e)/libHSdocon.a
  	ld -r -x --whole-archive $(e)/libHSdocon.a -o $(e)/HSdocon.o
  




More information about the Glasgow-haskell-bugs mailing list