abcorrea / powerlifted

Powerlifted Planner
GNU General Public License v3.0
24 stars 11 forks source link

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

Open galvusdamor opened 4 weeks ago

galvusdamor commented 4 weeks 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 4 weeks 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 3 weeks 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 2 weeks ago

Thanks again, @fteicht!

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