This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.17: problem building GNU screen


> I found a problem building GNU screen on cygwin 1.5.17.
> Invoking ./configure leads to produce below error message.
> 
>>rm: cannot remove `conftext.exe': Permission denied.

IIRC I encountered this problem during the test for a broken FIFO
implementation.  As it turns out, Cygwin's FIFO implementation is broken
(http://cygwin.com/ml/cygwin-apps/2005-04/msg00163.html), but the test in
configure doesn't detect this.  So, my solution was just to remove this
test from the configure script and set fifo= .  This also solved the
leftover process problem.  Try applying the attached patch, and rerunning
configure.

Also, a test package of screen is available.  You may find it easier just to
run it instead.  See http://cygwin.com/ml/cygwin/2005-06/msg00608.html for
a recent update.

Good luck,
Andrew.

diff -ur screen-4.0.2.orig/configure screen-4.0.2/configure
--- screen-4.0.2.orig/configure	2003-12-05 08:46:54.000000000 -0500
+++ screen-4.0.2/configure	2005-05-02 10:30:20.000000000 -0400
@@ -4156,206 +4156,15 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-{ echo "$as_me:$LINENO: checking fifos..." >&5
-echo "$as_me: checking fifos..." >&6;}
-if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#ifndef O_NONBLOCK
-#define O_NONBLOCK O_NDELAY
-#endif
-#ifndef S_IFIFO
-#define S_IFIFO 0010000
-#endif
-
-char *fin = "/tmp/conftest$$";
-
-main()
-{
-  struct stat stb;
-#ifdef FD_SET
-  fd_set f;
-#else
-  int f;
-#endif
-
-  (void)alarm(5);
-#ifdef POSIX
-  if (mkfifo(fin, 0777))
-#else
-  if (mknod(fin, S_IFIFO|0777, 0))
-#endif
-    exit(1);
-  if (stat(fin, &stb) || (stb.st_mode & S_IFIFO) != S_IFIFO)
-    exit(1);
-  close(0);
-#ifdef __386BSD__
-  /*
-   * The next test fails under 386BSD, but screen works using fifos.
-   * Fifos in O_RDWR mode are only used for the BROKEN_PIPE case and for
-   * the select() configuration test.
-   */
-  exit(0);
-#endif
-  if (open(fin, O_RDONLY | O_NONBLOCK))
-    exit(1);
-  if (fork() == 0)
-    {
-      close(0);
-      if (open(fin, O_WRONLY | O_NONBLOCK))
-	exit(1);
-      close(0);
-      if (open(fin, O_WRONLY | O_NONBLOCK))
-	exit(1);
-      if (write(0, "TEST", 4) == -1)
-	exit(1);
-      exit(0);
-    }
-#ifdef FD_SET
-  FD_SET(0, &f);
-#else
-  f = 1;
-#endif
-  if (select(1, &f, 0, 0, 0) == -1)
-    exit(1);
-  exit(0);
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "- your fifos are usable" 1>&6
- fifo=1
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
+# Cygwin patch:
+# Cygwin's fifo implementation is broken; see
+# http://cygwin.com/ml/cygwin-apps/2005-04/msg00163.html.
+# Unfortunately, the "broken fifo implementation test" that was in this 
+# script doesn't detect this, so just short-circuit the whole thing here.
+echo "$as_me: checking fifos..." >&6
 echo "- your fifos are not usable" 1>&6
-
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f /tmp/conftest*
-
-if test -n "$fifo"; then
-{ echo "$as_me:$LINENO: checking for broken fifo implementation..." >&5
-echo "$as_me: checking for broken fifo implementation..." >&6;}
-if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-#ifndef O_NONBLOCK
-#define O_NONBLOCK O_NDELAY
-#endif
-#ifndef S_IFIFO
-#define S_IFIFO 0010000
-#endif
-
-char *fin = "/tmp/conftest$$";
-
-main()
-{
-  struct timeval tv;
-#ifdef FD_SET
-  fd_set f;
-#else
-  int f;
-#endif
-
-#ifdef POSIX
-  if (mkfifo(fin, 0600))
-#else
-  if (mknod(fin, S_IFIFO|0600, 0))
-#endif
-    exit(1);
-  close(0);
-  if (open(fin, O_RDONLY|O_NONBLOCK))
-    exit(1);
-#ifdef FD_SET
-  FD_SET(0, &f);
-#else
-  f = 1;
-#endif
-  tv.tv_sec = 1;
-  tv.tv_usec = 0;
-  if (select(1, &f, 0, 0, &tv))
-    exit(1);
-  exit(0);
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "- your implementation is ok" 1>&6
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-echo "- you have a broken implementation" 1>&6
- cat >>confdefs.h <<\_ACEOF
-#define BROKEN_PIPE 1
-_ACEOF
- fifobr=1
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f /tmp/conftest*
-fi
+fifo=
 
 
 { echo "$as_me:$LINENO: checking sockets..." >&5

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]