abcorrea / powerlifted

Powerlifted Planner
GNU General Public License v3.0
28 stars 12 forks source link

Powerlifted does not compile with g++ (GCC) 14.1.1 #50

Open galvusdamor opened 5 months ago

galvusdamor commented 5 months ago

I've just tried to compile pwl on my machine, where I have: g++ (GCC) 14.1.1 cmake version 3.29.5

In two cases, there are missing imports that my version of g++ complains about

src/search/datalog/transformations/normal_form.h misses an

#include <set>

(can't find set in line 158)

src/search/datalog/rules/variable_source.h misses an

#include <algorithm>

(finds the wrong version of the find function in line 39)

On top of that, I get a narrowing error (due to Werror) in /home/gregor/Workspace/powerlifted/src/search/states/extensional_states.cc line 45

index_to_args.push_back({pid, {}});

Here pid is of type size_t (aka long unsigned int) and narrowing it to int is not allowed. Changing the declaration of index_to_args to size_t, i.e.

std::vector<std::pair<std::size_t, args_t>> index_to_args;

Works for me.

Cheers, Gregor

abcorrea commented 5 months ago

Hi Gregor,

Thanks for the heads up. So is the issue solved now? If so, would you mind opening a pull request with the change? Otherwise, I can do it myself next week.

By the way, have you ever used the extensional state representation? Because I planned to remove it completely when merging the object creation feature -- they will be incompatible.

fteicht commented 5 months ago

Hi, I was actually facing the same issue, plus some others (notably uninitialized best_score variable in src/search/successor_generators/clique_bron_kerbosch.cc). I made PR #51 to solve all those issues. Cheers

abcorrea commented 5 months ago

Thanks again, @fteicht!

@galvusdamor, could you double-check if the PR by Florent solved your issues too?

galvusdamor commented 4 months ago

@fteicht : Thanks! @abcorrea Yes the Florent's PR solved the compilation issues for me too.

I've seen a new issue on my machine: since cmake 3.30 the recommended way to "load" the boost library has changed. I've created a PR for the change that made cmake happy (it was only a warning) on my machine. @abcorrea Does it work on your machine, too?