[gtkada] GTKAda install problem on RH 8.0

David Mirfin dmirfin at qsf.com
Thu Apr 22 18:07:24 CEST 2004


I get the following compilation failure when I try to install GTKAda on RH8.0:


[root at localhost lib-obj]# gcc -c -g -O2 -Wall  -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I.. -fPIC ../misc.c
In file included from /usr/include/glib-2.0/glib.h:50,
                 from ../misc.c:36:
/usr/include/glib-2.0/glib/gmessages.h:115: warning: invalid character in macro
parameter name
/usr/include/glib-2.0/glib/gmessages.h:115: badly punctuated parameter list in
`#define'
/usr/include/glib-2.0/glib/gmessages.h:118: warning: invalid character in macro
parameter name
/usr/include/glib-2.0/glib/gmessages.h:118: badly punctuated parameter list in
`#define'
/usr/include/glib-2.0/glib/gmessages.h:121: warning: invalid character in macro
parameter name
/usr/include/glib-2.0/glib/gmessages.h:121: badly punctuated parameter list in
`#define'
/usr/include/glib-2.0/glib/gmessages.h:124: warning: invalid character in macro
parameter name
/usr/include/glib-2.0/glib/gmessages.h:124: badly punctuated parameter list in
`#define'



I see that this is a known problem caused by gcc-2.8.1 not working for all C
files. Consequently I took the advice from an earlier thread (see ref at end of
this mail) and changed my default gcc from gcc-2.8.1 to gcc-3.2 just for this
compilation. I expected it to compile OK and fail to link until I switched back
to gcc-2.8.1 but what actually happened was that misc.c simply failed to
compile again as follows:


