b2
b2 copied to clipboard
libutil presence should not be assumed on newer glibc based systems
Make sure you completed the following tasks
- [X] I searched the discussions
- [x] I searched the closed and open issues
- [x] I read the contribution guidelines
Environment and version details
- Operating System+version: Tizen with glibc-2.40
- Compiler+version: GCC 14.2.0
- Shell: Bash
- B2 Version: Output of
b2 -vandb2 --version
B2 4.10-git
B2 Version 4.10. OS=LINUX.
Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
Copyright 2001 David Turner.
Copyright 2001-2004 David Abrahams.
Copyright 2002-2019 Rene Rivera.
Copyright 2003-2015 Vladimir Prus.
DEFAULTS: jobs = 16
Brief problem description
boost-1.83 fails to build with the following message
[ 160s] gcc.link.dll bin.v2/libs/python/build/gcc-14/release/python-3.13/threading-multi/visibility-hidden/libboost_python313.so.1.83.0
[ 160s] /usr/libilp32/gcc/aarch64-tizen-linux-gnu_ilp32/14.2.0/../../../../aarch64-tizen-linux-gnu_ilp32/bin/ld: cannot find -luti
l: No such file or directory
[ 160s] collect2: error: ld returned 1 exit status
Steps to reproduce the issue
Attempt to build boost against glibc 2.40 configured for an ABI introduced in glibc 2.34 or later. glibc 2.34 have libutil merged into libc. Hence the presence of the former should be tested rather than assumed by build systems.
In b2's python.jam the need for libutil on linux based systems is assumed and hardcoded.
Actual behavior summary
Build of boost fails. I managed to work around the problem with the following patch applied to python.jam
diff --git a/src/tools/python.jam b/src/tools/python.jam
index 0dfc750a22..441d39883c 100644
--- a/src/tools/python.jam
+++ b/src/tools/python.jam
@@ -661,7 +661,7 @@ local rule system-library-dependencies ( target-os )
case aix : return <library>pthread <library>dl ;
case * : return <library>pthread <library>dl
- <toolset>gcc:<library>util <toolset-intel:platform>linux:<library>util ;
+ <toolset-intel:platform>linux:<library>util ;
}
}
Expected behavior summary
boost builds fine