[R] Making shared object on 64bit machine

Dong Wang dwang3 at unlnotes.unl.edu
Mon Sep 11 20:03:50 CEST 2006


   Thanks a lot, it has been solved as advised.
   Dong
   __________________________________________________
   Dong Wang
   University of Nebraska Lincoln
   -----Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: -----

     To: Dong Wang <dwang3 at unlnotes.unl.edu>
     From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
     Date: 09/11/2006 11:56AM
     cc: r-help at stat.math.ethz.ch
     Subject: Re: [R] Making shared object on 64bit machine
     On Mon, 11 Sep 2006, Dong Wang wrote:
     >
     >
     >  I  want  to  make a shared object from Fortran code to be loaded
     with
     > dyn.load(), but have the following messages:
     > # g77 -c kerimp1.f
     Where  did  that come from?  It's not the appropriate command line,
     as the
     message below very clearly tells you.
     > # R CMD SHLIB kerimp1.o
     >   gcc   -shared   -L/usr/local/lib64   -o   kerimp1.so  kerimp1.o
     -L/usr/lib64/R/lib
     > -lR
     >   /usr/bin/ld:   kerimp1.o:   relocation   R_X86_64_PC32  against
     `qweight_' can not
     > be used when making a shared object; recompile with -fPIC
     > /usr/bin/ld: final link failed: Bad value
     > collect2: ld returned 1 exit status
     > make: *** [kerimp1.so] Error 1
     >
     >  I have not encountered any problem with my old 32bit machine.  I
     now run
     >  Redhat  Enterprise  4.3  on  Dell  precision  690  with duo Xeon
     processors.  I
     > will appreciate any answer to this problem.
     How about using the answer you have been given by your linker?
     This  is  also discussed in the 'R Installation and Administration'
     Manual.
     rm kerimp1.o
     R CMD SHLIB kerimp1.f
     ought to work and is portable.
     --
     Brian D. Ripley,                  ripley at stats.ox.ac.uk
     Professor of Applied Statistics,
     [1]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

References

   1. http://www.stats.ox.ac.uk/%7Eripley/


More information about the R-help mailing list