Hi Adharsh,

Thanks for reporting this.

When you ran the first command("LLVM_VERSION=13 ..."), I believe you received an error like this at the end:
ERROR: File ".../libc++-install-130/lib/*/lib*.a" does not exist

This is indeed an issue which I have fixed here (not yet merged into the mainline):
https://github.com/klee/klee/pull/1733

The underlying issue is that different libcxx versions have different directory structures.

Let me know if you run into any other issues.

Best,
Cristian

On 13/06/2024 05:40, Adharsh Kamath wrote:
Hi all,
I'm trying to build KLEE from source, with support for libc++.
I'm following the instructions as detailed in this page - https://klee-se.org/build-llvm13/ <https://klee-se.org/build-llvm13/>

I used the following command to clone and build libc++:
LLVM_VERSION=13 BASE=/mnt/d/klee/libcxx/ ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 ENABLE_DEBUG=1 REQUIRES_RTTI=1 scripts/build/build.sh libcxx

Below is the cmake command I used to configure KLEE:
cmake -DENABLE_SOLVER_STP=ON -DENABLE_POSIX_RUNTIME=ON -DKLEE_UCLIBC_PATH=/mnt/d/klee-uclibc/ -DENABLE_KLEE_LIBCXX=ON -DKLEE_LIBCXX_INCLUDE_DIR=/mnt/d/klee/libcx x/libc++-install-130/include/c++/v1/ -DKLEE_LIBCXX_DIR=/mnt/d/klee/libcxx/libc++-install-130/ -DKLEE_LIBCXXABI_SRC_DIR=/mnt/d/klee/libcxx/llvm-130/libcxxabi/ -DLLVMCC=/usr/bin/clang-13 -DLLVMCXX=/usr/bin/clang+
+-13 ..

When I run the cmake command, I get the following error:
CMake Error at CMakeLists.txt:510 (find_file):
   Could not find KLEE_LIBCXX_BC_PATH using the following files: libc++.bca,
   libc++.so.bc, libc++.dylib.bc

I can see that bitcode files are expected in the libcxx path, but no such files were generated while building libc++. Is there any intermediate step I need to complete before running the cmake command?

Any help would be greatly appreciated!

Best,
Adharsh

_______________________________________________
klee-dev mailing list
[email protected]
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

_______________________________________________
klee-dev mailing list
[email protected]
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

Reply via email to