Closed ryanxwang closed 3 months ago
Hi, Augusto pinged me since I had to go through some painful Boost dependency troubleshooting already. Maybe we can figure out a solution together. Let me start with two follow-up questions:
(1) The post also suggest that simply enabling set(Boost_NO_BOOST_CMAKE ON)
before find_package
resolves the problem with your current version (as the problem is caused in BoostConfig.cmake
), did you try that?
(2) When you were trying a newer Boost version (above 1.72) did you set set(Boost_USE_MULTITHREADED OFF)
before you call find_package
for Boost? According to a Stack Overflow post, this is the key step. If this flag wasn't set, to the right value this could explain why it became an error. ( This is a problem in the specific boost version, which is documented in the second to last reply here: https://gitlab.kitware.com/cmake/cmake/-/issues/19714 )
Hi all,
I will have a look at that, but I haven't reproduced the boost problem yet.
In the meantime, @ryanxwang, I pushed a new version of the container scripts. Now it uses Apptainer, instead of Singularity. You can run
apptainer build powerlifted.sif Apptainer.powerlifted
and then use powerlifted.sif
as a replacement for powerlifted.py
. There are some caveats though: you need to call VAL or/and CPDDL outside of the image, in case you need them. (In other words, flags --validate-
and --preprocess-task
no longer work with this.)
This should be a short-term solution to make the planner usable for now. Could you try again and let me know if it worked?
I will continue trying to solve the boost compilation issue.
@PLauerRocks: thank you for the help and the pointers!
Cheers, ABC
Also, can you check if the pull request #52 helps with your problem, @ryanxwang?
Thanks @PLauerRocks and @abcorrea!
@PLauerRocks: re the set(Boost_NO_BOOST_CMAKE ON)
option, setting it for all the boost versions I tried (1.71.0, 1.72.0, 1.77.0) results in the following error
CMake Error at /half-root/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: program_options) (found version "1.72.0")
I've also tried setting Boost_USE_MULTITHREADED
to OFF
for various versions. They all resulted in some variation of messages saying "cannot find boost". The PR also didn't work.
However, I've been able to build powerlifted now by including it using CPM, based on this example. It takes a while as it needs to build boost, but things work now.
The precise set of changes I've made in CMakeLists.txt
is removing the existing lines for linking boost, and replacing the target_link_libraries
line in the end with
include(../cmake/CPM.cmake)
CPMAddPackage(
NAME Boost
VERSION 1.84.0
GITHUB_REPOSITORY boostorg/boost
GIT_TAG "boost-1.84.0"
OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES program_options\\\;algorithm\\\;dynamic_bitset"
)
target_link_libraries(search LINK_PUBLIC Boost::program_options Boost::algorithm Boost::dynamic_bitset)
I will also test out the updated apptainer solution soon.
Hey Augusto,
I can't seem to build powerlifted with (
python3 build.py
) due to the following warning and then error:It seems that cmake detects boost fine, but has some trouble due to the co-existing multithreaded (mt) and single threaded version of boost program options. I've read this discussion on a similar issue but following their advice doesn't change anything.
Unfortunately I don't have much control over this environment. I can only choose from a set of boost versions. Using higher versions than 1.72.0 leads to the initial warning becoming an error, and using a lower version leads to cmake not finding program options. Do you have any idea what I might be able to do here?
Alternatively, I've also tried to build the singularity image, but it seems outdated and I was unable to build the image using singularity version 3.11.3.
Really appreciate your help!