installationcmakemakefilelapackipopt

Ipopt can't find Lapack, which should be installed


I'm trying to install Ipopt on a Linux machine, however I dont have any sudo rights. I think the Lapack installation was succesful (is there any way I can check this?). Due to not having sudo rights, I had to install it in a different location though. What I did was the following:

  1. Cloning the git repository of Lapack in '/volume1/dries/'
  2. Running 'make' in '/volume1/dries/lapack/'
  3. Creating the directory '/volume1/dries/.local/lapack/'
  4. Creating the directory '/volume1/dries/lapack/build/'
  5. In '/volume1/dries/lapack/build/' I ran 'cmake -DCMAKE_INSTALL_LIBDIR=/volume1/dries/.local/lapack ..' and 'cmake --build . -j --target install' which both ran without any error.

I assume this installation was succesful. Now in '/volume1/dries/' I cloned the Ipopt repository and inside I ran './configure', which gave the following error

checking for LAPACK... no
configure: error: Required package LAPACK not found.

I think it can't find Lapack because the install location is different from the standard one (which is somewhere in '/usr/local'). I also tried running './configure --with-lapack-lflags="-L/volume1/dries/lapack/build/bin/ -llapack -lblas"', but it also gave an error

checking for LAPACK... configure: error: Cannot link to user-specified Lapack -L/volume1/dries/lapack/build/bin/.

How can this be solved?


Solution

  • The error is resolved by adding the install location to the pkg config path:

    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/volume1/dries/.local/lapack/pkgconfig/
    

    Now it can find the Lapack installation.