METIS
METIS copied to clipboard
OSError: libmetis.so: undefined symbol: gk_jbufs
When attempting to use METIS
I am facing this error:
I installed METIS in Ubuntu 20.04 by:
git clone [email protected]:KarypisLab/GKlib.git
git clone https://github.com/KarypisLab/METIS.git
cd GKlib
make config cc=gcc prefix=~/local
make
make install
cd ../METIS
make config shared=1 cc=gcc prefix=~/local i64=1 r64=1
make
make install
My cmake
is version 3.2. The runtime error arises when using the python metis
package.
I could not figure out a way to solve this issue, any assistance would be greatly appreciated. Thank you!
It looks like GKlib isn't being linked properly. I would try running one of the executables that metis provides - if that also has an error then it means there was something wrong during build. I'm not familiar with how the _dlopen
prints its error, but it looks like there is only a single symbol missing - are you able to get a verbose output?
This is caused because of a series of issues:
-
GKLib does not build shared libraries by default, use:
make config CONFIG_FLAGS='-D BUILD_SHARED_LIBS=ON'
(or add it to ther other flags you probably need) when building GKlib
-
METIS does not link to GKLib even if it exists. You need to apply the fix in #77, or:
sed -i '/add_library(metis ${METIS_LIBRARY_TYPE} ${metis_sources})/ s/$/\ntarget_link_libraries(metis GKlib)/' libmetis/CMakeLists.txt
before building
-
depending where you install GKLib you may need to tell the linker where to find GKLib (the
gklib_path
is not enough). I add to do:sed -i '/^CONFIG_FLAGS \?= / s,$, -DCMAKE_BUILD_RPATH=${HOME}/.local/lib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON,' Makefile