From ripley at stats.ox.ac.uk  Fri May 20 08:35:30 2005
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Fri May 20 08:35:36 2005
Subject: [Rd] make fails in errors.c (PR#7881)
Message-ID: <20050520063530.14B02A1D8@slim.kubism.ku.dk>

What makes you think this is an error in R?

You have already been told that the message refers to your OS, not R.

Earlier versions of R did not use alloca: it looks very likely that your 
systems's alloca is implemented in a broken way.


On Thu, 19 May 2005 rhurlin@gwdg.de wrote:

> Full_Name: Rainer Hurling
> Version: R-2.1.0
> OS: FreeBSD6-CURRENT from May 19 2005
> Submission from: (NULL) (213.54.77.26)
>
>
> /configure does well in FreeBSD6-CURRENT.
>
> When typing 'make' after a while I get:
>
> -------------------------------------
> [...snip...]
> gcc -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
> 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 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   -lg2c -lm  ../extra/zlib/libz.a
> ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a
> /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lreadline -lm
> -liconv
>
> errors.o(.text+0x154b): In function `do_gettext':
> /usr/local/R-2.1.0/src/main/errors.c:779: undefined reference to
> `__builtin_alloca'
> errors.o(.text+0x15fa):/usr/local/R-2.1.0/src/main/errors.c:752:
> undefined reference to `__builtin_alloca'
> errors.o(.text+0x1652):/usr/local/R-2.1.0/src/main/errors.c:760:
> undefined reference to `__builtin_alloca'
> errors.o(.text+0x16aa):/usr/local/R-2.1.0/src/main/errors.c:770:
> undefined reference to `__builtin_alloca'
> errors.o(.text+0x1728):/usr/local/R-2.1.0/src/main/errors.c:738:
> undefined reference to `__builtin_alloca'
> errors.o(.text+0x274d):/usr/local/R-2.1.0/src/main/errors.c:829: more
> undefined references to `__builtin_alloca' follow
> *** Error code 1
>
> Stop in /usr/local/R-2.1.0/src/main.
> *** Error code 1
>
> Stop in /usr/local/R-2.1.0/src/main.
> *** Error code 1
>
> Stop in /usr/local/R-2.1.0/src.
> *** Error code 1
>
> Stop in /usr/local/R-2.1.0.
> -------------------------------------
>
> Asking for the problem at R-devel I got this answer from Prof. Brian Ripley:
>
> "R itself does not refer to __builtin_alloca.  That is something being mapped by
> the FreeBSD headers, and it should be `builtin' using gcc.  (No version of
> alloca is appearing as an import in error.o on Linux or Solaris using gcc.)  So
> it looks like an inconsistency between your compiler and OS."
>
> My gcc version is 3.4.2 [FreeBSD] 20040728.
>
> There is no problem compiling R-2.0.1 and older versions on the same system.
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@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


[Rd] make fails in errors.c (PR#7881)
ripley@stats.ox.ac.uk