Hello, Daniel Liew on 2014-09-17: > On 17 September 2014 20:10, Mark R. Tuttle <[email protected]> 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
>From b7d1273c308a46bbe32c3c156dc70052026035d6 Mon Sep 17 00:00:00 2001 From: Sean Bartell <[email protected]> Date: Mon, 22 Sep 2014 22:06:42 -0500 Subject: [PATCH] Fix compilation with LLVM 3.0-3.3. F_Binary was actually moved in LLVM 3.4 (r186447), not 3.0. --- tools/klee/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index fce4e31..a92aa55 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -379,7 +379,7 @@ llvm::raw_fd_ostream *KleeHandler::openOutputFile(const std::string &filename) { std::string path = getOutputFilename(filename); #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) +#elif LLVM_VERSION_CODE >= LLVM_VERSION(3,4) 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); -- 2.1.0
_______________________________________________ klee-dev mailing list [email protected] https://mailman.ic.ac.uk/mailman/listinfo/klee-dev
