Compilation error: cannot find -lipasircryptominisat5
When compiling pandaPIengine, I encountered the following issue (after Linking CXX executable pandaPIengine seemed to be successful):
/usr/bin/ld: cannot find -lipasircryptominisat5 collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/pandaPIengine.dir/build.make:221: pandaPIengine] Error 1 make[1]: *** [CMakeFiles/Makefile2:257: CMakeFiles/pandaPIengine.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
I tried to compile pandaPIengine with -DSAT=ON. The error occurred both on WSL and native Ubuntu.
My build configuration/environment was (on both systems):
- 20.04.2
- gcc version 9.3.0
- make 4.2.1
- cmake 3.16.3
- gengetopt 2.23
It seems that cryptominisat is not properly built during the build process. This is not an issue, if the shared library crpytominisat.so can already be found on the machine (typically under /lib or /urs/lib). If, however, one has no root access, what worked for me is to place the .so file at some directory /dir/subdir I have access to and add it temporary to the PATH via export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/dir/subdir.