[cfe-dev] ExceptionDemo build failed

Garrison Venn gvenn.cfe.dev at gmail.com
Mon Apr 11 07:45:25 PDT 2011


Hi Dawie,

So I tested this with make on head branch for OS X 10.6.x, and it compiled and ran fine.
Since it looks like your are using cmake, and you are getting un-defines for symbols in 
stdio.h and other headers, your environment is a little different from mine. Would you be 
willing to help debug this as I don't have immediate access to a Linux system (I'm assuming 
you are on one)?

If so, could you temporarily add #include <cstdio> on top of the existing #include <sstream> in
ExceptionDemo.cpp (<source root>/llvm/examples/ExceptionDemo.cpp), and then build, and 
give me the results. That would be really helpful. 

If you don't have time, I'll build a system later today to test.

Thanks in advance

Garrison

On Apr 11, 2011, at 2:06, Dawie Joubert wrote:

> Chris,
> 
> That fixed the "overloaded error" ... but now I have the following error
> (from a clean build environment):
> 
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void print32Int(int, const char*)’:
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:271: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:271: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:275: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:275: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void print64Int(long int, const char*)’:
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:288: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:288: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:292: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:292: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void printStr(char*)’:
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:301: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:301: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:304: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:304: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void runExceptionThrow(llvm::ExecutionEngine*, llvm::Function*, int32_t)’:
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1594: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1597: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1606: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1607: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘int main(int, char**)’:
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1912: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1921: error: ‘fprintf’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1982: error: ‘stderr’ was not declared in this scope
> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1982: error: ‘fprintf’ was not declared in this scope
> make[2]: ***
> [examples/ExceptionDemo/CMakeFiles/ExceptionDemo.dir/ExceptionDemo.cpp.o] Error 1
> make[1]: *** [examples/ExceptionDemo/CMakeFiles/ExceptionDemo.dir/all]
> Error 2
> make[1]: *** Waiting for unfinished jobs....
> 
> 
> Best regards,
> 
> Dawie Joubert
> Senior Researcher: Information Security, Modelling and Digital Science,
> CSIR
> 
> Tel: +27 12 841 3379
> Fax: +27 12 841 2456
> Mobile: +27 84 589 2078
> E-Mail: djjoubert at csir.co.za
> 
> 
> 
> -----Original Message-----
> From: Chris Lattner <clattner at apple.com>
> To: djjoubert at csir.co.za
> Cc: cfe-dev <cfe-dev at cs.uiuc.edu>
> Subject: Re: [cfe-dev] ExceptionDemo build failed
> Date: Fri, 08 Apr 2011 11:01:25 -0700
> 
> On Apr 8, 2011, at 12:12 AM, Dawie Joubert wrote:
> 
>> Dear LLVM Devs,
>> 
>> Recently when doing even a clean build the following error occurs:
>> 
>> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp: In function ‘void createStandardUtilityFunctions(unsigned int, llvm::Module&, llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >&)’:
>> /home/dawiejoubert/Source/SVN/Clang/llvm/examples/ExceptionDemo/ExceptionDemo.cpp:1666: error: call of overloaded ‘get(llvm::LLVMContext&, const llvm::IntegerType*, NULL)’ is ambiguous
> 
> Fixed in r129139, thanks.
> 
> -Chris
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list