[R] Building R on Fedora Core 2 from the src rpm

About this list Date view Thread view Subject view Author view Attachment view

From: Christopher Albert (christopher.albert@mcgill.ca)
Date: Thu 20 May 2004 - 02:34:19 EST


Message-id: <40AB8C8B.8010301@mcgill.ca>

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

______________________________________________
R-help@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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST