rbutcher has asked for the wisdom of the Perl Monks concerning the following question:

greetings once again from Oz. I'm getting the following error when I try to compile any version of the perl Glib wrapper on my Mandrake 10 box. I did this OK a few months ago, but now it fails. I know it's a C compile error, but I'm hoping you guys are clued up on XS. thanks :-
GParamSpec.c GParamSpec.xs: In function `g_param_flags_get_type': GParamSpec.xs:42: error: `G_PARAM_PRIVATE' undeclared (first use in th +is function) GParamSpec.xs:42: error: (Each undeclared identifier is reported only +once GParamSpec.xs:42: error: for each function it appears in.) GParamSpec.xs:42: error: initializer element is not constant GParamSpec.xs:42: error: (near initialization for `values[5].value') GParamSpec.xs:42: error: initializer element is not constant GParamSpec.xs:42: error: (near initialization for `values[5]') GParamSpec.xs:43: error: initializer element is not constant GParamSpec.xs:43: error: (near initialization for `values[6]') make: *** [GParamSpec.o] Error 1

20050406 Janitored by Corion: Put error message in code tags

Replies are listed 'Best First'.
Re: Perl Glib build fails on G_PARAM_PRIVATE
by zentara (Cardinal) on Apr 06, 2005 at 13:28 UTC
    2 things I can thinks of:

    1. You have a mismatch between the C version of the Glib, and the Perl module. Get the latest of both if you can. Or, get old versions that match. That can be tricky, because to get gtk2 going, you need matching levels of glib,pango,atk,and gtk2. There have been quite a few releases over the past few years.

    2. There has been some discussion on the gtk2-perl maillist, in the past couple of days, about Mandrake patching their Perl in ways that break things, if you don't stick with their distro's modules. The consensus on the maillist is Mandrake is not a good platform to do gtk2-perl on. The maillist is at gtk-perl-maillist


    I'm not really a human, but I play one on earth. flash japh
      Thanks Zentara, the gtk-perl list looks like where I should go. I've tried various versions of the sources, both from Mandrake and direct from CPAN, so it isn't Mandrake's fault.
        Fixed - I had messed up my glibc system libraries - I think libs and headers were out of sync. Reinstalled and now all is well. This also seems to account for a few other weird errors I was getting like compile segfaults.