Extmethods are only linked to LAPACKE, not LAPACK
I ran into the following problem on Ubuntu:
If one does not have e.g. libopenblas-dev installed (which provides BLAS, CBLAS, and LAPACK symbols), but libblas-dev and liblapacke-dev, running the LAPACK extmethods fails with
Cannot load library: /home/dion/.local/lib/libbh_lapack_le.so: undefined symbol: dgtsv_
This is because the LAPACKE library from apt-get only contains LAPACKE symbols, not the vanilla LAPACK symbols, and the CMake script only links the libbh_lapack_{driver} libraries to LAPACKE, not LAPACK. One remedy is to issue find_package(LAPACK) in extmethods/lapack/CMakeListst.txt and link it e.g. with target_link_libraries(bh_lapack_${DRIVER} ${LAPACK_LIBRARIES} ${LAPACKE_LIBRARIES}).
When I get the time, I need to figure all of these various CMake dependencies out! At first, the LAPACKE ext method was just for show. Note that I have also only implemented a small handful of methods from LAPACK.