Re: [Rd] alloca() on FreeBSD (PR#7890)

From: <>
Date: Mon 06 Jun 2005 - 11:24:26 GMT

On Mon, 23 May 2005 wrote:

> Full_Name: Eric van Gyzen
> Version: 2.1.0
> OS: FreeBSD 5.4
> Submission from: (NULL) (
> R-2.1.0 fails to compile on the newest release of FreeBSD, complaining about
> undefined references to __builtin_alloca. On FreeBSD, alloca() is declared in
> stdlib.h, not alloca.h as the R sources expect. Therefore, HAVE_DECL_ALLOCA
> does not get set, so the R sources declare alloca() after it has already been
> #defined by stdlib.h.
> A possible fix is to modify the configure script to look for the declaration of
> alloca() in stdlib.h (perhaps after it fails to find it in alloca.h).

It is already supposed to, so it is not finding the declaration there either. If you look up the definition of

AC_CHECK_DECLS([alloca], , , [#include <alloca.h>])

it searches in stdlib.h. Can you please send us the appropriate part of config.log? It may be that this is failing because alloca.h is not found (but AC_FUNC_ALLOCA is making the same assumptions).

Perhaps the easiest way out is to override the setting on FreeBSD: can you please confirm that manually changing


in config.h works?

> This was previously reported in PR#7881.

So please don't open a new report on the subject!

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Mon Jun 06 21:32:18 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:06 GMT