Re: [Rd] Compile error on a 'scratch' linux distro

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 22 Jun 2007 11:28:29 +0100 (BST)

On Fri, 22 Jun 2007, Dan Bolser wrote:

> Here are the details...
>
> uname -a
> Linux yellow 2.6.16.1.i686.1 #23 SMP Mon Aug 28 15:36:14 CEST 2006
> i686 GNU/Linux
>
> gcc --version
> gcc (GCC) 4.2.0
>
> g77 --version
> GNU Fortran (GCC) 3.4.4

You need a matching gcc set: the gcc4 support routines are not matching those for gcc3.

Since your gcc postdates your OS, I suggest you get gfortran from gcc 4.2.0 to match. In what sense is this a 'scratch' distro? I'd be surprised if a distro shipped with gcc 4.2.0 (released 2007-05-13) and an outdated kernel.

> What else should I post that may help debug this problem? Below is the
> text of the error...
>
> make[3]: Entering directory `/tmp/R-2.5.0/src/main'
> gcc -std=gnu99 -Wl,--export-dynamic -L/usr/local/lib -o R.bin Rmain.o
> CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o
> arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o
> character.o coerce.o colors.o complex.o connections.o context.o cov.o
> cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o
> dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o
> fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o
> iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o
> match.o memory.o model.o names.o objects.o optim.o optimize.o
> options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o
> print.o printarray.o printvector.o printutils.o qsort.o random.o
> regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o
> serialize.o size.o sort.o source.o split.o sprintf.o startup.o
> subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o
> version.o vfonts.o xxxpr.o ../unix/libunix.a ../appl/libappl.a
> ../nmath/libnmath.a -L../../lib -lRblas
> -L/arch/i686/usr/lib/gcc/i686-pc-linux-gnu/3.4.4
> -L/arch/i686/usr/lib/gcc -L/arch/i686/usr/lib -lg2c -lm -lgcc_s
> ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a
> -lreadline -ldl -lm -liconv
> complex.o: In function `z_logbase':
> /tmp/R-2.5.0/src/main/complex.c:450: undefined reference to `__divdc3'
> complex.o: In function `z_atan2':
> /tmp/R-2.5.0/src/main/complex.c:544: undefined reference to `__divdc3'
> complex.o: In function `complex_binary':
> /tmp/R-2.5.0/src/main/complex.c:257: undefined reference to `__divdc3'
> /tmp/R-2.5.0/src/main/complex.c:245: undefined reference to `__muldc3'
> collect2: ld returned 1 exit status
> make[3]: *** [R.bin] Error 1
> make[3]: Leaving directory `/tmp/R-2.5.0/src/main'
> make[2]: *** [R] Error 2
> make[2]: Leaving directory `/tmp/R-2.5.0/src/main'
> make[1]: *** [R] Error 1
> make[1]: Leaving directory `/tmp/R-2.5.0/src'
> make: *** [R] Error 1
>
> ______________________________________________
> 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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 22 Jun 2007 - 10:44:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Jun 2007 - 12:35:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.