luigifcruz/kimera

Build error

LitoNeo opened this issue · 1 comments

Thanks for the great project!
I can build it on ubuntu20, but there are errors when build it on ubuntu18.

System: ubuntu18
platform:x86_64
gcc version: 9.4
g++ version:9.4
cmake version: 3.22

cmake -j with error:

[ 96%] Building CXX object apps/tunnel/CMakeFiles/tunnel.dir/tunnel.cc.o
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/home/neo/works/kimera-source/kimera/python/client.hpp: In function ‘void init_client(pybind11::module&)’:
/home/neo/works/kimera-source/kimera/python/client.hpp:12:10: error: no matching function for call to ‘init(init_client(pybind11::module&)::<lambda(Kimera::State&)>)’
   12 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/home/neo/works/kimera-source/kimera/python/client.hpp:12:10: note:   candidate expects 0 arguments, 1 provided
   12 |         }))
      |          ^
/home/neo/works/kimera-source/kimera/python/client.hpp:16:10: error: no matching function for call to ‘init(init_client(pybind11::module&)::<lambda()>)’
   16 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/home/neo/works/kimera-source/kimera/python/client.hpp:16:10: note:   candidate expects 0 arguments, 1 provided
   16 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:2:
/home/neo/works/kimera-source/kimera/python/codec.hpp: In function ‘void init_codec(pybind11::module&)’:
/home/neo/works/kimera-source/kimera/python/codec.hpp:12:10: error: no matching function for call to ‘init(init_codec(pybind11::module&)::<lambda(Kimera::State&)>)’
   12 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:2:
/home/neo/works/kimera-source/kimera/python/codec.hpp:12:10: note:   candidate expects 0 arguments, 1 provided
   12 |         }))
      |          ^
/home/neo/works/kimera-source/kimera/python/codec.hpp:19:10: error: no matching function for call to ‘init(init_codec(pybind11::module&)::<lambda(Kimera::State&)>)’
   19 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:2:
/home/neo/works/kimera-source/kimera/python/codec.hpp:19:10: note:   candidate expects 0 arguments, 1 provided
   19 |         }))
      |          ^
/home/neo/works/kimera-source/kimera/python/codec.hpp:26:10: error: no matching function for call to ‘init(init_codec(pybind11::module&)::<lambda(Kimera::State&)>)’
   26 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:2:
/home/neo/works/kimera-source/kimera/python/codec.hpp:26:10: note:   candidate expects 0 arguments, 1 provided
   26 |         }))
      |          ^
/home/neo/works/kimera-source/kimera/python/codec.hpp:29:10: error: no matching function for call to ‘init(init_codec(pybind11::module&)::<lambda(Kimera::State&, Kimera::PixelFormat)>)’
   29 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:2:
/home/neo/works/kimera-source/kimera/python/codec.hpp:29:10: note:   candidate expects 0 arguments, 1 provided
   29 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:3:
/home/neo/works/kimera-source/kimera/python/loopback.hpp: In function ‘void init_loopback(pybind11::module&)’:
/home/neo/works/kimera-source/kimera/python/loopback.hpp:12:10: error: no matching function for call to ‘init(init_loopback(pybind11::module&)::<lambda(Kimera::State&)>)’
   12 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:3:
/home/neo/works/kimera-source/kimera/python/loopback.hpp:12:10: note:   candidate expects 0 arguments, 1 provided
   12 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:5:
/home/neo/works/kimera-source/kimera/python/transport.hpp: In function ‘void init_transport(pybind11::module&)’:
/home/neo/works/kimera-source/kimera/python/transport.hpp:12:10: error: no matching function for call to ‘init(init_transport(pybind11::module&)::<lambda(Kimera::State&)>)’
   12 |         }))
      |          ^
In file included from /home/neo/works/kimera-source/kimera/python/client.hpp:3,
                 from /home/neo/works/kimera-source/kimera/python/index.cc:1:
/usr/include/pybind11/pybind11.h:1418:51: note: candidate: ‘template<class ... Args> pybind11::detail::init<Args ...> pybind11::init()’
 1418 | template <typename... Args> detail::init<Args...> init() { return detail::init<Args...>(); }
      |                                                   ^~~~
/usr/include/pybind11/pybind11.h:1418:51: note:   template argument deduction/substitution failed:
In file included from /home/neo/works/kimera-source/kimera/python/index.cc:5:
/home/neo/works/kimera-source/kimera/python/transport.hpp:12:10: note:   candidate expects 0 arguments, 1 provided
   12 |         }))
      |          ^
/home/neo/works/kimera-source/kimera/python/index.cc: At global scope:
/home/neo/works/kimera-source/kimera/python/index.cc:14:16: error: expected constructor, destructor, or type conversion before ‘(’ token
   14 | PYBIND11_MODULE(kimera, m) {
      |                ^
[ 98%] Linking CXX executable ../../bin/kimera
CMakeFiles/tunnel.dir/tunnel.cc.o: In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
tunnel.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0x40): undefined reference to `boost::system::generic_category()'
tunnel.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0xb9): undefined reference to `boost::system::generic_category()'
tunnel.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0x149): undefined reference to `boost::system::generic_category()'
CMakeFiles/tunnel.dir/tunnel.cc.o: In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
tunnel.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0x3f): undefined reference to `boost::system::generic_category()'
tunnel.cc:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0xd1): undefined reference to `boost::system::generic_category()'
CMakeFiles/tunnel.dir/tunnel.cc.o:tunnel.cc:(.text.startup+0x1f6): more undefined references to `boost::system::generic_category()' follow
CMakeFiles/tunnel.dir/tunnel.cc.o: In function `_GLOBAL__sub_I__Z8receiverRN6Kimera5StateERNS_6ClientE':
tunnel.cc:(.text.startup+0x200): undefined reference to `boost::system::system_category()'
tunnel.cc:(.text.startup+0x205): undefined reference to `boost::system::system_category()'
collect2: error: ld returned 1 exit status
apps/tunnel/CMakeFiles/tunnel.dir/build.make:98: recipe for target 'bin/kimera' failed
make[2]: *** [bin/kimera] Error 1
CMakeFiles/Makefile2:1121: recipe for target 'apps/tunnel/CMakeFiles/tunnel.dir/all' failed
make[1]: *** [apps/tunnel/CMakeFiles/tunnel.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
python/CMakeFiles/python.dir/build.make:75: recipe for target 'python/CMakeFiles/python.dir/index.cc.o' failed
make[2]: *** [python/CMakeFiles/python.dir/index.cc.o] Error 1
CMakeFiles/Makefile2:1094: recipe for target 'python/CMakeFiles/python.dir/all' failed
make[1]: *** [python/CMakeFiles/python.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

Sorry, I think this won't work on Ubuntu 18 because the version of Boost is too old.