Not Valgrind, CDPATH

The problem I described just yesterday (here) seems not be to with Valgrind in particular. Today I was trying to build the file(1) utility and mysteriously failed with the same symptoms. So that made me curious.

Apparently the cd command on my shell

$ $SHELL --version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

behaves differently when called via /bin/sh rather than /bin/bash. In any case, the fact that cd was failing got me thinking. It obviously had to do with cd itself, so it must be some factor that influences how cd acts. CDPATH does just that and in my .bashrc it was set to /mnt. So I was giving it a try to unset CDPATH and suddenly the build would succeed. I’m going to try that with Valgrind later, but given the identical symptoms and the fact that both use automake/autoconf to create the make files, increases the likelihood of this being the problem.

The gist: unset CDPATH (or don’t set it in your profile ;))

// Oliver

PS: I verified it, this is indeed also the problem for Valgrind.

This entry was posted in EN, Linux, Programming, Unix and unixoid and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *