Where did FFLAGS come from here (looks like you meant FPICFLAGS)?

But that will only postpone the problem: to build R as a shared library you need PIC libraries, and your Fortran library is apparently not PIC (gcc does not generate PIC code by default on x86_64, and g95 as a gcc derivative is presumably the same). Even if you don't build R as shared library, the problem is likely to crop up in some packages (probably including stats).

gcc 4.0.3 is rather old (and rather too early in the gcc4 series). Can you get a later compiler quite (prrferably gcc + gfortran)?

On Tue, 10 Mar 2009, Jeff Hamann wrote:

I'm sorry for having to post this, but I've run out of ideas. I've been
trying to build R-2.8.1 from source for installation on FreeBSD 6.4
(seems to be working fine on osx) and keep getting the same results,
regardless of how I set ./configure


$ ./configure --enable-R-shlib --with-x=no --with-blas FFLAGS="-fpic"

R is now configured for x86_64-unknown-freebsd6.0

 Source directory:          .
 Installation directory:    /usr/local

 C compiler:                gcc -std=gnu99  -g -O2
 Fortran 77 compiler:       f95  -fpic

 C++ compiler:              g++  -g -O2
 Fortran 90/95 compiler:    g95 -g -O2
 Obj-C compiler:              -g -O2

 Interfaces supported:      tcltk
 External libraries:        readline
 Additional capabilities:   PNG, JPEG, TIFF, iconv, MBCS, NLS
 Options enabled:           shared R library, shared BLAS, R profiling

 Recommended packages:      yes

$ make

generates the following results:

$ make
creating src/scripts/R.fe
config.status: creating src/include/config.h
config.status: src/include/config.h is unchanged
Rmath.h is unchanged
gcc -std=gnu99 -shared -L/usr/local/lib -o libRblas.so blas.o
cmplxblas.o -L/usr/local/lib/gcc-lib/x86_64-portbld-freebsd6.0/4.0.3
-lf95 -lm # xerbla.o
/usr/bin/ld:
/usr/local/lib/gcc-lib/x86_64-portbld-freebsd6.0/4.0.3/libf95.a(ff.o):
relocation R_X86_64_32S can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/gcc-lib/x86_64-portbld-freebsd6.0/4.0.3/libf95.a: could
not read symbols: Bad value
*** Error code 1

Stop in /usr/home/hamannj/R-2.8.1/src/extra/blas.
*** Error code 1

Stop in /usr/home/hamannj/R-2.8.1/src/extra/blas.
*** Error code 1

Stop in /usr/home/hamannj/R-2.8.1/src/extra.
*** Error code 1

Stop in /usr/home/hamannj/R-2.8.1/src.
*** Error code 1

Stop in /usr/home/hamannj/R-2.8.1.
you have mail
$

Is this is problem with g95, gcc(s) or something I'm not doing
correctly? Should I try to build an earlier version instead? I've tried
building the g95 freebsd port (not from source) and can't seem to get
any traction...

any ideas?
Thanks.









--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to