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

[boost] update to 1.87.0 #42678

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open

Conversation

miyanyan
Copy link
Contributor

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@miyanyan
Copy link
Contributor Author

there's no 1.87.0 release for boost-compatibility, so I keep it as 1.86.0

@Cheney-W Cheney-W added the category:port-update The issue is with a library, which is requesting update new revision label Dec 13, 2024
@Cheney-W
Copy link
Contributor

Regarding the boost-build port, it requires manually updating the SHA512 value in the portfile.cmake.

@Cheney-W
Copy link
Contributor

Below ports should do the same thing as boost-build.

boost-graph-parallel
boost-mpi
boost-property-map-parallel

The line 31 of scripts/boost/generate-ports.ps1 should be removed.

@Cheney-W Cheney-W marked this pull request as draft December 13, 2024 09:44
@miyanyan
Copy link
Contributor Author

Below ports should do the same thing as boost-build.

boost-graph-parallel
boost-mpi
boost-property-map-parallel

The line 31 of scripts/boost/generate-ports.ps1 should be removed.

thanks

@miyanyan
Copy link
Contributor Author

@Cheney-W asio removed some deprecated facilities, see https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/history.html, and this caused some ports build failed。

for https://github.com/glynos/cpp-netlib, it has been archived by the owner on Apr 3, 2020, should we still need to support it?

@@ -10,6 +10,9 @@ vcpkg_from_github(

set(FEATURE_OPTIONS "")
include("${CMAKE_CURRENT_LIST_DIR}/features.cmake")
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND FEATURE_OPTIONS "-DBOOST_IOSTREAMS_ZSTD_TARGET=zstd::libzstd_static")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
list(APPEND FEATURE_OPTIONS "-DBOOST_IOSTREAMS_ZSTD_TARGET=zstd::libzstd_static")
list(APPEND FEATURE_OPTIONS "-DBOOST_IOSTREAMS_ZSTD_TARGET=zstd::libzstd")

if it is necessary at all. This target is always created.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I changed to

if (BOOST_IOSTREAMS_ENABLE_ZSTD)
    list(APPEND FEATURE_OPTIONS "-DBOOST_IOSTREAMS_ZSTD_TARGET=zstd::libzstd")
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dg0yt there's an error when vcpkg install avro-cpp:x64-windows-static:

CMake Error at D:/installed/x64-windows-static/share/boost_iostreams/boost_iostreams-targets.cmake:60 (set_target_properties):
  The link interface of target "Boost::iostreams" contains:

    zstd::libzstd

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  D:/installed/x64-windows-static/share/boost_iostreams/boost_iostreams-config.cmake:67 (include)
  D:/a/_work/1/s/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  D:/installed/x64-windows-static/share/boost/BoostConfig.cmake:67 (find_package)
  D:/installed/x64-windows-static/share/boost/BoostConfig.cmake:128 (boostcfg_find_component)
  D:/installed/x64-windows-static/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
  D:/a/_work/1/s/scripts/buildsystems/vcpkg.cmake:813 (include)
  D:/downloads/tools/cmake-3.30.1-windows/cmake-3.30.1-windows-i386/share/cmake-3.30/Modules/FindBoost.cmake:610 (find_package)
  D:/installed/x64-windows-static/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
  D:/a/_work/1/s/scripts/buildsystems/vcpkg.cmake:813 (include)
  CMakeLists.txt:77 (find_package)

config-x64-windows-static-out.log

but if I changed to

if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
    list(APPEND FEATURE_OPTIONS "-DBOOST_IOSTREAMS_ZSTD_TARGET=zstd::libzstd_static")
endif()

it works well, seems target zstd::libzstd not work when build static?
boost_iostreams-targets.txt
zstdTargets.txt

@miyanyan
Copy link
Contributor Author

boost-regex got some error on x64_osx, why boost-regex not header-only and drop c++03 support? see https://www.boost.org/doc/libs/1_87_0/libs/regex/doc/html/boost_regex/install.html

seems boost-regex only need four dependencies
https://github.com/boostorg/regex/blob/boost-1.87.0/CMakeLists.txt#L20-#L26

@miyanyan
Copy link
Contributor Author

