Valgrind not building 32 bit rpm on 64 bit machine

valgrind

I have 32 bit C application(running on 64 bit system) leaking memory.

Do debug it I have downloaded valgrind 3.8.1 from http://valgrind.org/downloads/.
Did ./configure, make and make install to install valgrind.

But valgrind builds only 64 bit memcheck-amd64-linux binary.
32 bit memcheck is not getting built.

As a result I get below errors

# valgrind --tool=memcheck --time-stamp=yes -v --track-origins=yes --leak-check=yes /home/test_code32 --error-limit=no
valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory

Stracing valgrind gives me:

execve("/usr/local/lib/valgrind/memcheck-x86-linux", ["valgrind", "--tool=memcheck", "--time-stamp=yes", "-v", "--track-origins=yes", "--leak-check=yes", "/home/test_code32", "--error-limit=no"], [/* 60 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool '"..., 94valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory
) = 94

I checked the ./configure output and it says:

checking for 32 bit build support... no

I am using gcc (SUSE Linux) 4.3.4.

Any idea how to get valgrind build 32 bit memcheck on 64 bit machine?

Best Answer

I have resolved the issue. I installed 32-bit gcc support and then again built valgrind and it created the 32 bit memcheck.