You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to install STP on Ubuntu 20.04 by following the instructions in the README. Afterwards, I typed import stp into Python (3.8.10) and was greeted with the following error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/stp/__init__.py", line 26, in <module>
from .stp import (
File "/usr/lib/python3/dist-packages/stp/stp.py", line 51, in <module>
_lib = cdll.LoadLibrary(path)
File "/usr/lib/python3.8/ctypes/__init__.py", line 451, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libminisat.so.2: cannot open shared object file: No such file or directory
Apparently, the library libminisat.so.2 is not found. After some investigating, I found out that this can be fixed by copying the library from stp/build/libstp/deps/install/lib to /usr/local/lib. After doing the same thing for libcryptominisat5.so.5.11, the import finally works.
Looking at the output of sudo cmake --install ., you can see the problem:
MiniSat and CMS are dependencies of STP; they should be installed by doing cmake --install . in the build folder of the dependency rather than STP’s build.
To be honest: I’m actually surprised they’re even in the STP build folder, but 🤷🏻♂️
Thank you for your quick reply! You are right, I copied the library files from stp/deps/install/lib and not from stp/build/lib. I actually tried to do cmake --install . in the MiniSat folder, but it only "installed" the library to stp/deps/install/lib. After some googling, I found the "trick": first I changed the install folder with cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. and then I did sudo cmake --install .. After doing the same for CMS and running ldconfig, it worked.
Wow, that took way more time than I thought it would. Maybe you could change the commands in quick install so that it works "out of the box"? Or maybe I should read the docs more thoroughly...
I tried to install STP on Ubuntu 20.04 by following the instructions in the README. Afterwards, I typed
import stp
into Python (3.8.10) and was greeted with the following error message:Apparently, the library
libminisat.so.2
is not found. After some investigating, I found out that this can be fixed by copying the library fromstp/build/lib
stp/deps/install/lib
to/usr/local/lib
. After doing the same thing forlibcryptominisat5.so.5.11
, the import finally works.Looking at the output of
sudo cmake --install .
, you can see the problem:The two libraries are never copied. Maybe I'm missing something, but this seems like a bug to me.
The text was updated successfully, but these errors were encountered: