Unable to compile in ubuntu 22.04

58 views
Skip to first unread message

sabyasachi chatterjee

unread,
Jun 18, 2023, 2:01:08 AM6/18/23
to deal.II User Group
Hello,

I recently upgraded to ubuntu 22.04 and the deal ii version I am using is 9.1.1. It used to compile fine in ubuntu 20.04. However, now I am seeing the following error:

***************************************************************************************
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/archive/detail/helper_collection.hpp:27,
                 from /usr/include/boost/archive/detail/basic_iarchive.hpp:28,
                 from /usr/include/boost/archive/detail/common_iarchive.hpp:21,
                 from /usr/include/boost/archive/basic_binary_iarchive.hpp:30,
                 from /usr/include/boost/archive/binary_iarchive_impl.hpp:21,
                 from /usr/include/boost/archive/binary_iarchive.hpp:20,
                 from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/base/utilities.h:45,
                 from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/base/tensor.h:26,
                 from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/base/point.h:23,
                 from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/base/quadrature.h:22,
                 from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/base/quadrature_lib.h:22,
                 from /home/sabyasachi/Documents/postdoc/irradiated_hardness_test_contact/main_hardness_contact.cc:1:
/usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’
   17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/sabyasachi/Documents/dealii_libraries/dealii_setup/deal.II-v9.1.1/include/deal.II/grid/grid_tools.h:45,
                 from /home/sabyasachi/Documents/postdoc/irradiated_hardness_test_contact/main_hardness_contact.cc:33:
/usr/include/boost/geometry/index/detail/serialization.hpp: In static member function ‘static boost::geometry::index::detail::rtree::load<MembersHolder>::node_pointer boost::geometry::index::detail::rtree::load<MembersHolder>::raw_apply(Archive&, unsigned int, boost::geometry::index::detail::rtree::load<MembersHolder>::size_type, boost::geometry::index::detail::rtree::load<MembersHolder>::size_type&, const parameters_type&, const translator_type&, boost::geometry::index::detail::rtree::load<MembersHolder>::allocators_type&, boost::geometry::index::detail::rtree::load<MembersHolder>::size_type)’:
/usr/include/boost/geometry/index/detail/serialization.hpp:399:49: error: ‘Allocators’ was not declared in this scope; did you mean ‘allocators’?
  399 |             node_pointer n = rtree::create_node<Allocators, internal_node>::apply(allocators);              // MAY THROW (A)
      |                                                 ^~~~~~~~~~
      |                                                 allocators
/usr/include/boost/geometry/index/detail/serialization.hpp:399:74: error: template argument 1 is invalid
  399 |             node_pointer n = rtree::create_node<Allocators, internal_node>::apply(allocators);              // MAY THROW (A)
      |                                                                          ^
/usr/include/boost/geometry/index/detail/serialization.hpp:422:49: error: ‘Allocators’ was not declared in this scope; did you mean ‘allocators’?
  422 |             node_pointer n = rtree::create_node<Allocators, leaf>::apply(allocators);                       // MAY THROW (A)
      |                                                 ^~~~~~~~~~
      |                                                 allocators
********************************************************************************************

Probably it is something related to boost library. My code is an extension of Step 18 and I think it does not need the boost library. Please suggest how to resolve this. 

Thanks,
Sabyasachi

Daniel Arndt

unread,
Jun 19, 2023, 10:17:06 AM6/19/23
to dea...@googlegroups.com
Sabyasachi,

What is the boost version of the system-provided boost installation?
You should be able to work around this issue by forcing deal.II to use its bundled boost package via using `-DDEAL_II_FORCE_BUNDLED_BOOST=ON` when configuring deal.II.

Best,
Daniel

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/dd138e90-745e-475a-8ec5-49a4302b0883n%40googlegroups.com.

sabyasachi chatterjee

unread,
Jun 21, 2023, 1:54:51 AM6/21/23
to deal.II User Group
Daniel,

Thanks for the suggestion. The boost version in ubuntu 22.04 by default is 1.74.0.

I tried reinstalling deal ii (version 9.1.1) using candi with DEAL_II_FORCE_BUNDLED_BOOST=ON in candi.cfg and received the following error:
*********************************************************************************************************
/usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’
   17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 44%] Built target obj_fe_release
make: *** [Makefile:136: all] Error 2
Failure with exit status: 2
Exit message: There was a problem building dealii v9.1.1.
*********************************************************************************************************'

I also tried to install without DEAL_II_FORCE_BUNDLED_BOOST=ON in candi.cfg and still it won't compile with the following error:
*********************************************************************************************************
/usr/include/boost/geometry/index/detail/serialization.hpp:579:79: error: expression list treated as compound expression in initializer [-fpermissive]
  579 |     subtree_destroyer remover(tree.members().root, tree.members().allocators());
      |                                                                               ^
make[2]: *** [source/base/CMakeFiles/obj_base_release.dir/build.make:496: source/base/CMakeFiles/obj_base_release.dir/parsed_convergence_table.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1841: source/base/CMakeFiles/obj_base_release.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Failure with exit status: 2
*********************************************************************************************************

However, when I install latest deal ii version (9.4.2), it installed successfully. So probably there is some compatibility issue of version 9.1.1 in ubuntu 22.04 related to the boost library version.

Best,
Sabyasachi 
Reply all
Reply to author
Forward
0 new messages