Discussion:
klee build error with llvm/clang 3.3
(too old to reply)
Mark R. Tuttle
2014-08-07 21:39:19 UTC
Permalink
I pulled the latest commit of KLEE dated Jul 21 2014 and built it against
LLVM and CLANG version 3.3 on SUSE11 with gcc 4.8.1, and got the following
build error complaining about "‘F_Binary’ is not a member of
‘llvm::sys::fs’"

gmake[3]: Entering directory
`/nfs/hd/disks/dt_users/mrtuttle/uefi/klee/obj/tools/klee'
llvm[3]: Compiling Debug.cpp for Release+Asserts build
llvm[3]: Compiling main.cpp for Release+Asserts build
/nfs/hd/disks/dt_users/mrtuttle/uefi/klee/src/tools/klee/main.cpp: In
member function ‘virtual llvm::raw_fd_ostream*
KleeHandler::openOutputFile(const string&)’:
/nfs/hd/disks/dt_users/mrtuttle/uefi/klee/src/tools/klee/main.cpp:377:53:
error: ‘F_Binary’ is not a member of ‘llvm::sys::fs’
f = new llvm::raw_fd_ostream(path.c_str(), Error,
llvm::sys::fs::F_Binary);

The code at line 377 in main.cpp is

#if 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

I changed LLVM_VERSION(3,0) to LLVM_VERSION(3,4) and KLEE builds. "make
check" fails one test (below) and "make unittest" passes.

Failing Tests (1):
KLEE :: CXX/StaticDestructor.cpp

Expected Passes : 106
Expected Failures : 2
Unsupported Tests : 23
Unexpected Failures: 1

Did I fix the build problem correctly? -Mark

Loading...