Edit report at http://bugs.php.net/bug.php?id=48820&edit=1
ID: 48820 Comment by: glen at delfi dot ee Reported by: arekm at maven dot pl Summary: ttyname_r() configure test unreliable Status: No Feedback Type: Bug Package: POSIX related Operating System: Linux PHP Version: 5.2.10, 5.3.0 Block user comment: N Private report: N New Comment: The simpliest explanation how to build without terminal: run your build job from cron daemon [1] or just use </dev/null as input to configure (as arekm noted) to get same result as of php-5.3.5/ext/posix/config.m4 the detection code is still wrong. [1] http://en.wikipedia.org/wiki/Cron Previous Comments: ------------------------------------------------------------------------ [2009-07-15 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-07-07 18:31:30] arekm at maven dot pl I'm building using rpm and it doesn't provide terminal as stdin to configure - ttyname_r() check fails. ------------------------------------------------------------------------ [2009-07-07 15:34:31] j...@php.net I feel a bit stupid for asking this..but how/why do you build in non terminal..? :) ------------------------------------------------------------------------ [2009-07-06 16:22:29] arekm at maven dot pl Description: ------------ ttyname_r() check done in configure is wrong because it relies on doing build on a terminal. Building on non terminal causes failure. Reproduce code: --------------- This is test taken from configure: [arekm@t400 ~/test/3]$ more a.c #include <unistd.h> int main(int argc, char *argv[]) { char buf[64]; return ttyname_r(0, buf, 64) ? 1 : 0; } [arekm@t400 ~/test/3]$ gcc a.c [arekm@t400 ~/test/3]$ ./a.out [arekm@t400 ~/test/3]$ echo $? 0 success - we are on a terminal [arekm@t400 ~/test/3]$ ./a.out < /dev/null zsh: exit 1 ./a.out < /dev/null [arekm@t400 ~/test/3]$ echo $? 1 [arekm@t400 ~/test/3]$ failure - we are not on terminal ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=48820&edit=1