Closed b4sti closed 1 month ago
You need to compile Swiften in C++14 mode first
Well, for branch_path
and other boost.filesystem deprecations you need to define BOOST_FILESYSTEM_ALLOW_DEPRECATED
But there are can be a lot of other problems in both Spectrum and Swiften
You are right, there are two independent issues. For protobuf it seems to be enough to set CMAKE_CXX_STANDARD=14 in CMakeLists.txt. The boost issues are unrelated and caused by an update of boost to 1.85 I recently did. Regarding the boost issues I will try to apply the replacements for the deprecated methods here: https://www.boost.org/doc/libs/1_85_0/libs/filesystem/doc/deprecated.html
We should be compatible with previous boost versions so it's better to enable deprecated functions for now
From: https://www.boost.org/users/history/version_1_85_0.html
Removed APIs that were previously declared deprecated. In particular, path and recursive_directory_iterator member functions, is_regular, copy_directory, symbolic_link_exists, complete, copy_option, symlink_option, as well as boost/filesystem/convenience.hpp and boost/filesystem/path_traits.hpp headers were removed. Possible replacements for the removed components are mentioned in the documentation.
BOOST_FILESYSTEM_ALLOW_DEPRECATED only suppressed warnings (referring to branch_path() and is_regular() as used in spectrum2). From: https://www.boost.org/users/history/version_1_81_0.html
Previously deprecated APIs will now generate compilation warnings on use. To suppress these warnings, BOOST_FILESYSTEM_ALLOW_DEPRECATED macro can be defined when compiling user's code.
Well, these functions were deprecated a long time ago and many boost versions before, it is safe to use replacements now
Now it is possible to override CMAKE_CXX_STANDARD from command line and it is actually used in our CI
Seems like protobuf requires CXX 14 now to build. Unfortunately changing CMAKE_CXX_STANDARD from 11 to 14 in CMakeLists.txt did not fix it: