My box: Slackware-current, Xfree 4.4. ERROR as follows: 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:1390: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1478: error: parse error before "char" /usr/X11R6/include/X11/Xlib.h:1506: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1510: error: parse error before "char" /usr/X11R6/include/X11/Xlib.h:1532: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1567: error: parse error before '*' token /usr/X11R6/include/X11/Xlib.h:1576: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1601: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1651: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1657: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1704: error: parse error before "char" /usr/X11R6/include/X11/Xlib.h:1743: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:1984: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2068: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2321: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2331: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2403: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2413: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2571: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2586: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2779: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2846: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2851: error: parse error before "char" /usr/X11R6/include/X11/Xlib.h:2965: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:2991: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3002: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3027: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3036: error: parse error before "char" /usr/X11R6/include/X11/Xlib.h:3049: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3192: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3241: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3273: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3364: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3371: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3391: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3397: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3409: 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:3435: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3536: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3553: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3604: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3647: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3653: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3659: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3665: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3673: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3681: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3689: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3701: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3713: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3760: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3771: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3782: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3793: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3804: error: parse error before "_Xconst" /usr/X11R6/include/X11/Xlib.h:3815: 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" Help me!
We have seen this before, and fixed it, at least on my installation. The fix was to ensure that the X11 headers were declared before Defn.h, which they are in 1.9.0 but not in 1.8.1. So your XFree 4.4 installation is not liking the way those header files are defined, and we need you to disentangle this. On Fri, 16 Apr 2004, Qian Kevin wrote:> My box: Slackware-current, Xfree 4.4. > ERROR as follows: > > 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:1390: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1478: error: parse error before "char" > /usr/X11R6/include/X11/Xlib.h:1506: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1510: error: parse error before "char" > /usr/X11R6/include/X11/Xlib.h:1532: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1567: error: parse error before '*' token > /usr/X11R6/include/X11/Xlib.h:1576: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1601: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1651: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1657: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1704: error: parse error before "char" > /usr/X11R6/include/X11/Xlib.h:1743: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:1984: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2068: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2321: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2331: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2403: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2413: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2571: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2586: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2779: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2846: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2851: error: parse error before "char" > /usr/X11R6/include/X11/Xlib.h:2965: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:2991: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3002: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3027: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3036: error: parse error before "char" > /usr/X11R6/include/X11/Xlib.h:3049: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3192: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3241: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3273: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3364: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3371: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3391: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3397: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3409: 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:3435: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3536: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3553: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3604: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3647: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3653: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3659: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3665: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3673: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3681: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3689: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3701: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3713: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3760: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3771: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3782: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3793: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3804: error: parse error before "_Xconst" > /usr/X11R6/include/X11/Xlib.h:3815: 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" > > > Help me! > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >-- 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
It appears that the #If NeedFunctionPrototypes compiler directive has been removed from Xlib.h and Xutil.h in Xfree86 4.4. All the prototypes containing the offending _Xconst are now being processed. R 1.8.1, which built successfully under XFree86 4.3, fails under XFree86 4.4 with the same error messages.
?hist reveals argument plot=TRUE, so try plot=FALSE. On Mon, 19 Apr 2004, Randy Zelick wrote:> Hello all, > > Relative to WinXP & R1.8....No such thing. There is R 1.8.0 and R 1.8.1 but not R 1.8.> I have two histograms to plot, and for comparison purposes I want them to > have the same Y-scaling. I tried to find the size of the bin with the > maximum count before generating the histogram, but this did not work (see > below). What is a better way? > > par(mfrow=c(2,1)) # set up for plotting in 2 rows and 1 column > > x1<-seq(-0.5,58.5,1) # make a range of x values for histogram > > I thought the following lines would allow me to capture the results of the > hist function and determine the max bin count for scaling *before* making > the plot, but R cleverly saw around my method and plots it anyway. With > this code I get two plots. > > q=hist(mt1,x1) # stick results in a variable... alas also plots > cts=q$counts # get the bin counts > mct1=max(cts) # how many values in the bin with the most values > hist(mt1,x1) # generate histogram plot > > # go on with histogram #2...Something like q1 <- hist(mt1, x1, plot = FALSE) q2 <- hist(mt2, x2, plot = FALSE) mctl <- max(q1$counts, q2$counts) plot(q1, ylim=c(0, mctl)) plot(q2, ylim=c(0, mctl)) -- 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
Apparently Analagous Threads
- R 1.90 make problem with /usr/X11R6/include/X11/Xutil.h on suse linux 9.1?
- linux: compilation problems with gcc 3.3.3 and xorg (PR#6992)
- Build problems on Linux SuSE 9.1
- fix for a minor build error in R-1.9.0 with XFree86 4.4.0 (PR#6805)
- With which version of XFree86 can R compile?