[klee-dev] make: error: Unable to link with functions of libllvm

Martin Nowack martin_nowack at tu-dresden.de
Wed Nov 4 19:33:55 GMT 2015


Hey Ren,

For me it looks like an RTTI issue.
Try to disable the 3 lines in Makefile.rules from 300-302 in the KLEE source directory.

https://github.com/klee/klee/blob/09ed8c23c9ca7e9d35013604e1133a371821dc5f/Makefile.rules#L303

Do a `make clean` and rebuild KLEE.

If that helps, please open a bug report (or let me know and I’ll open one for you).
I guess we have to update the checks, currently we just disable RTTI if we have > LLVM 2.6.

Cheers,
Martin


> On 03 Nov 2015, at 19:15, Ren Kimura <rkx1209dev at gmail.com> wrote:
> 
> Hi
> I'm trying to build klee but when running make, many link errors occurred.
> 
> $ ./configure
> $ sudo make VERBOSE=1
> ...
> 
> llvm[2]: Linking Release+Asserts executable klee (without symbols)
> g++ -I/home/rkx/klee/include -I/home/rkx/klee/tools/klee -I/usr/lib/llvm-3.4/build/include  -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -O2 -fomit-frame-pointer -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual  -DKLEE_DIR=\"/home/rkx/klee\" -DKLEE_INSTALL_BIN_DIR=\"/usr/local/bin\" -DKLEE_INSTALL_RUNTIME_DIR=\"/usr/local/lib/klee/runtime\" -DEXT_HASH_MAP -g -O2 -g -Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -Wl,-Bsymbolic-functions -Wl,-z,relro   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings  -g -O2 -Wl,-R -Wl,'$ORIGIN/../lib' -Wl,-R -Wl,/home/rkx/klee/Release+Asserts/bin -rdynamic -L/home/rkx/klee/Release+Asserts/lib -L/usr/lib/llvm-3.4/build/Release/lib  -o /home/rkx/klee/Release+Asserts/bin/klee  /home/rkx/klee/tools/klee/Release+Asserts/Debug.o /home/rkx/klee/tools/klee/Release+Asserts/main.o -lkleeCore -lkleeBasic -lkleeModule -lkleaverSolver -lkleaverExpr -lkleeSupport \
> -lLLVM-3.4.2   -lpthread -lffi -ltinfo -ldl -lm  -lstp -lminisat
> /home/rkx/klee/tools/klee/Release+Asserts/main.o: In function `KleeHandler::openOutputFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
> /home/rkx/klee/tools/klee/main.cpp:382: undefined reference to `llvm::raw_fd_ostream::raw_fd_ostream(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, llvm::sys::fs::OpenFlags)'
> 
> ...
> (and many similar errors)
> ...
> 
> I've checked that libLLVM-3.4.2.so exports above functions correctly by nm command.
> 
> Why this happen?
> Thanks.
> 
> _______________________________________________
> klee-dev mailing list
> klee-dev at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

---------------------------------------------------
Martin Nowack
Research Assistant

Technische Universität Dresden
Computer Science
Institute of Systems Architecture
Systems Engineering
01062 Dresden

Phone: +49 351 463 39608
Email: martin_nowack at tu-dresden.de
----------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/klee-dev/attachments/20151104/4c069ff2/attachment.sig>


More information about the klee-dev mailing list