|
From: Karsten D. <mny...@tp...> - 2009-12-04 08:24:26
|
Hi! I'm trying to use Valgrind 3.5.0 under SuSE 8.0, but that wasn't as easy as the build requirements suggest: | On Linux, you must be running kernel 2.4.X or later, | and glibc 2.2.X or later. SuSE 8.0 uses Kernel 2.4.18 and glibc 2.2.5, so it should work. But 'configure' complains about the gcc version: | checking for a supported version of gcc... no (2.95.3) | configure: error: please use a recent (>= gcc-3.0) version of gcc I think this should be mentioned in the build requirements! You can install gcc 3.0.4 via gcc30-3.0.4-25.i386.rpm, but this will install itself to /opt/experimental. Tweaking the environment, at least 'configure' is happy: | CC=/opt/experimental/bin/cc LDFLAGS=-L/opt/experimental/lib \ | CPP=/opt/experimental/bin/cpp CPPFLAGS=-I/opt/experimental/include \ | CXX=/opt/experimental/bin/g++ ./configure But 'make' isn't. SuSE 8.0 is using 'GNU bash, version 2.05.0(1)' which in theory supports empty lists in a for..in construct, but in practice fails if you don't give a in-list at all: | make[3]: Entering directory `/nsrc/kddev/tools/valgrind- | 3.5.0/coregrind' | mkdir -p ../.in_place; \ | for f in vgpreload_core-x86-linux.so ; do \ | rm -f ../.in_place/$f; \ | ln -f -s ../coregrind/$f ../.in_place; \ | done | for f in ; do \ | if [ ! -e $f.dSYM -o $f -nt $f.dSYM ] ; then \ | echo "dsymutil $f"; \ | dsymutil $f; \ | fi; \ | done | /bin/sh: -c: line 1: syntax error near unexpected token `;' | /bin/sh: -c: line 1: `for f in ; do if [ ! -e $f.dSYM -o $f -nt | $f.dSYM ] ; then echo "dsymutil $f"; dsymutil $f; fi; done' The culprit with this bash version is: for i in $() ; do echo 23 ; done will work as expected (i.e. no output, but no error) while for i in ; do echo 23 ; done won't (syntax error). The actual problem in the Valgrind makefiles are these constructs: | for f in $(noinst_DSYMS); do \ because noinst_DSYMS isn't defined. I tried various presettings of noinst_DSYMS, but to no avail. Any suggestions except hacking all makefiles? Karsten |