Skip to content

build: boost, prevent use of std::unary_function#640

Merged
DeckerSU merged 2 commits intodevfrom
patch-boost-unary-function
Nov 20, 2024
Merged

build: boost, prevent use of std::unary_function#640
DeckerSU merged 2 commits intodevfrom
patch-boost-unary-function

Conversation

@DeckerSU
Copy link
Copy Markdown

@DeckerSU DeckerSU commented Nov 6, 2024

For Boost 1.72 we should use -D_HAS_AUTO_PTR_ETC=0, for newer versions
-DBOOST_NO_CXX98_FUNCTION_BASE.

This will remove warnings like the one shown below during build with GCC 13:

/home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/boost/container_hash/hash.hpp:130:33: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  130 |         struct hash_base : std::unary_function<T, std::size_t> {};
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:49,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:55,
                 from test-komodo/test_legacy_events.cpp:1:
/usr/include/c++/13/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~

For Boost 1.72 we should use -D_HAS_AUTO_PTR_ETC=0, for newer versions
-DBOOST_NO_CXX98_FUNCTION_BASE.

- boostorg/container_hash@fd310d2
- boostorg/functional@6a573e4
- bitcoin/bitcoin@880d4aa
- bitcoin/bitcoin@d4c59da
- DeckerSU/KomodoOcean@0742048

This will remove warnings like the one shown below during build with GCC 13:

```
/home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/boost/container_hash/hash.hpp:130:33: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  130 |         struct hash_base : std::unary_function<T, std::size_t> {};
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:49,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:55,
                 from test-komodo/test_legacy_events.cpp:1:
/usr/include/c++/13/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
```
@smk762 smk762 self-requested a review November 14, 2024 14:23
Copy link
Copy Markdown

@smk762 smk762 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build and launch successful

@DeckerSU DeckerSU merged commit ecfe30c into dev Nov 20, 2024
TheComputerGenie pushed a commit to ComputerGenieCo/komodo that referenced this pull request Sep 12, 2025
* build: boost, prevent use of std::unary_function

For Boost 1.72 we should use -D_HAS_AUTO_PTR_ETC=0, for newer versions
-DBOOST_NO_CXX98_FUNCTION_BASE.

- boostorg/container_hash@fd310d2
- boostorg/functional@6a573e4
- bitcoin/bitcoin@880d4aa
- bitcoin/bitcoin@d4c59da
- DeckerSU/KomodoOcean@0742048

This will remove warnings like the one shown below during build with GCC 13:

```
/home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/boost/container_hash/hash.hpp:130:33: warning: ‘template<class _Arg, class _Result> struct std::unary_function’ is deprecated [-Wdeprecated-declarations]
  130 |         struct hash_base : std::unary_function<T, std::size_t> {};
      |                                 ^~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:49,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /home/decker/komodo/depends/x86_64-unknown-linux-gnu/share/../include/gtest/gtest.h:55,
                 from test-komodo/test_legacy_events.cpp:1:
/usr/include/c++/13/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~
```

* build: add BOOST_CPPFLAGS display for configure
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

Successfully merging this pull request may close these issues.

2 participants