[R] Re: R 1.90 make problem with /usr/X11R6/include/X11/Xutil.h on suse linux 9.1?

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat May 22 10:40:59 CEST 2004


But that is not the best fix, and this have been discussed several times
in the R-help/R-devel lists.  A better fix is already in R-patched, whose
NEWS file says

INSTALLATION ISSUES

    o	src/modules/X11/dataentry.c would not build on some XFree
	4.4.0 systems.	(This is a bug in their header files but we have
	added a workaround.)

Please do send in bug reports to your distributions, as there is a bug in 
their distributions, not R's.


On Wed, 19 May 2004, Ross Lazarus wrote:

> Suse problem solved - thanks to Chris Albert for providing a fix to the 
> problem on Fedora Core 2 - same fix works a treat for Suse 9.1 - edit 
> src/modules/X11/dataentry.c and change the define NeedFunctionProtypes 
> to 1 :
> 
> > Hi,
> > 
> > The libtk8.3 dependencies in the R-1.9.0 rpm generate apt conflicts 
> > after an upgrade from Fedora Core 1 to Fedora core 2.
> > In trying to rebuild the rpm from the source rpm provided on CRAN,
> > the build fails when it comes time to compile
> > 
> > src/modules/X11/dataentry.c
> > 
> > you get many errors of the form :
> >> In file included from dataentry.c:34:
> >> /usr/X11R6/include/X11/Xlib.h:1400: error: syntax error before "_Xconst"
> >> /usr/X11R6/include/X11/Xlib.h:1488: error: syntax error before "char"
> >> /usr/X11R6/include/X11/Xlib.h:1516: error: syntax error before "_Xconst"
> >> /usr/X11R6/include/X11/Xlib.h:1520: error: syntax error before "char"
> >> /usr/X11R6/include/X11/Xlib.h:1542: error: syntax error before "_Xconst"
> > ...
> > 
> > This could have something to do with the change from X1186 to xorg.
> > 
> > A workaround is simply to change the line in src/modules/X11/dataentry.c:
> >> /* don't use X11 function prototypes (which tend to ...): */
> >> #define NeedFunctionPrototypes 0
> > to
> >  > #define NeedFunctionPrototypes 1 .
> > 
> > As a patch:
> >> diff -crN R-1.9.0.orig/src/modules/X11/dataentry.c R-1.9.0/src/modules/X11/dataentry.c
> >> *** R-1.9.0.orig/src/modules/X11/dataentry.c    2004-03-22 06:00:16.000000000 -0500
> >> --- R-1.9.0/src/modules/X11/dataentry.c 2004-05-19 11:35:21.903803616 -0400
> >> ***************
> >> *** 29,35 ****
> >>   #include "Print.h"
> >>    
> >>   /* don't use X11 function prototypes (which tend to ...): */
> >> ! #define NeedFunctionPrototypes 0
> >>   #include <X11/X.h>
> >>   #include <X11/Xlib.h>
> >>   #include <X11/Xutil.h>
> >> --- 29,35 ----
> >>   #include "Print.h"
> >>    
> >>   /* don't use X11 function prototypes (which tend to ...): */
> >> ! #define NeedFunctionPrototypes 1
> >>   #include <X11/X.h>
> >>   #include <X11/Xlib.h>
> >>   #include <X11/Xutil.h>
> > 
> > Then the rpm builds fine.
> > 
> > Someone who knows the code will need to confirm that this is an 
> > acceptable solution.
> > 
> > 
> > Chris Albert
> 
> 
> Ross Lazarus wrote:
> > This is probably a Suse specific problem and not a bug in R, but I'm 
> > reporting it in case it's useful for someone to know about....
> > 
> > Trying to compile R1.9.0 from source on a standard Suse 9.1 install 
> > (athlon in a shuttle sn41g2).
> > configure seems fine but the Suse X11R6 Xlib.h might be toxic.
> > 
> > In case it helps, here's the sad end to the make output. I can post the 
> > Xlib.h if that would help...
> > 
> > Please email me directly for more information if needed as I don't 
> > normally read this list....meanwhile, I'll go try the rpm....
> > 
> > making rotated.d from rotated.c
> > making rbitmap.d from rbitmap.c
> > make[4]: Leaving directory `/home/rossl/src/R-1.9.0/src/modules/X11'
> > make[4]: Entering directory `/home/rossl/src/R-1.9.0/src/modules/X11'
> > gcc -I. -I../../../src/include -I../../../src/include 
> > -I/usr/X11R6/include -I/usr/local/include -DHAVE_CONFIG_H 
> > -D__NO_MATH_INLINES -mieee-fp -fPIC  -g -O2 -c dataentry.c -o dataentry.lo
> > In file included from dataentry.c:31:
> > /usr/X11R6/include/X11/Xlib.h:1400: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1488: error: parse error before "char"
> > /usr/X11R6/include/X11/Xlib.h:1516: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1520: error: parse error before "char"
> > /usr/X11R6/include/X11/Xlib.h:1542: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1577: error: parse error before '*' token
> > /usr/X11R6/include/X11/Xlib.h:1586: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1611: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1661: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1667: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1714: error: parse error before "char"
> > /usr/X11R6/include/X11/Xlib.h:1753: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:1994: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2078: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2331: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2341: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2413: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2423: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2581: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2596: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2789: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2856: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:2861: error: parse error before "char"
> > /usr/X11R6/include/X11/Xlib.h:2975: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3001: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3012: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3037: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3046: error: parse error before "char"
> > /usr/X11R6/include/X11/Xlib.h:3059: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3202: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3251: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3283: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3374: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3381: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3401: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3407: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3419: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3429: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3439: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3445: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3546: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3563: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3614: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3657: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3663: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3669: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3675: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3683: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3691: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3699: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3711: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3723: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3770: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3781: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3792: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3803: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3814: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xlib.h:3825: error: parse error before "_Xconst"
> > In file included from dataentry.c:32:
> > /usr/X11R6/include/X11/Xutil.h:566: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xutil.h:606: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xutil.h:666: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xutil.h:678: error: parse error before "_Xconst"
> > /usr/X11R6/include/X11/Xutil.h:801: error: parse error before "_Xconst"
> > dataentry.c: In function `GetKey':
> > dataentry.c:1272: warning: passing arg 4 of `XLookupString' from 
> > incompatible pointer type
> > dataentry.c: In function `GetCharP':
> > dataentry.c:1281: warning: passing arg 4 of `XLookupString' from 
> > incompatible pointer type
> > dataentry.c: In function `doControl':
> > dataentry.c:1302: warning: passing arg 4 of `XLookupString' from 
> > incompatible pointer type
> > make[4]: *** [dataentry.lo] Error 1
> > make[4]: Leaving directory `/home/rossl/src/R-1.9.0/src/modules/X11'
> > make[3]: *** [R] Error 2
> > make[3]: Leaving directory `/home/rossl/src/R-1.9.0/src/modules/X11'
> > make[2]: *** [R] Error 1
> > make[2]: Leaving directory `/home/rossl/src/R-1.9.0/src/modules'
> > make[1]: *** [R] Error 1
> > make[1]: Leaving directory `/home/rossl/src/R-1.9.0/src'
> > make: *** [R] Error 1
> > rossl at small:~/src/R-1.9.0>
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list