[klee-dev] KLEE failed to build cleanly with LLVM 3.3

Sean Bartell sean at yotann.org
Tue Sep 23 04:08:22 BST 2014


Hello,

Daniel Liew on 2014-09-17:
> On 17 September 2014 20:10, Mark R. Tuttle <tuttle at acm.org> wrote:
> > I just did a "git pull" to grab the latest commit (2497fdc) and ran into
> > trouble building against LLVM 3.3 and running the regression tests.
> >
> > Build failed in file src/tools/klee/main.cpp in function
> > KleeHandler::openOutputFile
> >
> > #if LLVM_VERSION_CODE >= LLVM_VERSION(3,5)
> >   f = new llvm::raw_fd_ostream(path.c_str(), Error, llvm::sys::fs::F_None);
> > #elif LLVM_VERSION_CODE >= LLVM_VERSION(3,0)
> >   f = new llvm::raw_fd_ostream(path.c_str(), Error,
> > llvm::sys::fs::F_Binary);
> > #else
> >   f = new llvm::raw_fd_ostream(path.c_str(), Error,
> > llvm::raw_fd_ostream::F_Binary);
> > #endif
> >
> > because llvm::sys::fs::F_Binary was not defined.  LLVM 3.3 source code seems
> > to define llvm::raw_fd_ostream::F_Binary and not llvm::sys::fs:F_Binary.  I
> > changed the reference to LLVM version 3.0 to 3.4 and the build succeeded.
> 
> We are currently targeting LLVM2.9 and LLVM3.4 [1] and are not testing
> LLVM3.3 build support. Do you need to use LLVM3.3 for any particular
> reason?
> 
> We'd happily accept a patch to fix your compilation error provided it
> doesn't break the configurations we're testing right now.

I had the same problem a while ago, and it turns out the correct guard
is >= LLVM_VERSION(3,4). I've attached a patch.

Thanks,
Sean Bartell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-compilation-with-LLVM-3.0-3.3.patch
Type: text/x-diff
Size: 1027 bytes
Desc: not available
URL: <http://mailman.ic.ac.uk/pipermail/klee-dev/attachments/20140922/cb877079/attachment.bin>


More information about the klee-dev mailing list