|
From: Oliver S. <ol...@f-...> - 2010-02-16 20:49:39
|
Hello everybody, I've been trying to build Valgrind on my Debian (5.0.3) box, since the --read-var-info option doesn't seem to be in the version that comes via APT (which identifies as "valgrind-3.3.1-Debian"). Running "./configure --prefix=$HOME/bin" doesn't give any errors, but once I start "make" it bombs out as follows: ----- $ make echo "# This is a generated file, composed of the following suppression rules:" > default.supp echo "# " exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp cat exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp make all-recursive make[1]: Entering directory `/home/oliver/valgrind-3.5.0' Making all in include /bin/sh: line 17: cd: include: No such file or directory make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/oliver/valgrind-3.5.0' make: *** [all] Error 2 ----- When I dug into the Makefile (which is a bit painful with auto-generated make files), I figured that the problem lies with the line: (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) from the $(RECURSIVE_TARGETS) goal. Since "Making all in include" from the output suggests that the problem is in the ./include folder, I tried a simple "make" there, which seemed to succeed: ----- $ (cd include/ && make) make: Nothing to be done for `all'. ----- So probably it's in the wrong folder while trying to cd into ./include, and therefore I decided to put a pwd in front of the cd, like so: (pwd; cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) which tells me then that it *is* in the correct folder for this particular cd, and therefore it shouldn't even fail: ----- $ make make all-recursive make[1]: Entering directory `/home/oliver/valgrind-3.5.0' Making all in include /home/oliver/valgrind-3.5.0 /bin/sh: line 17: cd: include: No such file or directory make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/oliver/valgrind-3.5.0' make: *** [all] Error 2 ----- (the ./include folder exists, contains a Makefile and numerous .h files) What am I doing wrong? Any pointers to get it to build would be much appreciated. Thanks in advance, // Oliver |
|
From: Oliver S. <ol...@f-...> - 2010-02-16 21:16:00
|
Alright, I got it to build by using a dirty trick. I did test this up
front with a single goal from the make file and then with all.
Before running "./configure" I did this from inside the source directory:
find -name 'Makefile.in' -exec sed -i 's/cd \$\$subdir/cd
\$(CURDIR)\/\$\$subdir/' {} \;
The idea is to make all occurrences of of 'cd $$subdir' in all
Makefile.in files absolute paths instead of the (default) relative
directory. Strangely enough this does the job. But it is still odd that
make would act up, since the "pwd" output from my previous post clearly
showed that the current directory was the correct one ...
But it's beyond me why "cd" failed. Anyway, perhaps this line above (no
line breaks, though) will help others having similar issues (remember to
call ./configure after it, though) ...
// Oliver
On 2010-02-16 20:24, Oliver Schneider wrote:
> Hello everybody,
>
> I've been trying to build Valgrind on my Debian (5.0.3) box, since the
> --read-var-info option doesn't seem to be in the version that comes via
> APT (which identifies as "valgrind-3.3.1-Debian").
>
> Running "./configure --prefix=$HOME/bin" doesn't give any errors, but
> once I start "make" it bombs out as follows:
>
> -----
> $ make
> echo "# This is a generated file, composed of the following suppression
> rules:"> default.supp
> echo "# " exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp
> glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp>> default.supp
> cat exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp
> glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp>> default.supp
> make all-recursive
> make[1]: Entering directory `/home/oliver/valgrind-3.5.0'
> Making all in include
> /bin/sh: line 17: cd: include: No such file or directory
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/oliver/valgrind-3.5.0'
> make: *** [all] Error 2
> -----
> [...]
|
|
From: Oliver S. <ol...@f-...> - 2010-02-17 16:26:40
|
One more note, it seems that the problem is with the CDPATH variable.
For some reason "cd" behaves differently in the shell, where leaving out
the "./" in front of a folder name causes no harm. Anyway, the mystery
got solved by removing the CDPATH variable from the environment and then
I can build without further changes.
The same problem also occurred with other sources, not just Valgrind.
This is what made me suspicious.
// Oliver
On 2010-02-16 21:15, Oliver Schneider wrote:
> Alright, I got it to build by using a dirty trick. I did test this up
> front with a single goal from the make file and then with all.
>
> Before running "./configure" I did this from inside the source directory:
>
> find -name 'Makefile.in' -exec sed -i 's/cd \$\$subdir/cd
> \$(CURDIR)\/\$\$subdir/' {} \;
>
> The idea is to make all occurrences of of 'cd $$subdir' in all
> Makefile.in files absolute paths instead of the (default) relative
> directory. Strangely enough this does the job. But it is still odd that
> make would act up, since the "pwd" output from my previous post clearly
> showed that the current directory was the correct one ...
>
> But it's beyond me why "cd" failed. Anyway, perhaps this line above (no
> line breaks, though) will help others having similar issues (remember to
> call ./configure after it, though) ...
>
>
> // Oliver
|