[SCIP] compile scip with papilo

Hoen, Alexander hoen at zib.de
Fri Jul 28 09:02:04 CEST 2023


Hi Peter,

The log with the build 1.81 looks good I would say.
The Component "program_options" is missing: The program_options library allows program developers to obtain program option.
If you want to use PaPILO only as a library this component is obviously not needed.
Unfortunately, in PaPILO 2.1.2 this component is still labeled as REQUIRED. But on the current develop-branch, we made this optional. ( with the downside that you can not use PaPILO via command-line anymore.)
If you are using the develop branch and try to build PaPILO with this branch? https://github.com/scipopt/papilo/tree/develop

> With this one I can build papilo successfully.

That's great. I probably guess that program options are present there.


> The next step is building scip.but unfortunately this gives the following error:

Could you maybe provide more information? The CMake command that you used and the log until the crash. That would be great.

/Alex

P.S: Adding -DPAPILO=off disables PaPILO in SCIP and you should be able to build SCIP successfully, if you want to use SCIP immediately.

________________________________
From: Peter Notebaert <mail at peno.be>
Sent: Thursday, July 27, 2023 11:27:16 PM
To: Hoen, Alexander
Cc: scip-bounces at zib.de
Subject: Re: [SCIP] compile scip with papilo

Thank you,

I downloaded boost from https://www.boost.org/

I first tried with boost 1.81:

C:\git\papilo\build>cmake .. -DBOOST_ROOT=c:\git\boost_1_81_0
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.35.32215.0
-- The CXX compiler identification is MSVC 19.35.32215.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options) (found suitable version
  "1.81.0", minimum required is "1.65")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2377 (find_package_handle_standard_args)
  CMakeLists.txt:50 (find_package)


-- Configuring incomplete, errors occurred!

So it says:

CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options) (found suitable version
  "1.81.0", minimum required is "1.65")

I also tried version 1.65:

C:\git\papilo\build>cmake .. -DBOOST_ROOT=c:\git\boost_1_65_0
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.35.32215.0
-- The CXX compiler identification is MSVC 19.35.32215.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options) (found suitable version
  "1.65.0", minimum required is "1.65")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2377 (find_package_handle_standard_args)
  CMakeLists.txt:50 (find_package)


-- Configuring incomplete, errors occurred!

I read that other people have the same issue.

Therefore I downloaded boost from https://sourceforge.net/projects/boost/which is an already build version.

With this one I can build papilo successfully.

The next step is building scip.but unfortunately this gives the following error:

presol_milp.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::archive::codecvt_null<wchar_t>::cod
ecvt_null<wchar_t>(unsigned __int64)" (??0?$codecvt_null at _W@archive at boost@@QEAA at _K@Z) referenced in function "public: v
oid __cdecl boost::archive::codecvt_null<wchar_t>::`default constructor closure'(void)" (??_F?$codecvt_null at _W@archive@
boost@@QEAAXXZ) [C:\git\scip\buildpapilo\src\scip.vcxproj]
C:\git\scip\buildpapilo\bin\Release\scip.exe : fatal error LNK1120: 1 unresolved externals [C:\git\scip\buildpapilo\src
\scip.vcxproj]

Any  idea?

Peter



On Fri, 21 Jul 2023 at 14:56, Hoen, Alexander <hoen at zib.de<mailto:hoen at zib.de>> wrote:

Hello Peter,

sorry for taking a while for answering your question.

> Do I have to build papilo first before I can link it to scip?

> Well I tried that but no luck there also. I looks like papilo also needs boost which I got from https://github.com/boostorg/boost
> I use the following command for this:
> cmake .. -DBoost_INCLUDE_DIR=C:\git\boost\libs\config\include -DBOOST_ROOT=C:\git\boost


Yes PaPILO needs Boost and PaPILO needs to build before linking it to SCIP (-DPAPILO_DIR=.../papilo/build).

I would recommend downloading Boost from https://www.boost.org/.

For Ubuntu you are just fine with extracting the gz-filed and then set the BOOST_ROOT path to this extracted folder: -DBOOST_ROOT=PATH_TO_FOLDER .

We would not recommend using the newest versions (>= 1.82). Please use the version 1.81 or even an older one.


I hope this helps. Otherwise do not hesitate to ask.


Best regards,

 Alex

________________________________
From: Scip <scip-bounces at zib.de<mailto:scip-bounces at zib.de>> on behalf of Peter Notebaert <mail at peno.be<mailto:mail at peno.be>>
Sent: Tuesday, July 4, 2023 12:42 PM
To: scip at zib.de<mailto:scip at zib.de>
Subject: [SCIP] compile scip with papilo

I want to compile scip myself and I partly succeeded in it.

First I installed soplex from github:

git clone https://github.com/scipopt/soplex.git

Then I compiled soplex with the following commands:

cd soplex
cmake -Bbuild -H.
cmake --build build --config Release

This succeeds and I can optimize something with soplex

Then I want to build scip. I got the code from github:

git clone https://github.com/scipopt/scip.git

I can then compile scip as follows:

cd scip
cmake -Bbuild -H. -DSOPLEX_DIR=..\soplex\build -DZLIB=off -DREADLINE=off -DGMP=off -DPAPILO=off -DZIMPL=off -DIPOPT=off
cmake --build build --config Release

This compiles again with microsoft visual studio 2017.

However this gave an error which I already reported previously and will be fixed.

Specifically:

return this->_tolerances == nullptr ? R(0) : this->tolerances()->epsilon();

I changed to:

return this->_tolerances == nullptr ? R(0) : (R)this->tolerances()->epsilon();

And then everything compiles fine.

But anyway, this successfully compiles scip and I can successfully use it.

But now I also want to link with papilo. I got the code from https://github.com/scipopt/papilo

I compile scip with:

cmake -Bbuildpapilo -H. -DSOPLEX_DIR=..\soplex\build -DPAPILO_DIR=..\papilo -DZLIB=off -DREADLINE=off -DGMP=off  -DZIMPL=off -DIPOPT=off

But that gives an error:

-- Finding PAPILO
-- Could NOT find PAPILO (missing: PAPILO_DIR)
CMake Error at CMakeLists.txt:427 (message):
  PAPILO not found, try specifying PAPILO_DIR.

Do I have to build papilo first before I can link it to scip?

Well I tried that but no luck there also. I looks like papilo also needs boost which I got from https://github.com/boostorg/boost

I use the following command for this:

cmake .. -DBoost_INCLUDE_DIR=C:\git\boost\libs\config\include -DBOOST_ROOT=C:\git\boost

But I also get an error here which I can't figure out:

CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options) (found suitable version
  "1.83.0", minimum required is "1.65")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.26/Modules/FindBoost.cmake:2377 (find_package_handle_standard_args)
  CMakeLists.txt:50 (find_package)

I am out of ideas now...

Can someone help please?

Thank you,

Peter Notebaert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230728/1e7f20c4/attachment.html>


More information about the Scip mailing list