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

John Criswell criswell at cs.uiuc.edu
Tue Jul 20 14:42:01 PDT 2004


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.

> 
> 
> /Henrik
> 
> _________________________________________________________________
> Find det, du søger på MSN Søg http://search.msn.dk
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
*********************************************************************
* John T. Criswell                         Email: criswell at uiuc.edu *
* Research Programmer                                               *
* University of Illinois at Urbana-Champaign                        *
*                                                                   *
* "It's today!" said Piglet. "My favorite day," said Pooh.          *
*********************************************************************





More information about the llvm-dev mailing list