problem compiling Gtk2-1.060 from CPAN in xs/GdkKeys.xs + fix




  Sorry if this problem has already been resolved. It was 
a bit of a surprise for me, and I apologize if this is well-known.

I encountered the error message below while buidling Gtk2-1.060
downloaded from CPAN today. The same error occurred on two different
systems with an older version of gcc (gcc 2.96 20000731) and
perl 5.8.0 .

It was apparently caused by the trailing ; in xs/GdkKeys.xs line 27:

#define SvGdkKeymap_orclass(sv) ((sv && SvOK (sv) && SvROK (sv)) ? 
SvGdkKeymap (sv) : NULL);
                        ^

Expanded, it resulted in double ;; in four locations in xs/GdkKeys.c,
causing syntax errors with gcc. 

Removing the training l from the above line allowed me to finish
building package without further problems.

Hope this helps someone,

--Sergey

-----------------------------------------------------------------
/usr/local/bin/perl /usr/local/lib/perl5/5.8.0/ExtUtils/xsubpp 
-noprototypes -typemap /usr/local/lib/perl5/5.8.0/ExtUtils/typemap 
-typemap /root/.cpan/build/Gtk2-1.060/build/gtk2perl.typemap -typemap 
/root/.cpan/build/Gtk2-1.060/gdk.typemap -typemap 
/root/.cpan/build/Gtk2-1.060/gtk.typemap -typemap 
/root/.cpan/build/Gtk2-1.060/pango.typemap -typemap 
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Glib/Install/typemap  
xs/GdkKeys.xs > xs/GdkKeys.xsc && mv xs/GdkKeys.xsc xs/GdkKeys.c
cc -c  -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include 
-I/usr/local/include/atk-1.0 -I/usr/local/include/pango-1.0 
-I/usr/X11R6/include -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -I./build 
-I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Glib/Install -pthread 
-I. -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.060\" -DXS_VERSION=\"1.060\" -o 
xs/GdkKeys.o -fpic "-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE"   
xs/GdkKeys.c
GdkKeys.c: In function `XS_Gtk2__Gdk__Keymap_lookup_key':
GdkKeys.c:124: parse error before `*'
GdkKeys.xs:97: `real_key' undeclared (first use in this function)
GdkKeys.xs:97: (Each undeclared identifier is reported only once
GdkKeys.xs:97: for each function it appears in.)
GdkKeys.xs:97: `key' undeclared (first use in this function)
GdkKeys.xs:98: `RETVAL' undeclared (first use in this function)
GdkKeys.c:134: `targ' undeclared (first use in this function)
GdkKeys.c: In function `XS_Gtk2__Gdk__Keymap_translate_keyboard_state':
GdkKeys.c:148: parse error before `hardware_keycode'
GdkKeys.xs:118: `hardware_keycode' undeclared (first use in this function)
GdkKeys.xs:119: `state' undeclared (first use in this function)
GdkKeys.xs:119: `group' undeclared (first use in this function)
GdkKeys.xs:119: `keyval' undeclared (first use in this function)
GdkKeys.xs:120: `effective_group' undeclared (first use in this function)
GdkKeys.xs:120: `level' undeclared (first use in this function)
GdkKeys.xs:121: `consumed_modifiers' undeclared (first use in this 
function)
GdkKeys.c: In function `XS_Gtk2__Gdk__Keymap_get_entries_for_keyval':
GdkKeys.c:183: parse error before `keyval'
GdkKeys.xs:153: `keyval' undeclared (first use in this function)
GdkKeys.xs:153: `keys' undeclared (first use in this function)
GdkKeys.xs:153: `n_keys' undeclared (first use in this function)
GdkKeys.xs:156: `i' undeclared (first use in this function)
GdkKeys.c: In function `XS_Gtk2__Gdk__Keymap_get_entries_for_keycode':
GdkKeys.c:211: parse error before `hardware_keycode'
GdkKeys.xs:177: `hardware_keycode' undeclared (first use in this function)
GdkKeys.xs:178: `keys' undeclared (first use in this function)
GdkKeys.xs:178: `keyvals' undeclared (first use in this function)
GdkKeys.xs:178: `n_entries' undeclared (first use in this function)
GdkKeys.xs:181: `i' undeclared (first use in this function)
GdkKeys.xs:182: `hv' undeclared (first use in this function)
GdkKeys.c: In function `XS_Gtk2__Gdk__Keymap_get_direction':
GdkKeys.c:244: parse error before `RETVAL'
GdkKeys.c:246: `RETVAL' undeclared (first use in this function)
make: *** [xs/GdkKeys.o] Error 1








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]