GHC 6.6 using stale stub.c files
Juan Carlos Arevalo Baeza
jcab.lists at JCABs-Rumblings.com
Sun Oct 22 20:25:11 EDT 2006
I tried recompiling a little (big?) Win32 binding library I had made,
when the official one wasn't working for me. It had a bunch of generated
stubs files in it (I'm not 100% sure what they are for). The problem is
that, not even with -fforce-recomp (much better name, thanx!) will GHC
regenerate those files (I think that's normal), but still it tries to
use them if they are there. I get errors like these:
Win32Test_stub.c: In function `Main_d4n0':
Win32Test_stub.c:14:0:
error: too few arguments to function `rts_mkPtr'
Win32Test_stub.c:14:0:
warning: passing arg 1 of `rts_apply' from incompatible pointer type
Win32Test_stub.c:14:0:
error: too few arguments to function `rts_apply'
Win32Test_stub.c:14:0:
warning: passing arg 1 of `rts_mkWord32' makes pointer from integer
without a cast
(etc, etc... lots of them).
The stub file is old:
C:\Documents and Settings\JCAB\My Documents\Haskell>dir Win32Test_stub.c
Volume in drive C has no label.
Volume Serial Number is A0CD-B8F4
Directory of C:\Documents and Settings\JCAB\My Documents\Haskell
08/18/2005 12:15 AM 637 Win32Test_stub.c
1 File(s) 637 bytes
0 Dir(s) 151,815,680,000 bytes free
And yes, I'm on Windows.
There are some stubs files that were regenerated:
C:\Documents and Settings\JCAB\My Documents\Haskell>dir
Win32\Window\Types_stub.c
Volume in drive C has no label.
Volume Serial Number is A0CD-B8F4
Directory of C:\Documents and Settings\JCAB\My
Documents\Haskell\Win32\Window
10/22/2006 05:05 PM 717 Types_stub.c
1 File(s) 717 bytes
0 Dir(s) 151,803,375,616 bytes free
So I suppose the no-longer-needed stubs files were related to the
modules that made use of this Win32.Window.Types module I had here. I
guess GHC doesn't need those any more, but it just tries to use any stub
files it finds. It probably shouldn't use them, and it should probably
even delete them, unless it generated them, at least when -fforce-recomp
is specified.
I'm moving on. I made a copy of all the files, so let me know if you
need a repro. Deleting the stubs files fixes the problem. I haven't seen
anything about this in the documentation, but maybe I just didn't look
in the right places.
Thanx!
JCAB
More information about the Glasgow-haskell-users
mailing list