TNG / boost-python-examples

Some examples for the use of boost::python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can get it to run on ubuntu 21.10

deisi opened this issue · comments

Describe the bug

cd build/01-HelloWorld
./hello.py

produces:

ImportError: /home/malte/Projects/boost-python-examples/build/01-HelloWorld/hello.so: undefined symbol: _ZNK5boost6python7objects21py_function_impl_base9max_arityEv

ldd on hello.so gives:

	linux-vdso.so.1 (0x00007ffe9d1a3000)
	libpython3.9.so.1.0 => /lib/x86_64-linux-gnu/libpython3.9.so.1.0 (0x00007f63e23f0000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f63e21d7000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f63e21bd000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f63e1f95000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f63e1f64000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f63e1f48000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f63e1e62000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f63e29ac000)

So i guess something is missing but what and where to search for.

Error message(s)

Environment:

  • Ubuntu 22.10

  • Installed boost python with sudo apt install libboost-all-dev

  • Python Version 3.9 (the default from OS)

  • Boost Version (installed via libboost-all-dev, 1.74)

  • Compiler Version (gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 default)

Log of compilation

malte@utop ~/P/boost-python-examples (main)> ./build.sh
++ basename ./build.sh
+ cd ./
+ mkdir build
mkdir: cannot create directory ‘build’: File exists
+ cd build
+ [[ linux-gnu == \l\i\n\u\x\-\g\n\u ]]
+ cmake -DPYTHON_VERSION_SUFFIX=-py3 -DCMAKE_BUILD_TYPE=DEBUG ..
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python (found version "3.9.7") 
-- Could NOT find Boost: missing: python-py3 (found /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0"))
-- Found PythonInterp: /usr/bin/python (found suitable version "3.9.7", minimum required is "3") 
-- PYTHON_LIBRARIES = /usr/lib/x86_64-linux-gnu/libpython3.9.so
-- PYTHON_EXECUTABLE = /usr/bin/python
-- PYTHON_INCLUDE_DIRS = /usr/include/python3.9
-- Boost_LIBRARIES = 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/malte/Projects/boost-python-examples/build
+ make
Scanning dependencies of target hello
[  3%] Building CXX object 01-HelloWorld/CMakeFiles/hello.dir/hello.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/01-HelloWorld/hello.cpp:6:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[  6%] Linking CXX shared module hello.so
[  6%] Built target hello
Scanning dependencies of target classes
[ 10%] Building CXX object 02-ExposingClasses/CMakeFiles/classes.dir/classes.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/02-ExposingClasses/classes.cpp:2:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 13%] Linking CXX shared module classes.so
[ 13%] Built target classes
Scanning dependencies of target ctor
[ 16%] Building CXX object 03-Constructors/CMakeFiles/ctor.dir/ctor.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/03-Constructors/ctor.cpp:18:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 20%] Linking CXX shared module ctor.so
[ 20%] Built target ctor
Scanning dependencies of target member
[ 23%] Building CXX object 04-ClassMembers/CMakeFiles/member.dir/member.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/04-ClassMembers/member.cpp:24:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 26%] Linking CXX shared module member.so
[ 26%] Built target member
Scanning dependencies of target inheritance
[ 30%] Building CXX object 05-Inheritance/CMakeFiles/inheritance.dir/inheritance.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/05-Inheritance/inheritance.cpp:32:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 33%] Linking CXX shared module inheritance.so
[ 33%] Built target inheritance
Scanning dependencies of target virtual
[ 36%] Building CXX object 06-VirtualFunctionsInPython/CMakeFiles/virtual.dir/virtual.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/06-VirtualFunctionsInPython/virtual.cpp:16:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 40%] Linking CXX shared module virtual.so
[ 40%] Built target virtual
Scanning dependencies of target operators
[ 43%] Building CXX object 07-Operators/CMakeFiles/operators.dir/operators.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/07-Operators/operators.cpp:35:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 46%] Linking CXX shared module operators.so
[ 46%] Built target operators
Scanning dependencies of target policies
[ 50%] Building CXX object 08-CallPolicies/CMakeFiles/policies.dir/policies.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/08-CallPolicies/policies.cpp:20:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 53%] Linking CXX shared module policies.so
[ 53%] Built target policies
Scanning dependencies of target overload
[ 56%] Building CXX object 09-Overloading/CMakeFiles/overload.dir/overload.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/09-Overloading/overload.cpp:33:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 60%] Linking CXX shared module overload.so
[ 60%] Built target overload
Scanning dependencies of target embedding
[ 63%] Building CXX object 10-Embedding/CMakeFiles/embedding.dir/mymodule.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/10-Embedding/mymodule.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 66%] Building CXX object 10-Embedding/CMakeFiles/embedding.dir/embedding.cpp.o
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/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from /home/malte/Projects/boost-python-examples/10-Embedding/embedding.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
[ 70%] Linking CXX executable embedding
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: warning: relocation against `_ZTVN5boost6python7objects21py_function_impl_baseE' in read-only section `.text._ZN5boost6python7objects21py_function_impl_baseC2Ev[_ZN5boost6python7objects21py_function_impl_baseC5Ev]'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `PyInit_mymodule':
/home/malte/Projects/boost-python-examples/10-Embedding/mymodule.cpp:7: undefined reference to `boost::python::detail::init_module(PyModuleDef&, void (*)())'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::type_info::name() const':
/usr/include/boost/python/type_id.hpp:160: undefined reference to `boost::python::detail::gcc_demangle(char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `_object* boost::python::expect_non_null<_object>(_object*)':
/usr/include/boost/python/errors.hpp:45: undefined reference to `boost::python::throw_error_already_set()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::class_<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::class_(char const*, char const*)':
/usr/include/boost/python/class.hpp:581: undefined reference to `boost::python::objects::class_base::class_base(char const*, unsigned long, boost::python::type_info const*, char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `void boost::python::class_<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::initialize<boost::python::init<mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_> >(boost::python::init<mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_, mpl_::void_> const&)':
/usr/include/boost/python/class.hpp:453: undefined reference to `boost::python::objects::class_base::set_instance_size(unsigned long)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `void boost::python::class_<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::def_impl<Base, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Base::*)() const, boost::python::detail::def_helper<char const*, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified> >(Base*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Base::*)() const, boost::python::detail::def_helper<char const*, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified> const&, ...)':
/usr/include/boost/python/class.hpp:490: undefined reference to `boost::python::objects::add_to_namespace(boost::python::api::object const&, char const*, boost::python::api::object const&, char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::api::object boost::python::detail::make_function_aux<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Base::*)() const, boost::python::default_call_policies, boost::mpl::vector2<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Base&>, mpl_::int_<0> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Base::*)() const, boost::python::default_call_policies const&, boost::mpl::vector2<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Base&> const&, std::pair<boost::python::detail::keyword const*, boost::python::detail::keyword const*> const&, mpl_::int_<0>)':
/usr/include/boost/python/make_function.hpp:62: undefined reference to `boost::python::objects::function_object(boost::python::objects::py_function const&, std::pair<boost::python::detail::keyword const*, boost::python::detail::keyword const*> const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `void boost::python::objects::class_metadata<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::maybe_register_class_to_python<Base>(Base*, mpl_::bool_<false>)':
/usr/include/boost/python/object/class_metadata.hpp:273: undefined reference to `boost::python::objects::copy_class_object(boost::python::type_info const&, boost::python::type_info const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::py_function_impl_base::py_function_impl_base()':
/usr/include/boost/python/object/py_function.hpp:20: undefined reference to `vtable for boost::python::objects::py_function_impl_base'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, boost::shared_ptr>::shared_ptr_from_python()':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:28: undefined reference to `boost::python::converter::registry::insert(void* (*)(_object*), void (*)(_object*, boost::python::converter::rvalue_from_python_stage1_data*), boost::python::type_info, _typeobject const* (*)())'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, std::shared_ptr>::shared_ptr_from_python()':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:28: undefined reference to `boost::python::converter::registry::insert(void* (*)(_object*), void (*)(_object*, boost::python::converter::rvalue_from_python_stage1_data*), boost::python::type_info, _typeobject const* (*)())'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `void boost::python::objects::register_dynamic_id<Base>(Base*)':
/usr/include/boost/python/object/inheritance.hpp:72: undefined reference to `boost::python::objects::register_dynamic_id_aux(boost::python::type_info, std::pair<void*, boost::python::type_info> (*)(void*))'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::to_python_converter<Base, boost::python::objects::class_cref_wrapper<Base, boost::python::objects::make_instance<Base, boost::python::objects::value_holder<Base> > >, true>::to_python_converter()':
/usr/include/boost/python/to_python_converter.hpp:82: undefined reference to `boost::python::converter::registry::insert(_object* (*)(void const*), boost::python::type_info, _typeobject const* (*)())'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, boost::shared_ptr>::convertible(_object*)':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:41: undefined reference to `boost::python::converter::get_lvalue_from_python(_object*, boost::python::converter::registration const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, boost::shared_ptr>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:53: undefined reference to `boost::python::converter::shared_ptr_deleter::shared_ptr_deleter(boost::python::handle<_object>)'
/usr/bin/ld: /usr/include/boost/python/converter/shared_ptr_from_python.hpp:52: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/boost/python/converter/shared_ptr_from_python.hpp:60: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::expected_from_python_type_direct<Base>::get_pytype()':
/usr/include/boost/python/converter/pytype_function.hpp:106: undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, std::shared_ptr>::convertible(_object*)':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:41: undefined reference to `boost::python::converter::get_lvalue_from_python(_object*, boost::python::converter::registration const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::shared_ptr_from_python<Base, std::shared_ptr>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)':
/usr/include/boost/python/converter/shared_ptr_from_python.hpp:53: undefined reference to `boost::python::converter::shared_ptr_deleter::shared_ptr_deleter(boost::python::handle<_object>)'
/usr/bin/ld: /usr/include/boost/python/converter/shared_ptr_from_python.hpp:52: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/boost/python/converter/shared_ptr_from_python.hpp:60: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::shared_ptr<void>::shared_ptr<void, boost::python::converter::shared_ptr_deleter>(void*, boost::python::converter::shared_ptr_deleter)':
/usr/include/boost/smart_ptr/shared_ptr.hpp:382: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/boost/smart_ptr/shared_ptr.hpp:382: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::shared_ptr<void>::shared_ptr<void, boost::python::converter::shared_ptr_deleter, void>(void*, boost::python::converter::shared_ptr_deleter)':
/usr/include/c++/11/bits/shared_ptr.h:178: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:/usr/include/c++/11/bits/shared_ptr.h:178: more undefined references to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()' follow
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::registration const& boost::python::converter::detail::registry_lookup2<Base const volatile>(Base const volatile& (*)())':
/usr/include/boost/python/converter/registered.hpp:100: undefined reference to `boost::python::converter::registry::lookup(boost::python::type_info)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::detail::shared_count::shared_count<void*, boost::python::converter::shared_ptr_deleter>(void*, boost::python::converter::shared_ptr_deleter)':
/usr/include/boost/smart_ptr/detail/shared_count.hpp:191: undefined reference to `boost::python::converter::shared_ptr_deleter::operator()(void const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::__shared_ptr<void, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<void, boost::python::converter::shared_ptr_deleter, void>(void*, boost::python::converter::shared_ptr_deleter)':
/usr/include/c++/11/bits/shared_ptr_base.h:1108: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/c++/11/bits/shared_ptr_base.h:1108: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `_object* boost::python::objects::make_instance_impl<Base, boost::python::objects::value_holder<Base>, boost::python::objects::make_instance<Base, boost::python::objects::value_holder<Base> > >::execute<boost::reference_wrapper<Base const> const>(boost::reference_wrapper<Base const> const&)':
/usr/include/boost/python/object/make_instance.hpp:46: undefined reference to `boost::python::instance_holder::install(_object*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::make_holder<0>::apply<boost::python::objects::value_holder<Base>, boost::mpl::vector0<mpl_::na> >::execute(_object*)':
/usr/include/boost/python/object/make_holder.hpp:92: undefined reference to `boost::python::instance_holder::allocate(_object*, unsigned long, unsigned long)'
/usr/bin/ld: /usr/include/boost/python/object/make_holder.hpp:95: undefined reference to `boost::python::instance_holder::install(_object*)'
/usr/bin/ld: /usr/include/boost/python/object/make_holder.hpp:98: undefined reference to `boost::python::instance_holder::deallocate(_object*, void*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<void*, boost::python::converter::shared_ptr_deleter, void>(void*, boost::python::converter::shared_ptr_deleter)':
/usr/include/c++/11/bits/shared_ptr_base.h:618: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/c++/11/bits/shared_ptr_base.h:618: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `_typeobject* boost::python::objects::make_instance<Base, boost::python::objects::value_holder<Base> >::get_class_object<boost::reference_wrapper<Base const> const>(boost::reference_wrapper<Base const> const&)':
/usr/include/boost/python/object/make_instance.hpp:67: undefined reference to `boost::python::converter::registration::get_class_object() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::value_holder<Base>::value_holder(_object*)':
/usr/include/boost/python/object/value_holder.hpp:133: undefined reference to `boost::python::instance_holder::instance_holder()'
/usr/bin/ld: /usr/include/boost/python/object/value_holder.hpp:136: undefined reference to `boost::python::instance_holder::~instance_holder()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::api::object boost::python::detail::make_function_aux<void (*)(_object*), boost::python::default_call_policies, boost::mpl::vector2<void, _object*>, mpl_::int_<0> >(void (*)(_object*), boost::python::default_call_policies const&, boost::mpl::vector2<void, _object*> const&, std::pair<boost::python::detail::keyword const*, boost::python::detail::keyword const*> const&, mpl_::int_<0>)':
/usr/include/boost/python/make_function.hpp:62: undefined reference to `boost::python::objects::function_object(boost::python::objects::py_function const&, std::pair<boost::python::detail::keyword const*, boost::python::detail::keyword const*> const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<void*, boost::python::converter::shared_ptr_deleter, std::allocator<void>, void>(void*, boost::python::converter::shared_ptr_deleter, std::allocator<void>)':
/usr/include/c++/11/bits/shared_ptr_base.h:631: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: /usr/include/c++/11/bits/shared_ptr_base.h:637: undefined reference to `boost::python::converter::shared_ptr_deleter::operator()(void const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::value_holder<Base>::value_holder<boost::reference_wrapper<Base const> >(_object*, boost::reference_wrapper<Base const>)':
/usr/include/boost/python/object/value_holder.hpp:133: undefined reference to `boost::python::instance_holder::instance_holder()'
/usr/bin/ld: /usr/include/boost/python/object/value_holder.hpp:136: undefined reference to `boost::python::instance_holder::~instance_holder()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::_Sp_ebo_helper<0, boost::python::converter::shared_ptr_deleter, false>::~_Sp_ebo_helper()':
/usr/include/c++/11/bits/shared_ptr_base.h:394: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::_Sp_counted_deleter<void*, boost::python::converter::shared_ptr_deleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_deleter(void*, boost::python::converter::shared_ptr_deleter, std::allocator<void> const&)':
/usr/include/c++/11/bits/shared_ptr_base.h:436: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `void boost::python::api::object_operators<boost::python::api::object>::visit<boost::python::class_<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, char const*>(boost::python::class_<Base, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>&, char const*, boost::python::detail::def_helper<char const*, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified> const&) const':
/usr/include/boost/python/object_core.hpp:168: undefined reference to `boost::python::objects::add_to_namespace(boost::python::api::object const&, char const*, boost::python::api::object const&, char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:(.data.rel.ro._ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFvP7_objectENS0_21default_call_policiesENS_3mpl7vector2IvS6_EEEEEE[_ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFvP7_objectENS0_21default_call_policiesENS_3mpl7vector2IvS6_EEEEEE]+0x30): undefined reference to `boost::python::objects::py_function_impl_base::max_arity() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void (*)(_object*), boost::python::default_call_policies, boost::mpl::vector2<void, _object*> > >::~caller_py_function_impl()':
/usr/include/boost/python/object/py_function.hpp:30: undefined reference to `boost::python::objects::py_function_impl_base::~py_function_impl_base()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::detail::sp_counted_impl_pd<void*, boost::python::converter::shared_ptr_deleter>::~sp_counted_impl_pd()':
/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:143: undefined reference to `boost::python::converter::shared_ptr_deleter::~shared_ptr_deleter()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:(.data.rel.ro._ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIM4BaseKFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvENS0_21default_call_policiesENS_3mpl7vector2ISB_RS5_EEEEEE[_ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIM4BaseKFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvENS0_21default_call_policiesENS_3mpl7vector2ISB_RS5_EEEEEE]+0x30): undefined reference to `boost::python::objects::py_function_impl_base::max_arity() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::caller_py_function_impl<boost::python::detail::caller<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Base::*)() const, boost::python::default_call_policies, boost::mpl::vector2<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Base&> > >::~caller_py_function_impl()':
/usr/include/boost/python/object/py_function.hpp:30: undefined reference to `boost::python::objects::py_function_impl_base::~py_function_impl_base()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::value_holder<Base>::~value_holder()':
/usr/include/boost/python/object/value_holder.hpp:39: undefined reference to `boost::python::instance_holder::~instance_holder()'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:(.data.rel.ro._ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFvP7_objectENS0_21default_call_policiesENS_3mpl7vector2IvS6_EEEEEE[_ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFvP7_objectENS0_21default_call_policiesENS_3mpl7vector2IvS6_EEEEEE]+0x10): undefined reference to `typeinfo for boost::python::objects::py_function_impl_base'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:(.data.rel.ro._ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIM4BaseKFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvENS0_21default_call_policiesENS_3mpl7vector2ISB_RS5_EEEEEE[_ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIM4BaseKFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvENS0_21default_call_policiesENS_3mpl7vector2ISB_RS5_EEEEEE]+0x10): undefined reference to `typeinfo for boost::python::objects::py_function_impl_base'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o:(.data.rel.ro._ZTIN5boost6python7objects12value_holderI4BaseEE[_ZTIN5boost6python7objects12value_holderI4BaseEE]+0x10): undefined reference to `typeinfo for boost::python::instance_holder'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `std::_Sp_counted_deleter<void*, boost::python::converter::shared_ptr_deleter, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
/usr/include/c++/11/bits/shared_ptr_base.h:442: undefined reference to `boost::python::converter::shared_ptr_deleter::operator()(void const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::detail::sp_counted_impl_pd<void*, boost::python::converter::shared_ptr_deleter>::dispose()':
/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:169: undefined reference to `boost::python::converter::shared_ptr_deleter::operator()(void const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::objects::value_holder<Base>::holds(boost::python::type_info, bool)':
/usr/include/boost/python/object/value_holder.hpp:92: undefined reference to `boost::python::objects::find_static_type(void*, boost::python::type_info, boost::python::type_info)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::expected_pytype_for_arg<void>::get_pytype()':
/usr/include/boost/python/converter/pytype_function.hpp:68: undefined reference to `boost::python::converter::registry::query(boost::python::type_info)'
/usr/bin/ld: /usr/include/boost/python/converter/pytype_function.hpp:71: undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::expected_pytype_for_arg<_object*>::get_pytype()':
/usr/include/boost/python/converter/pytype_function.hpp:68: undefined reference to `boost::python::converter::registry::query(boost::python::type_info)'
/usr/bin/ld: /usr/include/boost/python/converter/pytype_function.hpp:71: undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::reference_arg_from_python<Base&>::reference_arg_from_python(_object*)':
/usr/include/boost/python/converter/arg_from_python.hpp:282: undefined reference to `boost::python::converter::get_lvalue_from_python(_object*, boost::python::converter::registration const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::expected_pytype_for_arg<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::get_pytype()':
/usr/include/boost/python/converter/pytype_function.hpp:68: undefined reference to `boost::python::converter::registry::query(boost::python::type_info)'
/usr/bin/ld: /usr/include/boost/python/converter/pytype_function.hpp:71: undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/usr/bin/ld: CMakeFiles/embedding.dir/mymodule.cpp.o: in function `boost::python::converter::expected_pytype_for_arg<Base&>::get_pytype()':
/usr/include/boost/python/converter/pytype_function.hpp:68: undefined reference to `boost::python::converter::registry::query(boost::python::type_info)'
/usr/bin/ld: /usr/include/boost/python/converter/pytype_function.hpp:71: undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `main':
/home/malte/Projects/boost-python-examples/10-Embedding/embedding.cpp:22: undefined reference to `boost::python::import(boost::python::str)'
/usr/bin/ld: /home/malte/Projects/boost-python-examples/10-Embedding/embedding.cpp:24: undefined reference to `boost::python::import(boost::python::str)'
/usr/bin/ld: /home/malte/Projects/boost-python-examples/10-Embedding/embedding.cpp:27: undefined reference to `boost::python::exec_file(char const*, boost::python::api::object, boost::python::api::object)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::converter::arg_to_python<char const*>::arg_to_python(char const* const&)':
/usr/include/boost/python/converter/builtin_converters.hpp:157: undefined reference to `boost::python::converter::do_return_to_python(char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::api::const_attribute_policies::get(boost::python::api::object const&, char const*)':
/usr/include/boost/python/object_attributes.hpp:74: undefined reference to `boost::python::api::getattr(boost::python::api::object const&, char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::api::item_policies::set(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&)':
/usr/include/boost/python/object_items.hpp:73: undefined reference to `boost::python::api::setitem(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::str::str(char const*)':
/usr/include/boost/python/str.hpp:150: undefined reference to `boost::python::detail::str_base::str_base(char const*)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::converter::pytype_object_manager_traits<&PyDict_Type, boost::python::dict>::adopt(_object*)':
/usr/include/boost/python/converter/pytype_object_mgr_traits.hpp:37: undefined reference to `boost::python::pytype_check(_typeobject*, _object*)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o: in function `boost::python::converter::detail::value_arg_to_python<Base>::value_arg_to_python(Base const&)':
/usr/include/boost/python/converter/arg_to_python.hpp:205: undefined reference to `boost::python::converter::detail::arg_to_python_base::arg_to_python_base(void const volatile*, boost::python::converter::registration const&)'
/usr/bin/ld: CMakeFiles/embedding.dir/embedding.cpp.o:(.data.rel.local.DW.ref._ZTIN5boost6python17error_already_setE[DW.ref._ZTIN5boost6python17error_already_setE]+0x0): undefined reference to `typeinfo for boost::python::error_already_set'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [10-Embedding/CMakeFiles/embedding.dir/build.make:120: 10-Embedding/embedding] Error 1
make[1]: *** [CMakeFiles/Makefile2:610: 10-Embedding/CMakeFiles/embedding.dir/all] Error 2
make: *** [Makefile:114: all] Error 2

Additional context
Add any other context about the problem here.

okay i found the issue. I could solve it by changing. I guess the REQUIRED is optional but on the other hand it fails later on if this doesn't work any ways.

Screenshot from 2022-03-20 08-26-13

I wonder though how specific this is for Ubuntu compared to lets say Fedora or Arch. In any case it seems like the simple
if (UNIX AND NOT APPLE) is not enough. Thinking about this maybe instead of filtering by UNIX and APPLE and so, it makes more sense to filter by found this configuration or that configuration. As long as one way works things will be fine.

Yes, unfortunately, linux distribuitions have no commen scheme of naming libraries. And it's especially bad with the boos libraries.