22

Valgrind doesn't like glibc 2.15:

checking the GLIBC_VERSION version... unsupported version 2.15
configure: error: Valgrind requires glibc version 2.2 - 2.14

How can I deal with this? do I have to downgrade glibc? I'm working on Ubuntu 12.04 if that is pertinent info.

Update:

So I was attempting to download source and install from there instead of using apt-get since I'm going through Learn C the Hard Way. After I got this problem I resorted to apt-get to see if it would work. it installed this package for me:

libc6-dbg - Embedded GNU C Library: detached debugging symbols
bmargulies
  • 97,814
  • 39
  • 186
  • 310
talloaktrees
  • 3,508
  • 6
  • 28
  • 43

5 Answers5

18

I'm going through this book too and ran into this problem. I googled it and ended up here following Employeed Russian's advice I went in and played with the configure files and got it to work.

Go into your configure to about line 6404 and then paste this in:

         2.15)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.15 family" >&5
$as_echo "2.15 family" >&6; }

$as_echo "#define GLIBC_2_14 1" >>confdefs.h

DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;

Then I ran configure, make and then sudo make install and it all worked.

In the configure.in file I also added code around 777 but I dont think it was important to the final result, if it is though I basically just copied the previous stuff that referenced 2.14, pasted and changed it all to 2.15

Hope this helps

Rumel
  • 917
  • 1
  • 9
  • 21
  • 1
    thanks much for this. I was able to install and execute the make and install commands as well. Thought valgrind now complaints about the use of "install glibc's debuginfo", valgrind itself seems to have been installed. Thanks a lot. – Ayusman Jun 05 '12 at 20:12
10

Update for valgrind 3.9.0 and glibc 2.19:

I was having the same issue, and adding this to the configure script, before the line with darwin), fixed it:

     2.19)
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
$as_echo "2.19 family" >&6; }

$as_echo "#define GLIBC_2_19 1" >>confdefs.h

    DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
    DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
    DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
    ;;

Tested on KUbuntu 14.04

Filipe Gonçalves
  • 20,783
  • 6
  • 53
  • 70
  • Remember line number is changed to `6551`. So do not copy it around `6404`(For those who fear to edit configure file). – kAmol Sep 09 '14 at 05:28
9

How can I deal with this?

One of two ways:

  1. Use your distribution and download the package they've already built for you, or
  2. Figure out the problem (which is that configure has not been regenerated after 2.15 was added to configure.in) and fix it.

do I have to downgrade glibc?

That will likely render your system un-bootable (because most other binaries depend on 2.15).

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
3

Refreshed for valgrind-3.8.1 (and this should work on any quasi-current Linux box -- tested on Slackware 14.0):

Added a "2.17" option (approximately line 6607) between the end of "2.16" & the beginning of "darwin" in "valgrind-3.8.1/configure" file.

Worked like a charm! Thanks for the assist guys!

Cheers!

--at

A.T.
  • 31
  • 2
2

It seems, whenever a new version is released terminal asks for different versions of Glibc. So if terminal gives such an error:

checking the GLIBC_VERSION version... unsupported version 2.19
configure: error: Valgrind requires glibc version 2.2 - 2.14

Then you need to edit configure file for 2.19 version, because that version is unsupported as reported in the teminal.

So open in some text editor - the file called configure from the valgrind directory, find the following piece of code via CTRL+F:

case "${GLIBC_VERSION}" in 2.2)

When you get to that line in the editor(always line number may change depending on release version) you find the below code beginning with 2.2).

        2.2)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.15 family" >&5
$as_echo "2.15 family" >&6; }

$as_echo "#define GLIBC_2_14 1" >>confdefs.h

DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;

And if you scroll down, you find the same code for every other version from 2.2 to 2.21... . Copy&Paste the code of last version after last version (notice that only in my case it is 2.2 version, which is beginning with 2.2) you need to change all those 2.2)'s to the version you are required from terminal which is 2.19) in my case.

So if version 2.19 is required by terminal the code you will be adding will look like:

     2.19)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
$as_echo "2.19 family" >&6; }

$as_echo "#define GLIBC_2_19 1" >>confdefs.h

DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;

And following your code if go down the file there should be darwin) on the next lines.

RegarBoy
  • 3,228
  • 1
  • 23
  • 44
  • That was my error: checking the GLIBC_VERSION version... unsupported version 2.21 configure: error: Valgrind requires glibc version 2.2 - 2.19 Then I followed your instructions and worked like a charm. – Dr. MAF Sep 16 '15 at 20:15