LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   *** No rule to make target `R'. Stop ** on installing R 2.9.0 on EL5 (http://www.linuxquestions.org/questions/linux-software-2/%2A%2A%2A-no-rule-to-make-target-%60r-stop-%2A%2A-on-installing-r-2-9-0-on-el5-749138/)

rajevar 08-20-2009 05:00 PM

*** No rule to make target `R'. Stop ** on installing R 2.9.0 on EL5
 
Hi,

I'm trying to install R 2.9.0 on EF5. I downloaded and untared the tar file and followed the README/INSTALL document. it says ./configure, make , make test to install

i did $ sudo ./configure --with-x=no and it ran well, when i try to run $sudo make, it checks lots of files and ends in saying *** No rule to make target `R'. Stop.
i thought its permission related so after running configure, i ran $sudo chmod -R 777 * from the base directory.

here is the uname -a o/p
ravind@qsrpdbdev01:~/rpms/R-2.9.0/R-2.9.0>uname -a
Linux dbdev01 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

This is the output of $ sudo make:

make[4]: Entering directory `/local/mnt/usr2/ravind/rpms/R-2.9.0/R-2.9.0/src/modules/vfonts'
make[4]: `vfonts.so' is up to date.
make[4]: Leaving directory `/local/mnt/usr2/ravind/rpms/R-2.9.0/R-2.9.0/src/modules/vfonts'
make[3]: Leaving directory `/local/mnt/usr2/ravind/rpms/R-2.9.0/R-2.9.0/src/modules/vfonts'
make[3]: Entering directory `/local/mnt/usr2/ravind'
make[3]: *** No rule to make target `R'. Stop.
make[3]: Leaving directory `/local/mnt/usr2/ravind'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/local/mnt/usr2/ravind/rpms/R-2.9.0/R-2.9.0/src/modules'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/local/mnt/usr2/ravind/rpms/R-2.9.0/R-2.9.0/src'
make: *** [R] Error 1


Any help on this is appreciated.

Thanks,
RR

weibullguy 08-20-2009 05:20 PM

Use the EL5 RPMs provided by the R Project. There are x86_64 packages available.

You haven't posted enough information to diagnose what when wrong. I would question that the configure script completed successfully though.

BTW, you don't need to sudo to execute the configure script, make or make test. It's a bad habit that I wouldn't recommend you getting into. You only need to sudo to install the package system-wide.

rajevar 08-20-2009 06:54 PM

thanks for your reply..

i have been trying to find the RPM ver 2.9.0 . the rpm i found for EL5 x86_64 package is ver 2.9.1. i got the tar from the old repository , wish i could find rpm !

weibullguy 08-20-2009 09:01 PM

Here's one --> http://centos.karan.org/el5/extras/testing/x86_64/RPMS/ I'm not an RPM user, so I don't know whether it's something you'd want to use. What's wrong with the 2.9.1 version? I'm still using 2.5.1 and don't keep up with the change logs, so I wouldn't know if there was some major change such that 2.9.1 would be that different from 2.9.0.

rajevar 08-21-2009 08:12 PM

