Discussion:
Klee: error while loading shared libraries: libstp.so: cannot open shared object file
Breno Miranda
2014-07-29 14:27:16 UTC
Permalink
Dear All,



Am I allowed to send questions related to the experimental setup of *KLEE
with LLVM 3.4* to this list? If not, please ignore this message. If yes,
then I need some help!



I followed all the instructions available here
<http://klee.github.io/klee/Experimental.html> to setup KLEE + LLVM3.4
on a *Ubuntu
14.04 / 32-bits*. After completing the setup, I tried to follow the example
in the first tutorial <http://klee.github.io/klee/Tutorial-1.html> and,
after issuing the following commands:



clang -I ../../include -emit-llvm -c -g get_sign.c

klee get_sign.o



...I got the following error message:



*Klee: error while loading shared libraries: libstp.so: cannot open shared
object file: No such file or directory*



I double-checked and *libstp.so* is available at *.../stp_build/lib/libstp.so*



Does anyone have an idea on how to fix this?



I look forward to hearing from you.



--

Yours sincerely,

Breno Miranda
Daniel Liew
2014-07-30 08:14:11 UTC
Permalink
Post by Breno Miranda
Klee: error while loading shared libraries: libstp.so: cannot open shared
object file: No such file or directory

This is a known issue. It occurs because upstream STP now builds libstp as
a shared library by default. You have two options right now.

Option 1. Delete 'libstp.so' and rebuild STP by building libstp as a
static library.
============================

There are multiple ways of telling CMake to build libstp as a static library

* If you have ccmake or originally used cmake-gui you can run 'make
edit_cache' and then proceed to change BUILD_SHARED_LIBS to OFF in the
interface that appears.

* Just run CMake again as you did originally but pass this extra option
(before the path to the stp source root)

-DBUILD_SHARED_LIBS:BOOL=OFF

Then just run make again to rebuild. Check you have 'libstp.a' in the
'/path/to/stp/build_directory/lib' and that there is no 'libstp.so' file.

Option 2. Apply changes in a pull request to KLEE
================================

- Apply the changes in this [1] pull request to KLEE.

[1] https://github.com/klee/klee/pull/136

Hope that helps. Oh and YES you can ask questions here!

Thanks
Dan.
Breno Miranda
2014-07-31 12:15:04 UTC
Permalink
Hi Daniel,

First of all, thank you very much for your prompt and helpful answer.

I initially tried "option 1" but I was still getting an error (*"CMake
Error at CMakeLists.txt:307 (message): Python interface requires shared
library"*) then I moved to "option 2" and everything is working fine now.

Once again, thank you for your support.

--
Yours sincerely,
Breno Miranda
Post by Breno Miranda
Klee: error while loading shared libraries: libstp.so: cannot open
shared object file: No such file or directory
This is a known issue. It occurs because upstream STP now builds libstp as
a shared library by default. You have two options right now.
Option 1. Delete 'libstp.so' and rebuild STP by building libstp as a
static library.
============================
There are multiple ways of telling CMake to build libstp as a static library
* If you have ccmake or originally used cmake-gui you can run 'make
edit_cache' and then proceed to change BUILD_SHARED_LIBS to OFF in the
interface that appears.
* Just run CMake again as you did originally but pass this extra option
(before the path to the stp source root)
-DBUILD_SHARED_LIBS:BOOL=OFF
Then just run make again to rebuild. Check you have 'libstp.a' in the
'/path/to/stp/build_directory/lib' and that there is no 'libstp.so' file.
Option 2. Apply changes in a pull request to KLEE
================================
- Apply the changes in this [1] pull request to KLEE.
[1] https://github.com/klee/klee/pull/136
Hope that helps. Oh and YES you can ask questions here!
Thanks
Dan.
Loading...