unable to compile with gnome libs



Hi,

it sounds like I can't compile with gnome support. I found this out
when trying to configure fvwm, which tries to compile this
(in ./configure):

#line 5911 "configure"
#include "confdefs.h"

#include <gnome.h>
int main(int c, char **v) {
   /* we can't really run this outside of X */
   if (!c) gnome_init("test-app", "0.0", c, v);
      return 0;
}


and there is a conflict between stdio.h and gnomesupport.h which
redefines sprintf and vsnprintf as if they weren't part or standard
include files already :


configure:5921: sgifwcompile -e -q -nostdinc -I.
-I/d3/myroots/proot/usr/freeware/include -I/d3/myroots/proot/usr/include 
-D_BSD_SIGNALS -O3 -OPT:Olimit=0:space=ON -DEBUG:optimize_space=on  -TENV:X=1
-CG:unique_exit=on 
-OPT:IEEE_arithmetic=1:roundoff=0:wrap_around_unsafe_opt=off -n32 -mips3
-nostdlib -L/d3/myroots/proot/usr/freeware/lib32 
-L/d3/myroots/proot/usr/lib32 -woff
1009,1014,1107,1110,1116,1164,1185,1188,1204,1230,1233  -Wl,-woff,85,-woff,84
-rpath /usr/freeware/lib32 -- /d3/myroots/ptoolroot/usr/bin/cc -o conftest -g 
-I/d3/myroots/proot/usr/freeware/include -DNEED_GNOMESUPPORT_H
-I/d3/myroots/proot/usr/freeware/lib32/gnome-libs/include
-I/d3/myroots/proot/usr/freeware/include/glib-1.2
-I/d3/myroots/proot/usr/freeware/lib32/glib/include
-I/d3/myroots/proot/usr/freeware/include/gtk-1.2  conftest.c 
-L/d3/myroots/proot/usr/freeware/lib32 -lgnomeui -lart_lgpl -lgdk_imlib -lSM
-lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd
-laudio -laudiofile -lm -ldb -lglib 1>&5
cc-1143 cc: ERROR File = /d3/myroots/proot/usr/include/stdio.h, Line = 235
  Declaration is incompatible with "int snprintf(char *, size_t, char *, ...)"
          (declared at line 36 of
          "/d3/myroots/proot/usr/freeware/lib32/gnome-libs/include/gnomesupport
          .h").

  extern int    snprintf(char *, ssize_t, const char *, ...);
                ^

cc-1143 cc: ERROR File = /d3/myroots/proot/usr/include/stdio.h, Line = 244
  Declaration is incompatible with
          "int vsnprintf(char *, size_t, char *, va_list)" (declared at line
          34 of
          "/d3/myroots/proot/usr/freeware/lib32/gnome-libs/include/gnomesupport
          .h").

  extern int    vsnprintf(char *, ssize_t, const char *, /* va_list */ char *);
                ^

a more straightforward compile command gives the same result :

cc -I/d3/myroots/proot/usr/freeware/lib32/gnome-libs/include
-I/d3/myroots/proot/usr/freeware/include
-I/d3/myroots/proot/usr/freeware/include/gtk-1.2
-I/d3/myroots/proot/usr/freeware/include/glib-1.2
-I/d3/myroots/proot/usr/freeware/lib32/glib/include -o conftest -c conftest.c

Here are the offending prototypes :

stdio.h:
extern int  snprintf(char *, ssize_t, const char *, ...);
extern int  vsnprintf(char *, ssize_t, const char *, char *);

gnomesupport.h:
/* Maximum chars of output to write is MAXLEN.  */
int snprintf  (char *, size_t, char *, ...);
int vsnprintf (char *, size_t, char *, va_list);


just wanted to know if anybody already encountered such a
problem, cuz I have no clue where to look at in the first
place. Any ideas ? Why aren't they "extern" in gnomesupport ?
Can I just fix gnomesupport.h ( I guess not...)


Thanks!
Stephane


-- 
SILICON GRAPHICS                 EUROPEAN MANUFACTURING CENTER
##############################################################
Stephane Rosa                     Tel :     +41 (0)32 843-3638
Business Analyst                  Fax :     +41 (0)32 843-3909
APS/FP  Project                   GSM :     +41 (0)79 616-0828
--------------------------------------------------------------
ircnoc.neu.sgi.com  SGI Intranet  IRC :   EuroOper on #irchelp
irc.stealth.net     Euro-IRCNet   IRC :   Clipper on #radionet




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