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

Build failure with Boost 1.85.0 #9304

Open
cho-m opened this issue Apr 25, 2024 · 4 comments · May be fixed by #9313
Open

Build failure with Boost 1.85.0 #9304

cho-m opened this issue Apr 25, 2024 · 4 comments · May be fixed by #9313

Comments

@cho-m
Copy link

cho-m commented Apr 25, 2024

Building with Boost 1.85.0 results in errors like:

/tmp/wownero-20240425-95926-qcyyf2/src/common/boost_serialization_helper.h:113:93: error: no member named 'copy_option' in namespace 'boost::filesystem'; did you mean 'copy_options'?
      boost::filesystem::copy_file(file_path, file_path + ".unportable", boost::filesystem::copy_option::overwrite_if_exists);
                                                                         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
                                                                                            copy_options
/tmp/wownero-20240425-95926-qcyyf2/contrib/epee/include/storages/portable_storage_val_converters.h:63:49: error: no member named 'numeric' in namespace 'boost'
      CHECK_AND_ASSERT_THROW_MES(from >= boost::numeric::bounds<to_type>::lowest(), "int value overhead: try to set value " << from << " to type " << typeid(to_type).name() << " with lowest possible value = " << boost::numeric::bounds<to_type>::lowest());
                                         ~~~~~~~^

The first is due to removal of boost::filesystem::copy_option (boostorg/filesystem@5df060e). Previous attempt to fix in #8751 back when only deprecated.

Second looks like some indirect headers need to be directly included.


EDIT: Also, on master branch, there are some other incompatibilities like:

success_msg_writer() << tr("Filename: ") << boost::filesystem::complete(m_wallet->get_keys_file());


Seen when updating Boost in Homebrew - Homebrew/homebrew-core#169237

@0xFFFC0000
Copy link
Collaborator

Thanks for reporting this. I am looking into this. For the first error, this should fix it I believe [1]. Trying to replicate second one.

  1. common: support boost filesystem copy_options. #9305

@cho-m
Copy link
Author

cho-m commented Apr 27, 2024

Trying to replicate second one.

I didn't see it on stable release, but was building fork Wownero when I saw the failure. Then I checked that this was part of Monero code.

https://www.boost.org/doc/libs/1_85_0/libs/filesystem/doc/deprecated.html mentions complete was removed and replacement is absolute. For previous 1.84.0, the implementation was essentially an alias https://github.com/boostorg/filesystem/blob/boost-1.84.0/include/boost/filesystem/operations.hpp#L408-L412

@0xFFFC0000
Copy link
Collaborator

0xFFFC0000 commented May 2, 2024

This series of simple patches does fix this issue: #9313 #9307 #9305

I am closing this issue. Feel free to let me know if you had encountered issues.

@selsta
Copy link
Collaborator

selsta commented May 2, 2024

Keeping this open until the PRs are merged, in case others run into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants