[kaffe] Some obscure(?) problem...
Patrick Tullmann
tullmann at cs.utah.edu
Wed Apr 24 09:06:19 PDT 2002
Jukka wrote:
> ../../../kaffe/kaffe/xprof/gmonFile.c: In function `writeGmonRecord':
> ../../../kaffe/kaffe/xprof/gmonFile.c:136: `char' is promoted to `int'
> when passed through `...'
> ../../../kaffe/kaffe/xprof/gmonFile.c:136: (so you should pass `int' not
> `char' to `va_arg')
>
> --- kaffe/xprof/gmonFile.c 23 May 2000 17:55:37 -0000 1.1
> +++ kaffe/xprof/gmonFile.c 24 Apr 2002 08:12:23 -0000
> @@ -133,7 +133,7 @@
> strcpy(ghh.dimen, va_arg(args, char *));
> break;
> case GRA_DimensionAbbrev:
> - ghh.dimen_abbrev = va_arg(args, char);
> + ghh.dimen_abbrev = va_arg(args, int);
> break;
> case GRA_ProfilingRate:
> *((int *)ghh.prof_rate) = va_arg(args, int);
This is a new one to me... what os/hardware are you running on? Ah,
maybe you're using a more recent gcc?
> ../xprof/.libs/libkaffexprof.a(xprofiler.o): In function
> `enableXProfiling':
> /home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:243:
> undefined reference to `_gmonparam'
> /home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:249:
> undefined reference to `_gmonparam'
I get this problem too. Doesn't happen on FreeBSD. On Linux, you can
get one step farther by configuring with --enable-staticvm and(?)
--enable-staticlib. The static linking seems to resolve the gmonparam
problem (gmonparam is defined in libc). This isn't unique to kaffe,
a 5-line C program that uses the extern _gmonparam from <sys/gmon.h>
has the same problems (Linux/x86, Debian Testing).
However, statically linking Kaffe just changes the problem: I then get
a bunch of undefined symbols in libgmp (things like "undefined
reference to `__mpn_get_str'". Somehow libgmp isn't working with
static linkage (?).
Haven't investigated any further. I won't get a chance to play with
this for a while, so feel free to fix it before then! :)
-Pat
----- ----- ---- --- --- -- - - - - -
Pat Tullmann tullmann at cs.utah.edu
If Gates got a dime each time Windows crashed... Oh, nevermind...
More information about the kaffe
mailing list