[Rd] assistance building R on RHEL5

Mike Dahman mike.dahman at gmail.com
Thu Nov 10 17:01:51 CET 2011


Thanks for the tips. It appears as the root cause was indeed the
fortran/gcc packages.

There was a mix of the gcc packages and gcc 44 packages. I removed the
gcc44s and installed the gcc-fortran, put the original configure
script back and compilation completed.

gcc.x86_64
gcc-c++.x86_64
gcc-gfortran.x86_64 (this was missing)

and

gcc44.x86_64
gcc44-c++.x86_64   (this was missing)
gcc44-gfortran.x86_64

You were also correct about the Rlapack_la_LIBADD syntax. I initially
changed it, but had the same result prior to fixing the gcc packages.
The compilation seemed to progress fine with the original makefile
after the gcc packages were cleaned up.

Rlapack_la_LIBADD = # $(FLIBS) $(LIBR)

'make check' just completed successfully so I'm hoping all is well.

Thanks again.

-mike

On Thu, Nov 10, 2011 at 5:43 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> On Wed, 9 Nov 2011, Mike Dahman wrote:
>
>> I have gotten this error while attempting to build R-2.13.2 and
>> R-2.14.0 using ./configure --with-x=no --enable-R-shlib, and
>> ./configure --with-x=no
>
> Hmm, gcc44 is unlikely to be a Fortran compiler.  You should not be patching
> the configure script, rather setting precious variables like F77 (see the
> R-admin manual).
>
> The problem is in your Fortran setup. At a guess, it has a static
> libgfortran (unusual with gcc 4.x).  Take a look at
> src/library/modules/lapack/Makefile . You most likely have a line
>
> Rlapack_la_LIBADD = # $(FLIBS) $(LIBR)
>
> and need
>
> Rlapack_la_LIBADD = $(FLIBS) # $(LIBR)
>
> Either that, or your compiler and your dynamic libgfortran.so are
> mis-matched.
>
>
>>
>>
>> Red Hat Enterprise Linux Server release 5.6 (Tikanga)
>>
>> =========================
>>
>> Warning in solve.default(rgb) :
>>  unable to load shared object
>> '/users/home/mked/R-2.13.2/modules//lapack.so':
>>  /users/home/mked/R-2.13.2/lib/libRlapack.so: undefined symbol:
>> _gfortran_concat_string
>> Error in solve.default(rgb) : lapack routines cannot be loaded
>> Error: unable to load R code in package 'grDevices'
>>
>> =========================
>>
>> I'm not sure how to rectify this issue.
>>
>> Note: I ran 'configure' with an updated configure script to point to
>> the fortran version that is installed.
>>
>>  F77=
>>  F95_compilers="f95 fort xlf95 ifort ifc efc pgf95 lf95 gfortran
>> gcc44-gfortran ftn g95"     # <== gcc44-gfortran added
>>  F90_compilers="f90 xlf90 pgf90 pghpf epcf90"
>>  case "${host_os}" in
>>   hpux*)
>>     F77_compilers="g77 fort77 f77 xlf frt pgf77 cf77 fl32 af77" ;;
>>   *)
>>     F77_compilers="g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77" ;;
>>  esac
>>  GCC_Fortran_compiler=
>>  if test "${GCC}" = yes; then
>>   case "${CC_VERSION}" in
>>     3.*) GCC_Fortran_compiler=g77 ;;
>>     4.*) GCC_Fortran_compiler=gcc44 ;;   # <== updated to gcc44
>>   esac
>>  fi
>>
>> thanks in advance -
>>
>> -mike
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> --
> Brian D. Ripley,                  ripley at 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
>



More information about the R-devel mailing list