i somehow installed R :) if i type $R i can see version 2.9.0 and the R prompt , but if i try to import rpy from python, it says "ImportError: No module named _rpy2090" :((

i think there should be file named rpy2090.so, i tried to locate it but couldnt find anywhere. should it be created as part of R installation ? or am i missing anything ?


thanks again for the help !!

weibullguy 08-23-2009 01:14 PM

No, rpy is a separate package. You can find the download page (if it's not in the EL5 repos) for rpy here --> https://sourceforge.net/projects/rpy/files/

rajevar 08-24-2009 12:49 PM

thanks for the pointer but its ending up in another issue :( . INSTALL.UNIX file says "<go to the R source directory>
make distclean", i went to /usr/lib64/R and executed the same make command but fails saying *** no rule to make target 'distclea' Stop ..i do see bin, etc, include folders under /usr/lib64/R , isn't it the R source directory ?

~/install/rpy/rpy-1.0.3>python setup.py install
RHOMES= []
DEBUG= True
Setting RHOMES to ['/usr/local/lib64/R']
### Using R verion 2.9.0 installed at /usr/local/lib64/R ###
RHOME= /usr/local/lib64/R
copying src/rpymodule.c -> src/rpymodule2090.c
copying src/R_eval.c -> src/R_eval2090.c
copying src/io.c -> src/io2090.c
running install
running build
running build_py
running build_ext
building '_rpy2090' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRPY_SHNAME=_rpy2090 -DINIT_RPY=init_rpy2090 -UPRE_2_2 -UWITH_NUMERIC -I/usr/local/lib64/R/include -Isrc -I/usr/share/R/include -I/local/mnt/qsrp/python/include/python2.5 -c src/rpymodule2090.c -o build/temp.linux-x86_64-2.5/src/rpymodule2090.o -shared
In file included from src/RPy.h:57,
from src/rpymodule2090.c:51:
/usr/local/lib64/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
In file included from src/rpymodule2090.c:51:
src/RPy.h:77:51: error: Rdevices.h: No such file or directory
src/rpymodule2090.c:1565: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1568: warning: ‘intargfunc’ is deprecated
src/rpymodule2090.c:1568: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1569: warning: ‘intintargfunc’ is deprecated
src/rpymodule2090.c:1569: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1570: warning: initialization from incompatible pointer type
src/rpymodule2090.c: In function ‘r_finalize’:
src/rpymodule2090.c:1782: warning: implicit declaration of function ‘Rf_KillAllDevices’
src/rpymodule2090.c:1788: warning: implicit declaration of function ‘R_CleanTempDir’
src/rpymodule2090.c:1776: warning: unused variable ‘tmpdir’
src/rpymodule2090.c:1775: warning: unused variable ‘buf’
error: command 'gcc' failed with exit status 1

weibullguy 08-24-2009 01:30 PM

No, the R source directory is not /usr/lib64/R. The R source directory is the directory created when you unpack the R tarball. You only need to follow the step where you "go to the R Source directory" if you need to rebuild R with shared libraries. If you used an RPM to install R, I bet you have a shared library. The shared library is call libR.so. See if you have that library installed.

Secondly, do you really have /usr/lib64/R and /usr/local/lib64/R? Did you install R from source as you were originally trying or did you use the RPM? Given the reason for the rpy failure, I am presuming you used the RPM.

Its clear what the problem is with the rpy install
Code:

src/RPy.h:77:51: error: Rdevices.h: No such file or directory
The Rdevices.h file would be provided by the R-devel RPM that you can find at the end of the link I provided in an earlier post. Install the R-devel RPM and try the rpy install again.

Also, wrap your console output in code tags. Its formats correctly and is easier to read.

rajevar 08-24-2009 06:29 PM

Thanks for helping me on this !!

yes , i used rpm package and i can find libR.so , so it means i have installed R 2.9.0 as shared library and i dont have to worry about the steps mentioned in rpy installation doc ?

<go to the R source directory>
make distclean
./configure --enable-R-shlib
make
make install

Quote:

:~/rpms/R-2.9.0/rpm>locate libR.so
/usr/lib/libR.so
/usr/lib64/R/lib/libR.so
i do have /usr/lib64/R and /usr/local/lib64/R directories.

I downloaded and installed R-devel earlier. This is the rpm -qi output

Quote:

:~/rpms/R-2.9.0/rpm>rpm -qi R-devel
Name : R-devel Relocations: (not relocatable)
Version : 2.9.0 Vendor: http://www.karan.org/
Release : 1.el5.kb.1 Build Date: Thu 21 May 2009 04:26:49 AM PDT
Install Date: Fri 21 Aug 2009 05:23:10 PM PDT Build Host: surya.karan.org
Group : Applications/Engineering Source RPM: R-2.9.0-1.el5.kb.1.src.rpm
Size : 329822 License: GPLv2+
Signature : (none)
Packager : Karanbir Singh <kbsingh@karan.org>
URL : http://www.r-project.org
Summary : Files for development of R packages
Description :
Install R-devel if you are going to develop or compile R packages

rajevar 08-24-2009 07:07 PM

adding more info :)

i did the step b mentioned in the installation doc

Quote:

make a link to RHOME/bin/libR.so in /usr/local/lib or /usr/lib, then
run 'ldconfig'

:/usr/lib>ls -lR | grep libR.so
lrwxrwxrwx 1 root root 24 Aug 22 02:15 libR.so -> /usr/lib64/R/lib/libR.so




rajevar 08-24-2009 07:10 PM

adding more info :)

i did the step b mentioned in the installation doc

Quote:

make a link to RHOME/bin/libR.so in /usr/local/lib or /usr/lib, then
run 'ldconfig'
i created a link in /usr/lib

Quote:

:/usr/lib>ls -lR | grep libR.so
lrwxrwxrwx 1 root root 24 Aug 22 02:15 libR.so -> /usr/lib64/R/lib/libR.so

running ldconfig, is erroring out. i located the .so files and created links for the same inside /sbin but i still see the same output as follows

Quote:

:/sbin > sudo ./ldconfig
./ldconfig: /usr/lib64/mysql/libmysqlclient.so.15 is not a symbolic link
./ldconfig: /usr/lib64/mysql/libmysqlclient_r.so.15 is not a symbolic link
./ldconfig: /lib64/libpcre.so.0 is not a symbolic link


weibullguy 08-24-2009 08:51 PM

Quote:

Originally Posted by rajevar (Post 3656150)
i did the step b mentioned in the installation doc ...
created links for the same inside /sbin but i still see the same output as follows

OK, you're polluting your system! Delete the link in /usr/lib and the links you created in /sbin.

I'm guessing the RPM installed R into /usr/lib64/R. What is the version of the R installed in /usr/local/lib64/R? Execute the following to find out
Code:

/usr/local/lib64/R/bin/R
Did you execute make install when you were trying to install from source? If it were me, I would uninstall all the R stuff and then start over with just the RPMs.

According to this rpy mail list thread --> http://www.mail-archive.com/rpy-list.../msg01343.html one solution is go to the rpy source directory and execute the following
Code:

sed -i 's/<Rdevices.h>/<Rembedded.h>/' src/RPy.h
sudo python setup.py install

Rdevices.h is no longer installed as part of the R installation. The other option, also mentioned in the above thread, is to copy Rdevices.h from the R source to /usr/lib64/R/include, then build rpy. However, this results in many more errors that require many more internal R headers to be installed.

This is why rpy2 is recommended for use with versions of R >= 2.8.0.

rajevar 08-25-2009 12:54 PM

thank you for helping me on this !!

maybe i sound dumb to give you an overview. we were using python 2.4 and yum was working on it, i installed earlier version of R using yum install. later we upgraded the system to python 2.5 and i believe yum wont work on python 2.5. so to install R 2.9.0, i uninstalled all the R related modules using rpm -e <module-name> and i installed R 2.9.0 rpy , rpm -i <module-name>

to answer your questions :
What is the version of the R installed in /usr/local/lib64/R?
Quote:

ravind@qsrpdbdev01:/usr/local/lib64/R/bin>R
Fatal error: unable to open the base package
but if i try /usr/bin/R its getting proper R version.
Quote:

ravind@qsrpdbdev01:/usr/local/lib64/R/bin>/usr/bin/R

R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
....
....

> q()
Save workspace image? [y/n/c]: n
i tried which R
Quote:

ravind@qsrpdbdev01:/usr/local/lib64/R/bin>which R
/usr/local/bin/R
ravind@qsrpdbdev01:/usr/local/lib64/R/bin>/usr/local/bin/R
Fatal error: unable to open the base package

ravind@qsrpdbdev01:/usr/local/lib64/R/bin>

by the way, i tried
Quote:

sed -i 's/<Rdevices.h>/<Rembedded.h>/' src/RPy.h
sudo python setup.py install
and it seem to worked. it took R from /usr/local/lib64/R

Quote:

ravind@qsrpdbdev01:~/install/rpy/rpy-1.0.3>sudo python setup.py install
RHOMES= []
DEBUG= True
Setting RHOMES to ['/usr/local/lib64/R']
### Using R verion 2.9.0 installed at /usr/local/lib64/R ###
RHOME= /usr/local/lib64/R
copying src/rpymodule.c -> src/rpymodule2090.c
copying src/R_eval.c -> src/R_eval2090.c
copying src/io.c -> src/io2090.c
running install
running build
running build_py
running build_ext
building '_rpy2090' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRPY_SHNAME=_rpy2090 -DINIT_RPY=init_rpy2090 -UPRE_2_2 -UWITH_NUMERIC -I/usr/local/lib64/R/include -Isrc -I/usr/share/R/include -I/local/mnt/qsrp/python/include/python2.5 -c src/rpymodule2090.c -o build/temp.linux-x86_64-2.5/src/rpymodule2090.o -shared
In file included from src/RPy.h:57,
from src/rpymodule2090.c:51:
/usr/local/lib64/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
src/rpymodule2090.c:1565: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1568: warning: ‘intargfunc’ is deprecated
src/rpymodule2090.c:1568: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1569: warning: ‘intintargfunc’ is deprecated
src/rpymodule2090.c:1569: warning: initialization from incompatible pointer type
src/rpymodule2090.c:1570: warning: initialization from incompatible pointer type
src/rpymodule2090.c: In function ‘r_finalize’:
src/rpymodule2090.c:1776: warning: unused variable ‘tmpdir’
src/rpymodule2090.c:1775: warning: unused variable ‘buf’
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRPY_SHNAME=_rpy2090 -DINIT_RPY=init_rpy2090 -UPRE_2_2 -UWITH_NUMERIC -I/usr/local/lib64/R/include -Isrc -I/usr/share/R/include -I/local/mnt/qsrp/python/include/python2.5 -c src/R_eval2090.c -o build/temp.linux-x86_64-2.5/src/R_eval2090.o -shared
In file included from src/RPy.h:57,
from src/R_eval2090.c:63:
/usr/local/lib64/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRPY_SHNAME=_rpy2090 -DINIT_RPY=init_rpy2090 -UPRE_2_2 -UWITH_NUMERIC -I/usr/local/lib64/R/include -Isrc -I/usr/share/R/include -I/local/mnt/qsrp/python/include/python2.5 -c src/io2090.c -o build/temp.linux-x86_64-2.5/src/io2090.o -shared
In file included from src/RPy.h:57,
from src/io2090.c:43:
/usr/local/lib64/R/include/R_ext/Rdynload.h:26: warning: function declaration isn’t a prototype
src/io2090.c:62: warning: function declaration isn’t a prototype
src/io2090.c: In function ‘RPy_ReadConsole’:
src/io2090.c:133: warning: pointer targets in passing argument 1 of ‘snprintf’ differ in signedness
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRPY_SHNAME=_rpy2090 -DINIT_RPY=init_rpy2090 -UPRE_2_2 -UWITH_NUMERIC -I/usr/local/lib64/R/include -Isrc -I/usr/share/R/include -I/local/mnt/qsrp/python/include/python2.5 -c src/setenv.c -o build/temp.linux-x86_64-2.5/src/setenv.o -shared
gcc -pthread -shared build/temp.linux-x86_64-2.5/src/rpymodule2090.o build/temp.linux-x86_64-2.5/src/R_eval2090.o build/temp.linux-x86_64-2.5/src/io2090.o build/temp.linux-x86_64-2.5/src/setenv.o -L/usr/local/lib64/R/bin -L/usr/local/lib64/R/lib -Wl,-R/usr/local/lib64/R/bin -Wl,-R/usr/local/lib64/R/lib -lR -lRlapack -o build/lib.linux-x86_64-2.5/_rpy2090.so
running install_lib
copying build/lib.linux-x86_64-2.5/_rpy2090.so -> /local/mnt/qsrp/python/lib/python2.5/site-packages
copying build/lib.linux-x86_64-2.5/rpy_options.py -> /local/mnt/qsrp/python/lib/python2.5/site-packages
copying build/lib.linux-x86_64-2.5/rpy_wintools.py -> /local/mnt/qsrp/python/lib/python2.5/site-packages
byte-compiling /local/mnt/qsrp/python/lib/python2.5/site-packages/rpy_options.py to rpy_options.pyc
byte-compiling /local/mnt/qsrp/python/lib/python2.5/site-packages/rpy.py to rpy.pyc
byte-compiling /local/mnt/qsrp/python/lib/python2.5/site-packages/rpy_wintools.py to rpy_wintools.pyc
running install_egg_info
Writing /local/mnt/qsrp/python/lib/python2.5/site-packages/rpy-1.0.3-py2.5.egg-info

rajevar 08-25-2009 04:10 PM

out of desperation, i added "/usr/bin" to the PATH in ~/.bash_proflle file of my user

PATH=/usr/bin:/local/mnt/qsrp/python/bin:

now if i type R, i see R prompt and version 2.9.0
but if i try import rpy, i see "Segmentation fault" :(

Quote:

ravind@qsrpdbdev01:~>python -c 'import rpy'
RHOME : /usr/lib64/R
RVERSION : 2.9.0
RVER : 2090
Segmentation fault
Quote:

ravind@qsrpdbdev01:~>which R
/usr/bin/R

weibullguy 08-25-2009 05:34 PM

Quote:

Originally Posted by rajevar (Post 3657320)
out of desperation, i added "/usr/bin" to the PATH in ~/.bash_proflle file of my user

PATH=/usr/bin:/local/mnt/qsrp/python/bin:

now if i type R, i see R prompt and version 2.9.0
but if i try import rpy, i see "Segmentation fault" :(

You built rpy against the R in /usr/local, but when you import the module, it says RHOME is /usr/lib64/R! You've got a different version of rpy than the one you built against the R in /usr/local. I think you also have another python installed in /usr/bin. When you added /usr/bin to your PATH variable, that is the version of python you used.

You said the system originally had ver 2.4 and then was upgraded to ver 2.5. Which version is in /usr/bin and which version is in /local/mnt/qsrp/python/bin?

Sounds like you've got your system boogered up pretty good. Looks like you've got a working R installed at /usr/lib64/R and a broken one installed at /usr/local/lib64/R. I'll ask again, did you execute make install when you were trying to install from source? I think you did and it installed a half-baked R in /usr/local.

The PATH=/usr/bin:/local/mnt/qsrp/python/bin: in your bash_profile, causes the PATH variable to be reset with only those paths. A better approach would be PATH=/local/mnt/qsrp/python/bin:$PATH. This will ensure the python you've installed in the /local hierarchy is found and used before one that may be installed in a normal place like /usr/bin.

First, I recommend you change that line and then source your bash_profile. Of course, /local is an odd directory to have in your root. To me it looks like something else you've added in desperation.

Then I would recommend you uninstall the borked R in /usr/local. If this was installed by a make install on your part, you can simply delete the entire /usr/local/lib64/R directory and the files /usr/local/lib64/libR.so, /usr/local/lib64/libRmath*, /usr/local/bin/R, /usr/local/bin/Rscript, /usr/local/lib64/pkgconfig/libR.pc, and /usr/local/lib64/pkgconfig/libRmath.pc. Some or all of these files may not exist if this was caused by an aborted make install.

Also delete the link in /usr/lib and the links you created in /sbin that you mentioned creating earlier. After that, rebuild rpy and make sure it builds against the R in /usr/lib64/R.


All times are GMT -5. The time now is 09:08 PM.