Bug 274926 - valgrind does not build against linux-3
Summary: valgrind does not build against linux-3
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.7 SVN
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-04 17:57 UTC by Sergei Trofimovich
Modified: 2011-10-05 10:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2011-06-04 17:57:35 UTC
Version:           3.7 SVN
OS:                Linux

Linus changed versioning scheme a bit (2.6.xx -> 3.xx) without backward incompatible changes for userspace.

./configure fails this way:

checking for a supported OS... ok (linux-gnu)
checking for the kernel version... unsupported (3.0.0-rc1-00035-g79f3f61-dirty)
configure: error: Valgrind works on kernels 2.4, 2.6

Reproducible: Always




I've fixed it this way locally:

Index: configure.in
===================================================================
--- configure.in        (revision 11795)
+++ configure.in        (working copy)
@@ -225,7 +225,7 @@
         kernel=`uname -r`
 
         case "${kernel}" in
-             2.6.*) 
+             2.6.*|3.*) 
                    AC_MSG_RESULT([2.6 family (${kernel})])
                    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
                    ;;
Comment 1 Bart Van Assche 2011-06-05 10:56:50 UTC
Thanks for the patch -- applied as r11796 on the trunk.
Comment 2 lool@dooz.org 2011-10-05 10:15:04 UTC
testing for uname -r is a pain though  :-/

For instance, right now valgrind builds on Ubuntu buildds which run a stable version of Ubuntu, but build packages for the development series; builds of valgrind will break for older Ubuntu releases when the buildds are upgraded to newer kernels (to a new Ubuntu stable release).  This is also bad for cross-builds (albeit I don't know whether it's supported at all).

This should be a runtime check instead, or specific features that valgrind cares about should be tested directly rather than using the version proxied-information.