#232 cvs compile problem


Using current CVS (Oct 30, around 20:00 UTC), the "main" directory compiles fine without a single warning (./autojoe; ./configure; make). However, the top directory has two warnings, and then a fatal error:

rc.c: In function ‘doopt’:
rc.c:818: warning: cast to pointer from integer of different size
[ the mentioned line is: *(unsigned char **)glopts[x].ofst = zdup(s); ]

mouse.c: In function ‘fake_key’:
mouse.c:47: warning: passing argument 1 of ‘exemac’ from incompatible pointer type

coroutine.c: In function ‘co_call’:
coroutine.c:521: error: incompatible types in assignment
[ the line is: current_stack->args = ap; ]

This is an Ubuntu Hardy (8.04) with glibc 2.7 and gcc 4.2.3, and it might be important that this is a 64-bit (x86_64) system. This might explain the first warning: a pointer is 64 bits, but int is still 32. I don't know what's wrong with the va_* stuff at the second warning and the error... I didn't spend too much time on these, but I can try to help, should you be unable to reproduce it and no access to 64 bit machine, just please let me know.


  • Joe Allen

    Joe Allen - 2008-10-30

    Thanks, I'll take a look. One 64-bit machine I have access to is Yellow Dog Linux on my Play Station 3 :-)

  • Joe Allen

    Joe Allen - 2008-10-31

    I fixed the warnings, but I don't understand the error. I don't get it on PS3-linux, plus it's just assigning a va_list to a va_list. Also it should be using UCONTEXT on such a modern system (a different branch of the #ifdef where the error is), so it looks like there is a configure problem as well.

  • Joe Allen

    Joe Allen - 2008-10-31

    I modified configure.ac to detect ucontext.h, so at least one part of the problem should be fixed.
    Maybe it's a gcc 4.2.3 issue.

  • Egmont Koblinger

    Hah, got it :) The solution is va_copy(current_stack->args, ap);
    See va_copy manual page ( http://linux.die.net/man/3/va_copy ) why directly assigning the va_list value may not work.

  • Joe Allen

    Joe Allen - 2008-11-23

    This is fixed now in CVS: we use va_copy if it exists.

  • Joe Allen

    Joe Allen - 2008-11-23
    • status: open --> closed

Log in to post a comment.