[klee-dev] Undefined warnings despite linking libcxx

Lucas Hsiung lucas.j.hsiung at gmail.com
Sat Jul 11 08:38:21 BST 2020


Hi all,

I know similar "undefined reference" errors/questions have popped up, and
most of them have been along the lines of "making sure you use the correct
flag" and "configure with the correct cmake", though for some reason I'm
pretty sure I'm doing the correct steps but still see undefined reference
errors. After parsing those, I still haven't figured it out.

My cmake command is as follows:
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_KLEE_ASSERTS=On
-DKLEE_RUNTIME_BUILD_TYPE=Release+Asserts  -DENABLE_SOLVER_STP=ON
-DENABLE_POSIX_RUNTIME=ON   -DENABLE_KLEE_UCLIBC=ON
-DKLEE_UCLIBC_PATH=/home/lucash/projects/Coppelia/klee/klee-uclibc
-DENABLE_UNIT_TESTS=ON
-DGTEST_SRC_DIR=/home/lucash/projects/Coppelia/klee/googletest-release-1.7.0
-DENABLE_KLEE_LIBCXX=ON
-DKLEE_LIBCXX_DIR=/home/lucash/lib/libc++-install-60/
-DKLEE_LIBCXX_INCLUDE_DIR=/home/lucash/lib/libc++-install-60/include/c++/v1/
..

Which I believe is correct in that I point to the klee-uclibc source tree,
and my klee runtime command is below:
klee -emit-all-errors -max-memory=100000000 -libcxx --libc=uclibc
--posix-runtime obj_dir/Vor1200_cpu.bc

Which results in the below undefined references.

I am also reasonably certain that my pointers are correct, since the first
three lines are indeed pointing to what look like correct libraries for
libcxx and uclibc.

KLEE: NOTE: Using POSIX model:
/home/lucash/projects/Coppelia/klee/build/Release+Asserts/lib/libkleeRuntimePOSIX.bca
KLEE: NOTE: Using libcxx :
/home/lucash/projects/Coppelia/klee/build/Release+Asserts/lib/libc++.bca
KLEE: NOTE: Using klee-uclibc :
/home/lucash/projects/Coppelia/klee/build/Release+Asserts/lib/klee-uclibc.bca
KLEE: output directory is
"/home/lucash/projects/Coppelia/script/obj_dir/klee-out-10"
KLEE: Using STP solver backend

KLEE: WARNING: undefined reference to function: _Unwind_DeleteException
KLEE: WARNING: undefined reference to function: _Unwind_GetIP
KLEE: WARNING: undefined reference to function:
_Unwind_GetLanguageSpecificData
KLEE: WARNING: undefined reference to function: _Unwind_GetRegionStart

KLEE: WARNING: undefined reference to function: _Unwind_RaiseException
KLEE: WARNING: undefined reference to function: _Unwind_SetGR
KLEE: WARNING: undefined reference to function: _Unwind_SetIP

KLEE: WARNING: undefined reference to function:
_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv
KLEE: WARNING: undefined reference to function:
_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv
...

Is there another step I'm missing in the cmake options -> klee runtime
linking that I'm forgetting?

Sorry for the wall of text of warnings. I appreciate any time that anyone
is willing to respond with.

--Lucas
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list