curl-users
curl-7.17.1 make check fails because wrong valgrind is found
Date: Wed, 16 Jan 2008 20:44:24 +0000
Hi,
I tried to build and install curl-7.17.1 to a non-standard location, where the most updated versions of software are located. During the make-check stage, all tests failed with errors like the following:
test 079...sh: line 1: 21002 Illegal instruction ../libtool --mode=execute /usr/bin/valgrind --tool=memcheck --leak-check=yes --num-callers=16 --log-file=log/valgrind79 ../src/curl --output log/curl79.out --include -v --trace-time ftp://127.0.0.1:8990/we/want/that/page/79 -x 127.0.0.1:8990 >>log/stdout79 2>>log/stderr79
It turns out that runtests.pl thinks it knows better than the user what $PATH should look like, effectively overriding the current $PATH, and causing the wrong valgrind to be used. After I applied the following patch, tests ran correctly:
####diff begin####
--- runtests.pl 2007-10-26 18:25:19 -04:00
+++ runtests.pl.new 2008-01-16 14:57:46 -05:00
@@ -341,8 +341,7 @@
#
sub checkcmd {
my ($cmd)=@_;
- my @paths=("/usr/sbin", "/usr/local/sbin", "/sbin", "/usr/bin",
- "/usr/local/bin", split(":", $ENV{'PATH'}));
+ my @paths=(split(":", $ENV{'PATH'}), "/usr/sbin", "/usr/local/sbin", "/sbin", "/usr/bin", "/usr/local/bin");
for(@paths) {
if( -x "$_/$cmd") {
return "$_/$cmd";
####diff end####
-- NathanReceived on 2008-01-16