[root at localhost lib-obj]# gcc -c -g -O2 -Wall  -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I.. -fPIC ../misc.c
../misc.c: In function `ada_gdk_event_create':
../misc.c:1303: warning: implicit declaration of function `gdk_event_new'
../misc.c:1303: warning: assignment makes pointer from integer without a cast
../misc.c: In function `ada_gdk_move_pointer':
../misc.c:3489: `GdkDisplay' undeclared (first use in this function)
../misc.c:3489: (Each undeclared identifier is reported only once
../misc.c:3489: for each function it appears in.)
../misc.c:3489: `display' undeclared (first use in this function)
../misc.c:3489: warning: implicit declaration of function
`gdk_display_get_default'
../misc.c:3490: warning: implicit declaration of function `GDK_DISPLAY_XDISPLAY'
../misc.c:3490: warning: initialization makes pointer from integer without a
cast



More tips would be very much appreciated.







Quoting "Marc A. Criley" <mcq95 at earthlink.net>:

> I suspected that it might be related to the different gcc versions...
>
> Thanks for the confirmatin and the workaround.  I'll try it out later.
>
> Marc
>
> > -----Original Message-----
> > From: gtkada-admin at lists.act-europe.fr
> > [mailto:gtkada-admin at lists.act-europe.fr]On Behalf Of Adrien de Sentenac
> > Sent: Thursday, July 17, 2003 8:16 AM
> > To: gtkada at lists.act-europe.fr
> > Subject: Re: [gtkada] GTKAda install problem on RH 9
> >
> >
> > <quote Auteur="Marc A. Criley">
> >
> > > Having gotten my new Linux development machine (with Red Hat 9) I'm now
> > > installing GNAT and related products, and have run into a problem with
> > > installing GtkAda 2.2.
> > >
> > > GNAT 3.15p is installed, and works fine (I also install ASIS, which gets
> > > compiled as part of its installation).
> > >
> > > I configured the GtkAda install with "./configure
> > > --prefix=/opt/gtkada-2.2"
> > > and then did a "make install".
> > >
> > > First listed here is the output from the make, followed by the
> > versions of
> > > the libraries and such on which it depends.  The problem
> > doesn't appear to
> > > be with the Ada portion, but with some C compilations that have
> > to occur.
> > >
> > > Suggestions would be welcomed!
> > >
> > > Marc A. Criley
> > >
> > >
> > > make -C src install
> > > make[1]: Entering directory `/tmp/GtkAda-2.2.0/src'
> > > mkdir -p lib-obj
> > > chmod +x gate gtkada-config
> > > make -C gtkextra
> > > make[2]: Entering directory `/tmp/GtkAda-2.2.0/src/gtkextra'
> > > gcc -c -g -O2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
> > > -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
> > > -I/usr/include/freetype2 -I/usr/include/glib-2.0
> > > -I/usr/lib/glib-2.0/include   -fPIC gtkplot.c
> > > In file included from /usr/include/glib-2.0/glib.h:50,
> > >                  from /usr/include/gtk-2.0/gdk/gdktypes.h:32,
> > >                  from /usr/include/gtk-2.0/gdk/gdkcolor.h:4,
> > >                  from /usr/include/gtk-2.0/gdk/gdk.h:30,
> > >                  from /usr/include/gtk-2.0/gtk/gtk.h:31,
> > >                  from gtkplot.c:24:
> > > /usr/include/glib-2.0/glib/gmessages.h:116: warning: invalid
> > character in
> > > macro parameter name
> > > /usr/include/glib-2.0/glib/gmessages.h:116: badly punctuated parameter
> > > list
> > > in `#define'
> > > /usr/include/glib-2.0/glib/gmessages.h:119: warning: invalid
> > character in
> > > macro parameter name
> > > /usr/include/glib-2.0/glib/gmessages.h:119: badly punctuated parameter
> > > list
> > > in `#define'
> > > /usr/include/glib-2.0/glib/gmessages.h:122: warning: invalid
> > character in
> > > macro parameter name
> > > /usr/include/glib-2.0/glib/gmessages.h:122: badly punctuated parameter
> > > list
> > > in `#define'
> > > /usr/include/glib-2.0/glib/gmessages.h:125: warning: invalid
> > character in
> > > macro parameter name
> > > /usr/include/glib-2.0/glib/gmessages.h:125: badly punctuated parameter
> > > list
> > > in `#define'
> > > make[2]: *** [gtkplot.o] Error 1
> > >
> > >
> > > (These are actually RPM package names, but the version
> > corresponds to that
> > > of the product.)
> > >
> > > make-3.79.1-17
> > >
> > > glib2-devel-2.2.1-1
> > >
> > > pango-devel-1.2.1-3
> > > pango-1.2.1-3
> > >
> > > glib-1.2.10-10
> > > glibc-kernheaders-2.4-8.10
> > > glib-devel-1.2.10-10
> > > glibc-common-2.3.2-5
> > > glib2-2.2.1-1
> > > glibc-devel-2.3.2-5
> > > glibc-2.3.2-5
> > > glib2-devel-2.2.1-1
> > >
> > > atk-devel-1.2.0-2
> > > atk-1.2.0-2
> > >
> > > gtkam-0.1.7-3
> > > gtk-engines-0.11-16
> > > usermode-gtk-1.67-2
> > > gtkhtml-1.1.8-5
> > > gtk2-engines-2.2.0-2
> > > mtr-gtk-0.52-2
> > > gtkhtml2-2.2.0-5
> > > gtk+-devel-1.2.10-25
> > > gtkhtml-devel-1.1.8-5
> > > gtk2-devel-2.2.1-4
> > > gtk2-2.2.1-4
> > > gtk-doc-0.10-4
> > > gtk+-1.2.10-25
> > >
> >
> > try : gcc -v
> > if it gives you 2.8.1, that's the problem
> >
> > Gnat gives it's own version of gcc but it's not good to compile
> > all c files
> >
> > What i did to succeed in compiling GtkAda-2.2 is :
> > -make gcc-3.2 the default gcc (by changing the path or using links)
> > -compile GtkAda (it'll fail on linking)
> > -make gcc-2.8.1 the default gcc again
> > -recompile GtkAda (it'll directly do the linking)
> >
> > a better solution would be that gnat doesn't interfere with gcc
> > on my debian (at home) the gnat packages has gnatgcc instead of gcc (but
> > it's only gnat-3.14p)
> > I've heard that there is a patch for gnat-3.15p to replace gcc by gnatgcc
> > but i've not found it yet
> > _______________________________________________
> > gtkada mailing list
> > gtkada at lists.act-europe.fr
> > http://lists.act-europe.fr/mailman/listinfo/gtkada
>
>
> _______________________________________________
> gtkada mailing list
> gtkada at lists.act-europe.fr
> http://lists.act-europe.fr/mailman/listinfo/gtkada
>







More information about the gtkada mailing list