occasional linking problems with --make?

Simon Marlow marlowsd at gmail.com
Wed Aug 3 12:17:24 CEST 2011


On 02/08/2011 06:52, Evan Laforge wrote:
> Just as an addendum, this just happened again, but I got new errors
> this time.  Make gave the usual:
>
> Linking build/test/RunTests ...
> Undefined symbols:
>    "_UiziTrackC_d28LF", referenced from:
>        _s28UI_info in TrackC.o
>    "_UiziRulerC_dk8C", referenced from:
>        _skev_info in RulerC.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> But then reloading that same module in ghci gave a new one:
>
>> :r
> [ 23 of 124] Compiling Ui.UiMsg         ( Ui/UiMsg.hs, interpreted )
>
> Ui/UiMsg.hs:51:31:
>      Can't find interface-file declaration for type constructor or
> class Key.Modifier
>        Probable cause: bug in .hi-boot file, or inconsistent .hi file
>        Use -ddump-if-trace to get an idea of which file caused the error
>      In the type `[Key.Modifier]'
>      In the definition of data constructor `Mouse'
>      In the data type declaration for `Data'
>
> The odd thing is that after restarting ghci and loading there was no
> problem, so I didn't get a chance to try its -ddump-if-trace
> suggestion.  In this case before the reload I had added an instance
> declaration to a type in the Key module, though oddly it wasn't the
> referenced Modifier type.
>
> Removing the referenced .o files and recompiling was enough to fix the
> link error.

Can you save the state at some point when the error happen?  Preferably 
when using --make rather than GHCi.  Just tar/zip the whole directory 
and send it to us, with instructions to reproduce the error.  What 
platform is this BTW?

Cheers,
	Simon



More information about the Glasgow-haskell-users mailing list