[R] Compiling R with --enable-R-shlib for rpy2 error

Padma TAN tanwp at gis.a-star.edu.sg
Mon May 17 05:22:33 CEST 2010


Hi,

Thanks! :)

I'll install the newer version of R. However do I have to recompile all the modules that I did for my previous version of R?


Regards,
Padma Tan

Genome Institute of Singapore
60 Biopolis Street, Genome
#02-01 Singapore 138672
DID : 6478 8671
Fax : 6478 9058
email: tanwp at gis.a-star.edu.sg
 --------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
----------------------------------------------------------------------------------------------------------------------------------------------------------



-----Original Message-----
From: Uwe Ligges [mailto:ligges at statistik.tu-dortmund.de]
Sent: Friday, May 14, 2010 3:09 PM
To: Padma TAN
Cc: r-help at R-project.org.
Subject: Re: [R] Compiling R with --enable-R-shlib for rpy2 error



On 14.05.2010 05:07, Padma TAN wrote:
> Hi,
>
> Thanks for the reply!
>
> I am not sure if I did correctly. Now I configure with the following.
>
> ./configure --prefix=/usr/local/R/R-2.9.2 --with-gnu-ld --with-cairo --with-x --enable-R-fPIC


Then you forgot --enable-R-shlib if you need it and I cannot find (in
recent R) a hint that "--enable-R-fPIC" is a supported feature.
Really, can't you use a recent version of R (2.9.2 is somewhat outdated
now)?


Uwe Ligges


> Make and make install with no errors. However when I install rpy2, it states that "R was not built as a library"
>
> [root at plap03 rpy2-2.1.1]# python setup.py install
> running install
> running build
> running build_py
> running build_ext
> R was not built as a library
> Traceback (most recent call last):
>    File "setup.py", line 302, in<module>
>      [os.path.join('doc', 'source', 'rpy2_logo.png')])]
>    File "/usr/local/python2.6/lib/python2.6/distutils/core.py", line 152, in setup
>      dist.run_commands()
>    File "/usr/local/python2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
>      self.run_command(cmd)
>    File "/usr/local/python2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
>      cmd_obj.run()
>    File "/usr/local/python2.6/lib/python2.6/distutils/command/install.py", line 577, in run
>      self.run_command('build')
>    File "/usr/local/python2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
>      self.distribution.run_command(command)
>    File "/usr/local/python2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
>      cmd_obj.run()
>    File "/usr/local/python2.6/lib/python2.6/distutils/command/build.py", line 134, in run
>      self.run_command(cmd_name)
>    File "/usr/local/python2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
>      self.distribution.run_command(command)
>    File "/usr/local/python2.6/lib/python2.6/distutils/dist.py", line 994, in run_command
>      cmd_obj.ensure_finalized()
>    File "/usr/local/python2.6/lib/python2.6/distutils/cmd.py", line 117, in ensure_finalized
>      self.finalize_options()
>    File "setup.py", line 121, in finalize_options
>      include_dirs = get_rconfig(r_home, '--cppflags')[0].split()
>    File "setup.py", line 196, in get_rconfig
>      raise Exception(cmd + '\nreturned\n' + rconfig)
> Exception: "/usr/local/R/R-2.9.2/lib64/R/bin/R" CMD config --cppflags
> returned
>
>
> Thanks again :)
>
>
>
>
> Regards,
> Padma
>
> On 5/13/10 11:30 PM, "Uwe Ligges"<ligges at statistik.tu-dortmund.de>  wrote:
>
>
>
>
> On 13.05.2010 11:45, Padma TAN wrote:
>> Hi,
>>
>> I am trying to compile R with the command below in order to install rpy2.
>>
>> ./configure --prefix=/usr/local/R/R-2.9.2 --with-gnu-ld --with-cairo
>> --with-x --enable-R-shlib
>>
>>
>> However, error the I have gotten was:
>> /usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can
>> not be used when making a shared object; recompile with -fPIC
>> CConverters.o: could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make[3]: *** [libR.so] Error 1
>>
>> I don't really understand the error message. Is there anything I can change
>> to compile properly so that I can install rpy2?
>>
>> Please help. Thanks in advance! :)
>>
>>
>> Regards,
>> Padma
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>
>
> Note the last sentence above and try again, i.e. use a recent version of
> R and report the version number as well as the OS and the compilers in use.
>
> Best,
> Uwe Ligges
>
>
>



More information about the R-help mailing list