/usr/local/src/llvm/include/Config/alloca.h:42:17: #error "The function alloca()

Hi

As shown below, the .\configure script found a version of alloca():

Henrik Bach wrote:

Hi

As shown below, the .\configure script found a version of alloca():
---------------------
configure:20831: checking for working alloca.h
configure:20853: gcc -o conftest -g -O2 conftest.c -ldl >&5
configure:20856: $? = 0
configure:20859: test -s conftest
configure:20862: $? = 0
configure:20873: result: yes
configure:20883: checking for alloca
configure:20925: gcc -o conftest -g -O2 conftest.c -ldl >&5
configure:20928: $? = 0
configure:20931: test -s conftest
configure:20934: $? = 0
configure:20945: result: yes
---------------------

However, I got this error when compiling:
---------------------
In file included from FileUtilities.cpp:22:
/usr/local/src/llvm/include/Config/alloca.h:42:17: #error "The function alloca() is required but not found!"
---------------------

By looking in include/Config/config.h:
---------------------
/* Define to 1 if you have `alloca', as a function or macro. */
/* #undef HAVE_ALLOCA */

/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
  */
/* #undef HAVE_ALLOCA_H */
---------------------
The macros are not set as expected. The alloca() function is defined in <alloca.h> header file.

Are you sure that you are looking at OBJDIR/include/Config/config.h and not SRCDIR/include/Config/config.h.in?

Also, does defining HAVE_ALLOCA_H to 1 fix the compilation?

-- John T.