no idea why boost-graph got error on arm_neon_android, can't find asm code in boost-graph files...

Run Build Command(s): /vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j33 install
[1/4] /android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DBOOST_ATOMIC_NO_LIB -DBOOST_ATOMIC_STATIC_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_CHRONO_STATIC_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_DATE_TIME_STATIC_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_GRAPH_STATIC_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_RANDOM_STATIC_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_SERIALIZATION_STATIC_LINK -DBOOST_THREAD_NO_LIB -DBOOST_THREAD_STATIC_LINK -DBOOST_THREAD_USE_LIB -I/mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/include -isystem /mnt/vcpkg-ci/installed/arm-neon-android/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -frtti -fexceptions  -fPIC   -fno-limit-debug-info    -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -MF libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o.d -o libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -c /mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/src/graphml.cpp
FAILED: libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o 
/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DBOOST_ATOMIC_NO_LIB -DBOOST_ATOMIC_STATIC_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_CHRONO_STATIC_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_DATE_TIME_STATIC_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_GRAPH_STATIC_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_RANDOM_STATIC_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_SERIALIZATION_STATIC_LINK -DBOOST_THREAD_NO_LIB -DBOOST_THREAD_STATIC_LINK -DBOOST_THREAD_USE_LIB -I/mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/include -isystem /mnt/vcpkg-ci/installed/arm-neon-android/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -frtti -fexceptions  -fPIC   -fno-limit-debug-info    -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -MF libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o.d -o libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -c /mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/src/graphml.cpp
<inline asm>:1:41: error: expected '%<type>' or "<type>"
    1 | .pushsection ".debug_gdb_scripts", "MS",@progbits,1
      |                                         ^
<inline asm>:318:12: error: .popsection without corresponding .pushsection
  318 | .popsection
      |            ^
2 errors generated.

@miyanyan
Copy link
Contributor Author

miyanyan commented Dec 30, 2024

no idea why boost-graph got error on arm_neon_android, can't find asm code in boost-graph files...

Run Build Command(s): /vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j33 install
[1/4] /android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DBOOST_ATOMIC_NO_LIB -DBOOST_ATOMIC_STATIC_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_CHRONO_STATIC_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_DATE_TIME_STATIC_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_GRAPH_STATIC_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_RANDOM_STATIC_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_SERIALIZATION_STATIC_LINK -DBOOST_THREAD_NO_LIB -DBOOST_THREAD_STATIC_LINK -DBOOST_THREAD_USE_LIB -I/mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/include -isystem /mnt/vcpkg-ci/installed/arm-neon-android/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -frtti -fexceptions  -fPIC   -fno-limit-debug-info    -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -MF libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o.d -o libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -c /mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/src/graphml.cpp
FAILED: libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o 
/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DBOOST_ATOMIC_NO_LIB -DBOOST_ATOMIC_STATIC_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_CHRONO_STATIC_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_DATE_TIME_STATIC_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_GRAPH_STATIC_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_RANDOM_STATIC_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_SERIALIZATION_STATIC_LINK -DBOOST_THREAD_NO_LIB -DBOOST_THREAD_STATIC_LINK -DBOOST_THREAD_USE_LIB -I/mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/include -isystem /mnt/vcpkg-ci/installed/arm-neon-android/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -frtti -fexceptions  -fPIC   -fno-limit-debug-info    -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pthread -MD -MT libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -MF libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o.d -o libs/graph/CMakeFiles/boost_graph.dir/src/graphml.cpp.o -c /mnt/vcpkg-ci/b/boost-graph/src/ost-1.87.0-b8107cfa31.clean/libs/graph/src/graphml.cpp
<inline asm>:1:41: error: expected '%<type>' or "<type>"
    1 | .pushsection ".debug_gdb_scripts", "MS",@progbits,1
      |                                         ^
<inline asm>:318:12: error: .popsection without corresponding .pushsection
  318 | .popsection
      |            ^
2 errors generated.

related issues ned14/outcome#308 boostorg/unordered#294

@miyanyan
Copy link
Contributor Author

miyanyan commented Jan 3, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 42678 in repo microsoft/vcpkg

@miyanyan
Copy link
Contributor Author

miyanyan commented Jan 3, 2025

