[Rd] Bug? in some package installations when a Print is added in memory.c

subramanian R supersubu123 at gmail.com
Sat Sep 27 09:15:09 CEST 2008


Dear r-devel,
    The first time i noticed this problem is when i enabled some debug
prints in memory.c
DEBUG_GC
DEBUG_ADJUST_HEAP
DEBUG_RELEASE_MEM etc.. These have some prints for debugging .Base R package
installation completes well and good.
The problem comes when some of the Recommended package installation happens.
The following Packages fail "KernSmooth,lattice,rpart,cluster,survival
etc..."
To know the problem i removed the redirection of error to null in
R-2.7.0/src/library/Recommended/Makefile (remove 2>/dev/null around line
number 80 )
and i came to know that it tries to compile packages based on output of some
R session which i think is not proper..

Easier Way to reproduce this
======================
in InitMemory routine in memory.c add this piece of code in the starting

        Rprintf("test print\n");//so that it is printed only once
//the same problem comes with printf but not fprintf(stderr ...) That means
only STDOUT matters for this Bug


and while the package installation starts you can see some thing like after
avoiding redirection of stderr (see above)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
* Installing *source* package 'lattice' ...
** libs
make[3]: Entering directory `/tmp/R.INSTALL.NjKF3D/lattice/src'
gcc -std=gnu99 -I/home/subramra/performance-tests/R-2.7.0/include
-I/usr/local/include test print   -fPIC  -g -O2 -c init.c -o init.o
gcc -std=gnu99 -I/home/subramra/performance-tests/R-2.7.0/include
-I/usr/local/include test print   -fPIC  -g -O2 -c threeDplot.c -o
threeDplot.o
gcc: test: No such file or directory
gcc: print: No such file or directory
gcc: test: No such file or directory
gcc: print: No such file or directory
make[3]: *** [init.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [threeDplot.o] Error 1
make[3]: Leaving directory `/tmp/R.INSTALL.NjKF3D/lattice/src'
ERROR: compilation failed for package 'lattice'
** Removing '/home/subramra/performance-tests/R-2.7.0/library/lattice'
make[2]: *** [lattice.ts] Error 1
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


So essentially the problem is these packages try to compile files which are
printed out!!!!!!!!!!!And if there are prints in memory.c they FAIL.

Is this a BUG?

Thanks and Regards,
Subramanian R.



More information about the R-devel mailing list