Hello there,

I'm the maintainer for mirrormagic.  I've got an x86 system, hope you can
forgive my little inadequacies.

update_excuses.html says mirrormagic has issues getting into testing because
of the following bug on powerpc (well, I gather this excuse has been
overridden, and mirrormagic 2.0.0 isn't in testing because libsdl1.1 isn't,
but anyway...)

According to http://voltaire.debian.org/buildd/buildlogs/mirrormagic/latest,
we have this compile-time error:

gcc  main.o init.o events.o tools.o screens.o game.o editor.o files.o
cartoons.o libgame/libgame.a -lSDL_image -lSDL_mixer -L/usr/lib -lSDL
-lpthread  -lm -o ../mirrormagic
libgame/libgame.a(gadgets.o): In function HandleGadgetTags':
gadgets.o(.text+0x9f8): undefined reference to __va_arg_type_violation'
gadgets.o(.text+0x9f8): relocation truncated to fit: R_PPC_REL24
__va_arg_type_violation
collect2: ld returned 1 exit status
make[2]: *** [../mirrormagic] Error 1



The code in question is declared as:

static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap)

and the va_arg argument is used in several places inside, e.g.
    gi->custom_id = va_arg(ap, int); 
    strncpy(gi->info_text, va_arg(ap, char *), max_textsize); 
    gi->type = va_arg(ap, unsigned long); 
    gi->deco.width = va_arg(ap, int); 
    gi->deco.height = va_arg(ap, int);         
    gi->design[GD_BUTTON_PRESSED].bitmap = va_arg(ap, Bitmap *); 
    gi->event_mask = va_arg(ap, unsigned long); 
    gi->callback_info = va_arg(ap, gadget_function); 
etc.

gi (GadgetInfo) looks like:

struct GadgetInfo
{
  int id;                               /* internal gadget identifier */
  int custom_id;                        /* custom gadget identifier */
  int custom_type_id;                   /* custom gadget type identifier */
  char info_text[MAX_INFO_TEXTSIZE];    /* short popup info text */
  int x, y;                             /* gadget position */
  int width, height;                    /* gadget size */
  unsigned long type;                   /* type (button, text input, ...) */
  unsigned long state;                  /* state (pressed, released, ...) */
  boolean checked;                      /* check/radio button state */
  int radio_nr;                         /* number of radio button series */
  boolean mapped;                       /* gadget is active */
  struct GadgetBorder border;           /* gadget border design */
  struct GadgetDesign design[2];        /* 0: normal; 1: pressed */
  struct GadgetDesign alt_design[2];    /* alternative design */
  struct GadgetDecoration deco;         /* decoration on top of gadget */
  unsigned long event_mask;             /* possible events for this gadget */
  struct GadgetEvent event;             /* actual gadget event */
  gadget_function callback_info;        /* function for pop-up info text */
  gadget_function callback_action;      /* function for gadget action */
  struct GadgetDrawingArea drawing;     /* fields for drawing area gadget */
  struct GadgetTextInput text;          /* fields for text input gadget */
  struct GadgetScrollbar scrollbar;     /* fields for scrollbar gadget */
  struct GadgetInfo *next;              /* next list entry */
};



So this "undefined reference to __va_arg_type_violation", is it a known
problem on the powerpc?  Have others met it?  Or does it mean the code has
been written poorly?  There's nothing obviously bad in the code that I can
see, but I've never had to deal with powerpc or endian issues before (though
I can't see any issues here). It works fine on x86.

Thanks for any clues,

Drew Parsons

-- 
PGP public key available at http://dparsons.webjump.com/drewskey.txt
Fingerprint: A110 EAE1 D7D2 8076 5FE0  EC0A B6CE 7041 6412 4E4A

Reply via email to