@Cheney-W @dg0yt how to rerun the ci, arm64_osx seems stucked...

@dg0yt
Copy link
Contributor

dg0yt commented Jan 3, 2025

git commit --allow-empty -m CI
git push

@miyanyan
Copy link
Contributor Author

miyanyan commented Jan 3, 2025

git commit --allow-empty -m CI
git push

thanks

@miyanyan miyanyan marked this pull request as ready for review January 3, 2025 14:40
@miyanyan
Copy link
Contributor Author

miyanyan commented Jan 3, 2025

mainly changes:

@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Jan 6, 2025
@JavierMatosD JavierMatosD added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Jan 7, 2025
@JavierMatosD
Copy link
Contributor

asio: removed some deprecated facilities, https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/history.html, like remove io_service, remove context::work, remove query, remove buffer_cast, remove rfc2818_verification...

The sheer amount of patching required to force compatibility with boost-asio is concerning. It looks like the following ports are blocking this update:

  • wt
  • websocketpp
  • tgbot-cpp
  • sleepy-discord
  • robotraconteur
  • restc-cpp
  • quickfast
  • nghttp2-asio
  • cpp-netlib

I'm going to bring this up to the team to see how we can proceed.

@miyanyan
Copy link
Contributor Author

miyanyan commented Jan 9, 2025

asio: removed some deprecated facilities, https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/history.html, like remove io_service, remove context::work, remove query, remove buffer_cast, remove rfc2818_verification...

The sheer amount of patching required to force compatibility with boost-asio is concerning. It looks like the following ports are blocking this update:

  • wt
  • websocketpp
  • tgbot-cpp
  • sleepy-discord
  • robotraconteur
  • restc-cpp
  • quickfast
  • nghttp2-asio
  • cpp-netlib

I'm going to bring this up to the team to see how we can proceed.

Can we bring the asio deprecated facilities back, like

+namespace boost {
+  namespace asio {
+    #if BOOST_VERSION >= 108700
+      using io_service = boost::asio::io_context;
+      using const_buffers_1 = boost::asio::const_buffer;
+      using mutable_buffers_1 = boost::asio::mutable_buffer;
+      using io_context_work = boost::asio::executor_work_guard<boost::asio::io_context::executor_type>;
+      /// Cast a non-modifiable buffer to a specified pointer to POD type.
+      template <typename PointerToPodType>
+      inline PointerToPodType buffer_cast(const mutable_buffer& b) noexcept
+      {
+        return static_cast<PointerToPodType>(b.data());
+      }
+
+      /// Cast a non-modifiable buffer to a specified pointer to POD type.
+      template <typename PointerToPodType>
+      inline PointerToPodType buffer_cast(const const_buffer& b) noexcept
+      {
+        return static_cast<PointerToPodType>(b.data());
+      }
+
+      template <typename Protocol, typename Executor, typename Iterator,
+          BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+            Iterator)) IteratorConnectToken = default_completion_token_t<Executor>>
+      inline auto async_connect(basic_socket<Protocol, Executor>& s, Iterator begin,
+          IteratorConnectToken&& token = default_completion_token_t<Executor>(),
+          constraint_t<
+            !is_endpoint_sequence<Iterator>::value
+          > = 0,
+          constraint_t<
+            !is_same<Iterator, decay_t<IteratorConnectToken>>::value
+          > = 0,
+          constraint_t<
+            !is_connect_condition<IteratorConnectToken, Iterator>::value
+          > = 0)
+        -> decltype(
+          async_initiate<IteratorConnectToken,
+            void (boost::system::error_code, Iterator)>(
+              declval<detail::initiate_async_iterator_connect<Protocol, Executor>>(),
+              token, begin, Iterator(),
+              declval<detail::default_connect_condition>()))
+      {
+        return async_initiate<IteratorConnectToken,
+          void (boost::system::error_code, Iterator)>(
+            detail::initiate_async_iterator_connect<Protocol, Executor>(s),
+            token, begin, Iterator(), detail::default_connect_condition());
+      }
+    #else
+      using io_context_work = boost::asio::io_service::work;
+    #endif
+  }
+}
+

By the way, similar issues may arise with new releases of the standalone Asio library as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants