[med-svn] [Git][med-team/ball][master] Fix FTBFS with Boost 1.90 and Eigen 3.5 (Closes: #1129810)

Anton Gladky (@gladk) gitlab at salsa.debian.org
Thu May 14 13:15:18 BST 2026



Anton Gladky pushed to branch master at Debian Med / ball


Commits:
00956202 by Anton Gladky at 2026-05-14T14:15:00+02:00
Fix FTBFS with Boost 1.90 and Eigen 3.5 (Closes: #1129810)

- - - - -


6 changed files:

- debian/changelog
- + debian/patches/fix-boost-asio-io-context.patch
- + debian/patches/fix-boost-system.patch
- + debian/patches/fix-cxx14-standard.patch
- + debian/patches/fix-eigen3-version-path.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,20 @@
+ball (1.5.0+git20220524.d85d2dd-4) unstable; urgency=medium
+
+  * Team upload
+  * Fix FTBFS with Boost 1.90 and Eigen 3.5 (Closes: #1129810):
+    - cmake/BALLConfigBoost.cmake: Remove 'system' from required Boost
+      components; boost::system is header-only since Boost 1.74 and the
+      compiled library was dropped in Boost 1.90.
+    - cmake/FindEigen3.cmake: Fix version detection for Eigen >= 3.5;
+      version macros moved from Eigen/src/Core/util/Macros.h to Eigen/Version.
+    - cmake/BALLCompilerSpecific.cmake: Require C++14 (was c++0x/c++11)
+      to satisfy Eigen 3.5 requirement.
+    - include/BALL/SYSTEM/networking.h, source/SYSTEM/networking.C:
+      Replace removed boost::asio::io_service with io_context; update
+      post()/reset() to the new Boost.Asio 1.90 API.
+
+ -- Anton Gladky <gladk at debian.org>  Tue, 13 May 2026 00:00:00 +0000
+
 ball (1.5.0+git20220524.d85d2dd-3) UNRELEASED; urgency=medium
 
   * Team upload.


=====================================
debian/patches/fix-boost-asio-io-context.patch
=====================================
@@ -0,0 +1,75 @@
+Description: Fix FTBFS with Boost 1.90: migrate from io_service to io_context
+ boost::asio::io_service was deprecated in Boost 1.66 and removed in Boost 1.90.
+ Replace it with boost::asio::io_context. Also update the member post() call
+ to the free function boost::asio::post(), and rename reset() to restart().
+Bug-Debian: https://bugs.debian.org/1129810
+Author: Anton Gladky <gladk at debian.org>
+Forwarded: no
+Last-Update: 2026-05-13
+---
+Index: ball/include/BALL/SYSTEM/networking.h
+===================================================================
+--- ball.orig/include/BALL/SYSTEM/networking.h
++++ ball/include/BALL/SYSTEM/networking.h
+@@ -36,12 +36,14 @@ namespace BALL
+ 			}
+ 
+ 			TCPIOStream(const String& hostname, const String& protocol)
+-				: boost::asio::ip::tcp::iostream(hostname, protocol)
++				: boost::asio::ip::tcp::iostream(static_cast<const std::string&>(hostname),
++				                                  static_cast<const std::string&>(protocol))
+ 			{
+ 			}
+ 
+ 			TCPIOStream(const String& hostname, Position port)
+-				: boost::asio::ip::tcp::iostream(hostname, String(port))
++				: boost::asio::ip::tcp::iostream(static_cast<const std::string&>(hostname),
++				                                  std::string(String(port)))
+ 			{
+ 			}
+ 	};
+@@ -84,7 +86,7 @@ namespace BALL
+ 
+ 			TCPIOStream connected_stream_;
+ 
+-			boost::asio::io_service io_service_;
++			boost::asio::io_context io_service_;
+ 
+ 			boost::asio::ip::tcp::acceptor acceptor_;
+ 	};
+Index: ball/source/SYSTEM/networking.C
+===================================================================
+--- ball.orig/source/SYSTEM/networking.C
++++ ball/source/SYSTEM/networking.C
+@@ -36,7 +36,7 @@ namespace BALL
+ 	void TCPServer::startAccepting()
+ 	{
+ 		connected_stream_.close();
+-		acceptor_.accept(*connected_stream_.rdbuf());
++		acceptor_.accept(connected_stream_.rdbuf()->socket());
+ 
+ 		handleConnection();
+ 	}
+@@ -108,7 +108,7 @@ namespace BALL
+ 	void TCPServerThread::deactivate()
+ 	{
+ 		is_running_ = false;
+-		io_service_.post(boost::bind(&TCPServerThread::handleClose, this));
++		boost::asio::post(io_service_, boost::bind(&TCPServerThread::handleClose, this));
+ 	}
+ 
+ 	void TCPServerThread::handleClose()
+@@ -122,11 +122,11 @@ namespace BALL
+ 	{
+ 		connected_stream_.close();
+ 
+-		acceptor_.async_accept(*connected_stream_.rdbuf(),
++		acceptor_.async_accept(connected_stream_.rdbuf()->socket(),
+ 			boost::bind(&TCPServerThread::handleAsyncConnection, this));
+ 
+ 		io_service_.run();
+-		io_service_.reset();
++		io_service_.restart();
+ 	}
+ 
+ 	void TCPServerThread::handleAsyncConnection()


=====================================
debian/patches/fix-boost-system.patch
=====================================
@@ -0,0 +1,21 @@
+Description: Remove deprecated libboost-system component (header-only since 1.74)
+ In Boost 1.74, boost::system became header-only. In Boost 1.90, the compiled
+ library was removed entirely, causing FTBFS. Remove 'system' from the list of
+ required Boost components since it no longer exists as a compiled library.
+Bug-Debian: https://bugs.debian.org/1129810
+Author: Anton Gladky <gladk at debian.org>
+Forwarded: no
+Last-Update: 2026-05-13
+---
+Index: ball/cmake/BALLConfigBoost.cmake
+===================================================================
+--- ball.orig/cmake/BALLConfigBoost.cmake
++++ ball/cmake/BALLConfigBoost.cmake
+@@ -8,7 +8,6 @@ SET(BALL_BOOST_COMPONENTS
+ 	iostreams
+ 	regex
+ 	serialization
+-	system
+ 	thread
+ )
+ 


=====================================
debian/patches/fix-cxx14-standard.patch
=====================================
@@ -0,0 +1,30 @@
+Description: Require C++14 to support Eigen 3.5+
+ Eigen 3.5.0 requires at least C++14. Update the GCC and Clang compiler flags
+ in BALLCompilerSpecific.cmake from -std=c++0x/-std=c++11 to -std=c++14.
+Bug-Debian: https://bugs.debian.org/1129810
+Author: Anton Gladky <gladk at debian.org>
+Forwarded: no
+Last-Update: 2026-05-13
+---
+Index: ball/cmake/BALLCompilerSpecific.cmake
+===================================================================
+--- ball.orig/cmake/BALLCompilerSpecific.cmake
++++ ball/cmake/BALLCompilerSpecific.cmake
+@@ -45,7 +45,7 @@ IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ 		SET(USE_PEDANTIC OFF)
+ 	ENDIF()
+ 
+-	SET(BALL_PROJECT_COMPILE_FLAGS "${BALL_PROJECT_COMPILE_FLAGS} -std=c++0x")
++	SET(BALL_PROJECT_COMPILE_FLAGS "${BALL_PROJECT_COMPILE_FLAGS} -std=c++14")
+ 
+ 	# Added -Wno-deprecated-declarations as Eigen3 currently uses binder2nd which spams the compiler output.
+ 	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+@@ -126,7 +126,7 @@ ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES ".*
+ 
+ 	SET(CXX_COMPILER_VERSION "${CXX_COMPILER_VERSION_MAJOR}.${CXX_COMPILER_VERSION_MINOR}")
+ 
+-	SET(BALL_PROJECT_COMPILE_FLAGS "${BALL_PROJECT_COMPILE_FLAGS} -std=c++11")
++	SET(BALL_PROJECT_COMPILE_FLAGS "${BALL_PROJECT_COMPILE_FLAGS} -std=c++14")
+ 
+ 	IF(USE_ASAN)
+ 		SET(BALL_PROJECT_COMPILE_FLAGS "${BALL_PROJECT_COMPILE_FLAGS} -fsanitize=address -fno-omit-frame-pointer")


=====================================
debian/patches/fix-eigen3-version-path.patch
=====================================
@@ -0,0 +1,22 @@
+Description: Fix Eigen3 version detection for Eigen >= 3.5
+ In Eigen 3.5.0, the version macros (EIGEN_WORLD_VERSION, EIGEN_MAJOR_VERSION,
+ EIGEN_MINOR_VERSION) were moved from Eigen/src/Core/util/Macros.h to
+ Eigen/Version. Update FindEigen3.cmake to read from the new location.
+Bug-Debian: https://bugs.debian.org/1129810
+Author: Anton Gladky <gladk at debian.org>
+Forwarded: no
+Last-Update: 2026-05-13
+---
+Index: ball/cmake/FindEigen3.cmake
+===================================================================
+--- ball.orig/cmake/FindEigen3.cmake
++++ ball/cmake/FindEigen3.cmake
+@@ -30,7 +30,7 @@ if(NOT Eigen3_FIND_VERSION)
+ endif(NOT Eigen3_FIND_VERSION)
+ 
+ macro(_eigen3_check_version)
+-  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
++  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/Version" _eigen3_version_header)
+ 
+   string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
+   set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")


=====================================
debian/patches/series
=====================================
@@ -8,3 +8,7 @@ lpsolve-link.patch
 cmake-4.patch
 reproducibility.patch
 spelling-errors.patch
+fix-boost-system.patch
+fix-eigen3-version-path.patch
+fix-boost-asio-io-context.patch
+fix-cxx14-standard.patch



View it on GitLab: https://salsa.debian.org/med-team/ball/-/commit/00956202863dba05b178cb33dda7e5ffd3fec10d

-- 
View it on GitLab: https://salsa.debian.org/med-team/ball/-/commit/00956202863dba05b178cb33dda7e5ffd3fec10d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260514/6f8b6677/attachment-0001.htm>


More information about the debian-med-commit mailing list