configure dies during the emerge of mysql-4.0.20 : checking for ps... /bin/ps checking "how to check if pid exists"... configure: error: Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual. I looked through mysql's configure for the relevant section, and it checks: if ps p $$ 2> /dev/null | grep $0 >/dev/null If that's false, it fails. It turns out that ps puts a hyphen (-) in front of *some* process names in my ps output, and grep takes that as an option instead of an expression to grep for. On the troublesome box, "\ps p $$" gives: PID TTY STAT TIME COMMAND 22969 pts/0 S 0:00 -bash but this on my workstation I get: PID TTY STAT TIME COMMAND 24378 pts/72 S 0:00 bash (no - before bash). "qpkg -I -f /bin/ps" reports two packages: sys-apps/procps and sys-apps/psmisc Neither of which have any strange use flags that could add this seemingly odd function. The box in question runs grsecurity, which I guess could be responsible. Does anyone know the cause? As far as the fix is concerned, simply changing the line: if $PS p $$ 2> /dev/null | grep $0 > /dev/null to: if $PS p $$ 2> /dev/null | grep -- $0 > /dev/null does it, but I guess this is really an upstream fix. Reproducible: Always Steps to Reproduce: 1. emerge =dev-db/mysql-4.0.20 Actual Results: Fails to get past configure, with the above error. Expected Results: Passed configure with flying monochrome.
Upstream bug report is: http://bugs.mysql.com/4825
My apologies, it was down to /bin/ps being restricted to root and wheel group execute only. As portage runs configure as 'portage', it couldn't execute ps at all.
this is typical, if proc is not mounted eg. in a chroot