Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build v3.3 and 3.2 from source in Ubuntu 22.04 #273

Closed
Mechazo11 opened this issue Aug 14, 2024 · 5 comments
Closed

Unable to build v3.3 and 3.2 from source in Ubuntu 22.04 #273

Mechazo11 opened this issue Aug 14, 2024 · 5 comments
Milestone

Comments

@Mechazo11
Copy link
Contributor

Hi,

I am trying to natively install ikos by replicating the steps used in space-ros's Earthfile.

However I am getting the error shown below

Steps I took are as follows

cd ~/Downloads
git clone -b v3.2 --depth 1 https://github.com/NASA-SW-VnV/ikos.git
cd ikos
mkdir build && cd build
cmake \
        -DCMAKE_INSTALL_PREFIX="/opt/ikos" \
        -DCMAKE_BUILD_TYPE="Debug" \
        -DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm-14/bin/llvm-config" \
        ..
make

How can I solve this problem? Please note that, the Earthfile can successfully build ikos inside the space-ros image which also used Ubuntu 22.04 Jammy.

With best,
@Mechazo11

In file included from /home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:48,
                 from /home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:57,
                 from /home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/domain/discrete_domain.hpp:50,
                 from /home/tigerwife/Downloads/ikos-3.2/analyzer/src/analysis/liveness.cpp:46:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:56:20: error: ‘uintptr_t’ in namespace ‘std’ does not name a type
   56 | using Index = std::uintptr_t;
      |                    ^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:49:1: note: ‘std::uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   48 | #include <ikos/core/support/mpl.hpp>
  +++ |+#include <cstdint>
   49 | 
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:80:25: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   80 | struct IndexableTraits< Index > {
      |                         ^~~~~
      |                         index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:80:31: error: template argument 1 is invalid
   80 | struct IndexableTraits< Index > {
      |                               ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:95:37: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   95 |     std::enable_if_t< std::is_same< Index,
      |                                     ^~~~~
      |                                     index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:97:63: error: template argument 1 is invalid
   97 |                                         std::declval< T >())) >::value > >
      |                                                               ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:97:72: error: template argument 1 is invalid
   97 |                                         std::declval< T >())) >::value > >
      |                                                                        ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/semantic/indexable.hpp:97:74: error: template argument 3 is invalid
   97 |                                         std::declval< T >())) >::value > >
      |                                                                          ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:55:33: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   55 | static_assert(std::is_unsigned< Index >::value, "Index must be unsigned");
      |                                 ^~~~~
      |                                 index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:55:39: error: template argument 1 is invalid
   55 | static_assert(std::is_unsigned< Index >::value, "Index must be unsigned");
      |                                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:56:22: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   56 | static_assert(sizeof(Index) >= sizeof(std::intptr_t),
      |                      ^~~~~
      |                      index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:56:44: error: ‘intptr_t’ is not a member of ‘std’
   56 | static_assert(sizeof(Index) >= sizeof(std::intptr_t),
      |                                            ^~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:56:44: note: suggested alternatives:
In file included from /usr/local/include/boost/config/stdlib/libstdcpp3.hpp:78,
                 from /usr/local/include/boost/config.hpp:48,
                 from /usr/local/include/boost/core/addressof.hpp:17,
                 from /usr/local/include/boost/optional/optional.hpp:30,
                 from /usr/local/include/boost/optional.hpp:15,
                 from /home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/domain/discrete_domain.hpp:48:
/usr/include/unistd.h:267:20: note:   ‘intptr_t’
  267 | typedef __intptr_t intptr_t;
      |                    ^~~~~~~~
/usr/include/unistd.h:267:20: note:   ‘intptr_t’
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:59:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
   59 | inline bool is_zero_bit(Index k, Index m) {
      | ^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:59:25: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   59 | inline bool is_zero_bit(Index k, Index m) {
      |                         ^~~~~
      |                         index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:59:34: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   59 | inline bool is_zero_bit(Index k, Index m) {
      |                                  ^~~~~
      |                                  index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:59:41: error: expression list treated as compound expression in initializer [-fpermissive]
   59 | inline bool is_zero_bit(Index k, Index m) {
      |                                         ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:63:8: error: ‘Index’ does not name a type
   63 | inline Index mask(Index k, Index m) {
      |        ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:67:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
   67 | inline bool match_prefix(Index k, Index p, Index m) {
      | ^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:67:26: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   67 | inline bool match_prefix(Index k, Index p, Index m) {
      |                          ^~~~~
      |                          index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:67:35: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   67 | inline bool match_prefix(Index k, Index p, Index m) {
      |                                   ^~~~~
      |                                   index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:67:44: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
   67 | inline bool match_prefix(Index k, Index p, Index m) {
      |                                            ^~~~~
      |                                            index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:67:51: error: expression list treated as compound expression in initializer [-fpermissive]
   67 | inline bool match_prefix(Index k, Index p, Index m) {
      |                                                   ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:71:8: error: ‘Index’ does not name a type
   71 | inline Index lowest_bit(Index x) {
      |        ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/utils.hpp:75:8: error: ‘Index’ does not name a type
   75 | inline Index branching_bit(Index prefix0, Index prefix1) {
      |        ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:325:3: error: ‘Index’ does not name a type
  325 |   Index _prefix;
      |   ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:326:3: error: ‘Index’ does not name a type
  326 |   Index _branching_bit;
      |   ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:331:25: error: expected ‘)’ before ‘prefix’
  331 |   PatriciaTreeNode(Index prefix,
      |                   ~     ^~~~~~~
      |                         )
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:341:3: error: ‘Index’ does not name a type
  341 |   Index prefix() const { return this->_prefix; }
      |   ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:343:3: error: ‘Index’ does not name a type
  343 |   Index branching_bit() const { return this->_branching_bit; }
      |   ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘bool ikos::core::patricia_tree_set_impl::is_subset_of(const std::shared_ptr<const PatriciaTree<Key> >&, const std::shared_ptr<const PatriciaTree<Key> >&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:426:3: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  426 |   Index m = s_node->branching_bit();
      |   ^~~~~
      |   index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:427:8: error: expected ‘;’ before ‘n’
  427 |   Index n = t_node->branching_bit();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:428:8: error: expected ‘;’ before ‘p’
  428 |   Index p = s_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:429:8: error: expected ‘;’ before ‘q’
  429 |   Index q = t_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:430:7: error: ‘m’ was not declared in this scope
  430 |   if (m == n && p == q) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:430:12: error: ‘n’ was not declared in this scope
  430 |   if (m == n && p == q) {
      |            ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:430:17: error: ‘p’ was not declared in this scope
  430 |   if (m == n && p == q) {
      |                 ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:430:22: error: ‘q’ was not declared in this scope
  430 |   if (m == n && p == q) {
      |                      ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:434:7: error: ‘m’ was not declared in this scope
  434 |   if (m > n && match_prefix(p, q, n)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:434:11: error: ‘n’ was not declared in this scope
  434 |   if (m > n && match_prefix(p, q, n)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:434:29: error: ‘p’ was not declared in this scope
  434 |   if (m > n && match_prefix(p, q, n)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:434:32: error: ‘q’ was not declared in this scope
  434 |   if (m > n && match_prefix(p, q, n)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:434:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  434 |   if (m > n && match_prefix(p, q, n)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:435:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  435 |     if (is_zero_bit(p, n)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: At global scope:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:479:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
  479 | inline std::shared_ptr< const PatriciaTree< Key > > make_node(
      | ^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:480:5: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  480 |     Index prefix,
      |     ^~~~~
      |     index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:481:5: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  481 |     Index branching_bit,
      |     ^~~~~
      |     index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:482:5: error: expected primary-expression before ‘const’
  482 |     const std::shared_ptr< const PatriciaTree< Key > >& left_tree,
      |     ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:483:5: error: expected primary-expression before ‘const’
  483 |     const std::shared_ptr< const PatriciaTree< Key > >& right_tree) {
      |     ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:483:68: error: expected ‘;’ before ‘{’ token
  483 |     const std::shared_ptr< const PatriciaTree< Key > >& right_tree) {
      |                                                                    ^~
      |                                                                    ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:498:1: warning: inline variables are only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
  498 | inline std::shared_ptr< const PatriciaTreeNode< Key > > join_trees(
      | ^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:499:5: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  499 |     Index prefix_s,
      |     ^~~~~
      |     index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:500:5: error: expected primary-expression before ‘const’
  500 |     const std::shared_ptr< const PatriciaTree< Key > >& s,
      |     ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:501:5: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  501 |     Index prefix_t,
      |     ^~~~~
      |     index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:502:5: error: expected primary-expression before ‘const’
  502 |     const std::shared_ptr< const PatriciaTree< Key > >& t) {
      |     ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:502:59: error: expected ‘;’ before ‘{’ token
  502 |     const std::shared_ptr< const PatriciaTree< Key > >& t) {
      |                                                           ^~
      |                                                           ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::insert(const std::shared_ptr<const PatriciaTree<Key> >&, const Key&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:547:23: error: missing template arguments before ‘(’ token
  547 |       return make_node(node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:556:23: error: missing template arguments before ‘(’ token
  556 |       return make_node(node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::insert_leaf(const std::shared_ptr<const PatriciaTree<Key> >&, const std::shared_ptr<const PatriciaTreeLeaf<Key> >&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:600:23: error: missing template arguments before ‘(’ token
  600 |       return make_node(s_node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:609:23: error: missing template arguments before ‘(’ token
  609 |       return make_node(s_node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::erase(const std::shared_ptr<const PatriciaTree<Key> >&, const Key&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:645:23: error: missing template arguments before ‘(’ token
  645 |       return make_node(node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:654:23: error: missing template arguments before ‘(’ token
  654 |       return make_node(node->prefix(),
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::filter(const std::shared_ptr<const PatriciaTree<Key> >&, const Predicate&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:685:21: error: missing template arguments before ‘(’ token
  685 |     return make_node(node->prefix(),
      |                     ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::join(const std::shared_ptr<const PatriciaTree<Key> >&, const std::shared_ptr<const PatriciaTree<Key> >&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:715:3: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  715 |   Index m = s_node->branching_bit();
      |   ^~~~~
      |   index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:716:8: error: expected ‘;’ before ‘n’
  716 |   Index n = t_node->branching_bit();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:717:8: error: expected ‘;’ before ‘p’
  717 |   Index p = s_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:718:8: error: expected ‘;’ before ‘q’
  718 |   Index q = t_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:719:7: error: ‘m’ was not declared in this scope
  719 |   if (m == n && p == q) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:719:12: error: ‘n’ was not declared in this scope
  719 |   if (m == n && p == q) {
      |            ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:719:17: error: ‘p’ was not declared in this scope
  719 |   if (m == n && p == q) {
      |                 ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:719:22: error: ‘q’ was not declared in this scope
  719 |   if (m == n && p == q) {
      |                      ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:729:21: error: missing template arguments before ‘(’ token
  729 |     return make_node(p, m, new_left, new_right);
      |                     ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:731:7: error: ‘m’ was not declared in this scope
  731 |   if (m < n && match_prefix(q, p, m)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:731:11: error: ‘n’ was not declared in this scope
  731 |   if (m < n && match_prefix(q, p, m)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:731:29: error: ‘q’ was not declared in this scope
  731 |   if (m < n && match_prefix(q, p, m)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:731:32: error: ‘p’ was not declared in this scope
  731 |   if (m < n && match_prefix(q, p, m)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:731:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  731 |   if (m < n && match_prefix(q, p, m)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:733:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  733 |     if (is_zero_bit(q, m)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:738:23: error: missing template arguments before ‘(’ token
  738 |       return make_node(p, m, new_left, s_node->right_tree());
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:744:23: error: missing template arguments before ‘(’ token
  744 |       return make_node(p, m, s_node->left_tree(), new_right);
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:747:7: error: ‘m’ was not declared in this scope
  747 |   if (m > n && match_prefix(p, q, n)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:747:11: error: ‘n’ was not declared in this scope
  747 |   if (m > n && match_prefix(p, q, n)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:747:29: error: ‘p’ was not declared in this scope
  747 |   if (m > n && match_prefix(p, q, n)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:747:32: error: ‘q’ was not declared in this scope
  747 |   if (m > n && match_prefix(p, q, n)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:747:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  747 |   if (m > n && match_prefix(p, q, n)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:749:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  749 |     if (is_zero_bit(p, n)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:754:23: error: missing template arguments before ‘(’ token
  754 |       return make_node(q, n, new_left, t_node->right_tree());
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:760:23: error: missing template arguments before ‘(’ token
  760 |       return make_node(q, n, t_node->left_tree(), new_right);
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:764:20: error: missing template arguments before ‘(’ token
  764 |   return join_trees(p, s, q, t);
      |                    ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:764:21: error: ‘p’ was not declared in this scope
  764 |   return join_trees(p, s, q, t);
      |                     ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:764:27: error: ‘q’ was not declared in this scope
  764 |   return join_trees(p, s, q, t);
      |                           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::intersect(const std::shared_ptr<const PatriciaTree<Key> >&, const std::shared_ptr<const PatriciaTree<Key> >&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:795:3: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  795 |   Index m = s_node->branching_bit();
      |   ^~~~~
      |   index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:796:8: error: expected ‘;’ before ‘n’
  796 |   Index n = t_node->branching_bit();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:797:8: error: expected ‘;’ before ‘p’
  797 |   Index p = s_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:798:8: error: expected ‘;’ before ‘q’
  798 |   Index q = t_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:799:7: error: ‘m’ was not declared in this scope
  799 |   if (m == n && p == q) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:799:12: error: ‘n’ was not declared in this scope
  799 |   if (m == n && p == q) {
      |            ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:799:17: error: ‘p’ was not declared in this scope
  799 |   if (m == n && p == q) {
      |                 ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:799:22: error: ‘q’ was not declared in this scope
  799 |   if (m == n && p == q) {
      |                      ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:809:21: error: missing template arguments before ‘(’ token
  809 |     return make_node(p, m, new_left, new_right);
      |                     ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:811:7: error: ‘m’ was not declared in this scope
  811 |   if (m < n && match_prefix(q, p, m)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:811:11: error: ‘n’ was not declared in this scope
  811 |   if (m < n && match_prefix(q, p, m)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:811:29: error: ‘q’ was not declared in this scope
  811 |   if (m < n && match_prefix(q, p, m)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:811:32: error: ‘p’ was not declared in this scope
  811 |   if (m < n && match_prefix(q, p, m)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:811:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  811 |   if (m < n && match_prefix(q, p, m)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:813:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  813 |     if (is_zero_bit(q, m)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:819:7: error: ‘m’ was not declared in this scope
  819 |   if (m > n && match_prefix(p, q, n)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:819:11: error: ‘n’ was not declared in this scope
  819 |   if (m > n && match_prefix(p, q, n)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:819:29: error: ‘p’ was not declared in this scope
  819 |   if (m > n && match_prefix(p, q, n)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:819:32: error: ‘q’ was not declared in this scope
  819 |   if (m > n && match_prefix(p, q, n)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:819:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  819 |   if (m > n && match_prefix(p, q, n)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:821:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  821 |     if (is_zero_bit(p, n)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In function ‘std::shared_ptr<const ikos::core::patricia_tree_set_impl::PatriciaTree<Key> > ikos::core::patricia_tree_set_impl::difference(const std::shared_ptr<const PatriciaTree<Key> >&, const std::shared_ptr<const PatriciaTree<Key> >&)’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:858:3: error: ‘Index’ was not declared in this scope; did you mean ‘index’?
  858 |   Index m = s_node->branching_bit();
      |   ^~~~~
      |   index
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:859:8: error: expected ‘;’ before ‘n’
  859 |   Index n = t_node->branching_bit();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:860:8: error: expected ‘;’ before ‘p’
  860 |   Index p = s_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:861:8: error: expected ‘;’ before ‘q’
  861 |   Index q = t_node->prefix();
      |        ^~
      |        ;
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:862:7: error: ‘m’ was not declared in this scope
  862 |   if (m == n && p == q) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:862:12: error: ‘n’ was not declared in this scope
  862 |   if (m == n && p == q) {
      |            ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:862:17: error: ‘p’ was not declared in this scope
  862 |   if (m == n && p == q) {
      |                 ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:862:22: error: ‘q’ was not declared in this scope
  862 |   if (m == n && p == q) {
      |                      ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:872:21: error: missing template arguments before ‘(’ token
  872 |     return make_node(p, m, new_left, new_right);
      |                     ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:874:7: error: ‘m’ was not declared in this scope
  874 |   if (m < n && match_prefix(q, p, m)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:874:11: error: ‘n’ was not declared in this scope
  874 |   if (m < n && match_prefix(q, p, m)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:874:29: error: ‘q’ was not declared in this scope
  874 |   if (m < n && match_prefix(q, p, m)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:874:32: error: ‘p’ was not declared in this scope
  874 |   if (m < n && match_prefix(q, p, m)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:874:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  874 |   if (m < n && match_prefix(q, p, m)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:876:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  876 |     if (is_zero_bit(q, m)) {
      |         ~~~~~~~~~~~^~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:881:23: error: missing template arguments before ‘(’ token
  881 |       return make_node(p, m, new_left, s_node->right_tree());
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:887:23: error: missing template arguments before ‘(’ token
  887 |       return make_node(p, m, s_node->left_tree(), new_right);
      |                       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:890:7: error: ‘m’ was not declared in this scope
  890 |   if (m > n && match_prefix(p, q, n)) {
      |       ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:890:11: error: ‘n’ was not declared in this scope
  890 |   if (m > n && match_prefix(p, q, n)) {
      |           ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:890:29: error: ‘p’ was not declared in this scope
  890 |   if (m > n && match_prefix(p, q, n)) {
      |                             ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:890:32: error: ‘q’ was not declared in this scope
  890 |   if (m > n && match_prefix(p, q, n)) {
      |                                ^
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:890:28: error: ‘ikos::core::patricia_tree_utils::match_prefix’ cannot be used as a function
  890 |   if (m > n && match_prefix(p, q, n)) {
      |                ~~~~~~~~~~~~^~~~~~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:892:20: error: ‘ikos::core::patricia_tree_utils::is_zero_bit’ cannot be used as a function
  892 |     if (is_zero_bit(p, n)) {
      |         ~~~~~~~~~~~^~~~~~
In file included from /home/tigerwife/Downloads/ikos-3.2/analyzer/include/ikos/analyzer/analysis/variable.hpp:71,
                 from /home/tigerwife/Downloads/ikos-3.2/analyzer/include/ikos/analyzer/analysis/liveness.hpp:56,
                 from /home/tigerwife/Downloads/ikos-3.2/analyzer/src/analysis/liveness.cpp:51:
/home/tigerwife/Downloads/ikos-3.2/analyzer/include/ikos/analyzer/analysis/memory_location.hpp: At global scope:
/home/tigerwife/Downloads/ikos-3.2/analyzer/include/ikos/analyzer/analysis/memory_location.hpp:391:10: error: ‘Index’ does not name a type
  391 |   static Index index(const analyzer::MemoryLocation* m) {
      |          ^~~~~
/home/tigerwife/Downloads/ikos-3.2/analyzer/include/ikos/analyzer/analysis/variable.hpp:590:10: error: ‘Index’ does not name a type
  590 |   static Index index(const analyzer::Variable* v) {
      |          ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp: In instantiation of ‘class ikos::core::PatriciaTreeSet<ikos::analyzer::Variable*>’:
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/domain/discrete_domain.hpp:66:9:   required from ‘class ikos::core::DiscreteDomain<ikos::analyzer::Variable*>’
/home/tigerwife/Downloads/ikos-3.2/analyzer/src/analysis/liveness.cpp:73:9:   required from ‘class ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*>’
/usr/include/c++/13/type_traits:1411:38:   required from ‘struct std::is_base_of<ikos::core::AbstractDomain<ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*> >, ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*> >’
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/domain/abstract_domain.hpp:247:8:   required from ‘struct ikos::core::IsAbstractDomain<ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*> >’
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/fixpoint/fixpoint_iterator.hpp:60:52:   required from ‘class ikos::core::ForwardFixpointIterator<ikos::ar::Code*, ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*>, ikos::analyzer::{anonymous}::ReverseCodeGraphTrait>’
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/fixpoint/fwd_fixpoint_iterator.hpp:76:7:   required from ‘class ikos::core::InterleavedFwdFixpointIterator<ikos::ar::Code*, ikos::analyzer::{anonymous}::LivenessDomain<ikos::analyzer::Variable*>, ikos::analyzer::{anonymous}::ReverseCodeGraphTrait>’
/home/tigerwife/Downloads/ikos-3.2/analyzer/src/analysis/liveness.cpp:209:20:   required from here
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:135:37: error: static assertion failed: Key must implement IndexableTraits
  135 |   static_assert(IsIndexable< Key >::value,
      |                                     ^~~~~
/home/tigerwife/Downloads/ikos-3.2/core/include/ikos/core/adt/patricia_tree/set.hpp:135:37: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
make[2]: *** [analyzer/CMakeFiles/ikos-analyzer.dir/build.make:146: analyzer/CMakeFiles/ikos-analyzer.dir/src/analysis/liveness.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1675: analyzer/CMakeFiles/ikos-analyzer.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@ivanperez-keera
Copy link
Collaborator

I think this is just a missing:

#include <cstdint>

@Mechazo11
Copy link
Contributor Author

Hi @ivanperez-keera
Adding #include <cstdint> into liveness.hpp solved the build problem. I will open a PR request. Thank you very much for the help.

For anyone facing this issue, this is how I solved it.

liveness.hpp

#pragma once

#include <iosfwd>
#include <vector>
#include <cstdint> // Fix suggested by ivanperez-keera here https://github.com/NASA-SW-VnV/ikos/issues/273

#include <boost/optional.hpp>

#include <llvm/ADT/DenseMap.h>

#include <ikos/analyzer/analysis/context.hpp>
#include <ikos/analyzer/analysis/variable.hpp>

Mechazo11 added a commit to Mechazo11/ikos that referenced this issue Aug 22, 2024
@Mechazo11 Mechazo11 mentioned this issue Aug 22, 2024
@ivanperez-keera
Copy link
Collaborator

ivanperez-keera commented Aug 22, 2024

I'm reopening this just for our own project management. Once we actually merge your PR, we can consider it fixed.

Thanks!

@asimonov
Copy link

@Mechazo11, as mentioned on the PR it is also blocking upgrade of space-ros to jazzy/ubuntu24, so thanks for reporting!

Mechazo11 added a commit to Mechazo11/ikos that referenced this issue Aug 24, 2024
ivanperez-keera pushed a commit to ivanperez-keera/ikos that referenced this issue Aug 29, 2024
This commit adds a missing include that leads to an error in newer
versions of clang.
@Mechazo11
Copy link
Contributor Author

Dr. @ivanperez-keera I just saw you closing the PR #274. I will go ahead and close this issue.

ivanperez-keera pushed a commit to ivanperez-keera/ikos that referenced this issue Sep 21, 2024
This commit adds a missing include that leads to an error in newer
versions of clang.
ivanperez-keera pushed a commit to ivanperez-keera/ikos that referenced this issue Sep 21, 2024
This commit adds a missing include that leads to an error in newer
versions of clang.
@ivanperez-keera ivanperez-keera added this to the ikos 3.4 milestone Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants