coin-or / SHOT

A solver for mixed-integer nonlinear optimization problems
https://shotsolver.dev
Eclipse Public License 2.0
117 stars 25 forks source link

Problems finding spdlog and cppad #165

Closed skortmann closed 1 year ago

skortmann commented 1 year ago

Hello everyone,

I was trying to install the solver using WSL2 and both CBC and IPOPT are installed. However I face the problem that two other packages are missing (?!), but now matter if I try to install them, the problem will not vanish.

Any idea on how to solve this or has someone come accross similiar problems?

Best, Steffen

(base) user@PCXXX:~/SHOT/build$ cmake -DCMAKE_BUILD_TYPE=Release -DHAS_CBC=on -DCBC_DIR=/opt/cbc -DHAS_AMPL=on -DHAS_IPOPT=on -DIPOPT_DIR=/opt/ipopt .. -- Git hash: 3557f60e CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args (PkgConfig) does not match the name of the calling package (CBC). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) misc/FindCBC.cmake:6 (include) CMakeLists.txt:189 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Checking for one of the modules 'cbc' -- Cbc found using Pkg-config: Include directories found: /usr/include/coin Library directories found: /usr/lib/x86_64-linux-gnu CMake Error at /usr/share/cmake-3.22/Modules/ExternalProject.cmake:2882 (message): No download info given for 'spdlog' and its source directory:

/home/user/SHOT/ThirdParty/spdlog

is not an existing non-empty directory. Please specify one of:

CMake Error at /usr/share/cmake-3.22/Modules/ExternalProject.cmake:2882 (message): No download info given for 'cppad' and its source directory:

/home/user/SHOT/ThirdParty/CppAD

is not an existing non-empty directory. Please specify one of:

-- Cbc include files will be used from: /usr/include/coin -- The following Cbc libraries will be used from: /usr/lib/x86_64-linux-gnu CbcSolver;Cbc;pthread;rt;Cgl;OsiClp;ClpSolver;Clp;Osi;CoinUtils;bz2;z;lapack;blas;m -- Ipopt include files will be used from: /opt/ipopt/include/coin -- The following Ipopt libraries will be used from: /usr/local/lib ipopt -- Configuring incomplete, errors occurred! See also "/home/user/SHOT/build/CMakeFiles/CMakeOutput.log".

andreaslundell commented 1 year ago

Hi,

I think the problem is that you did not fully follow the instructions on https://shotsolver.dev/shot/about-shot/compiling 😀. You need to add the --recursive flag so that the clone command also downloads the contents of the spdlog and cppad directories.

git clone https://www.github.com/coin-or/SHOT --recursive

Can you test to clone the repository again?

/Andreas