Permalink
Browse files

Fix EIO != EAGAIN pipe problem on linux and give warning when using L…

…LVM GCC and improve remote building
  • Loading branch information...
1 parent 77f5039 commit 7f62da4aa78f95fcf3db17df6b7d22157deca5ba @feeley feeley committed Oct 18, 2011
Showing with 495 additions and 33 deletions.
  1. +451 −10 configure
  2. +1 −1 configure.ac
  3. +7 −1 lib/os_io.c
  4. +4 −3 makefile.in
  5. +4 −1 prebuilt/macosx/makefile.in
  6. +17 −9 prebuilt/remote-connect
  7. +7 −7 prebuilt/windows/build
  8. +4 −1 prebuilt/windows/makefile.in
View
461 configure
Oops, something went wrong.
View
@@ -18,7 +18,7 @@ AC_SUBST(PACKAGE_STRING)
AC_SUBST(PACKAGE_BUGREPORT)
AC_SUBST(PACKAGE_TARNAME)
-AC_COPYRIGHT([[Copyright (c) 1994-2010 by Marc Feeley, All Rights Reserved.]])
+AC_COPYRIGHT([[Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.]])
AC_CONFIG_SRCDIR(include/gambit.h.in)
View
@@ -2883,8 +2883,14 @@ ___stream_index *len_done;)
if ((n = read (d->fd_rd, buf, len)) < 0)
{
+#if 0
if (errno == EIO) errno = EAGAIN;
- e = err_code_from_errno ();
+#else
+ if (errno == EIO) /* on linux, treating EIO as EAGAIN gives an infinite loop */
+ n = 0;
+ else
+#endif
+ e = err_code_from_errno ();
}
*len_done = n;
View
@@ -1,6 +1,6 @@
# makefile for Gambit-C system.
-# Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
+# Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -109,8 +109,9 @@ check: fake_target all
examples: fake_target all
cd examples && $(MAKE) $(MDEFINES) $@
-prebuilt: dist dist-devel
- cd prebuilt && $(MAKE) $(MDEFINES) $@
+prebuilt: dist dist-devel
+ PATH="gsi:$$PATH" prebuilt/remote-connect farm "" "(define tmpdir \"gambtmp0\")(define gambc-dist \"$(PACKAGE_TARNAME)\")(define timeout 600)(ssh timeout (string-append \"rm -rf \" tmpdir \";mkdir \" tmpdir \";echo 'logged in on:';hostname\"))(scp-to timeout (string-append gambc-dist \".tgz\") (string-append tmpdir \"/.\"))(ssh timeout (string-append \"ssh baro.iro.umontreal.ca 'cd \" tmpdir \";tar zxf \" gambc-dist \".tgz;cd \" gambc-dist \";./configure;make -j 2;make dist;cd prebuilt;make prebuilt'\"))(scp-from timeout (string-append tmpdir \"/\" gambc-dist \"/$(PACKAGE_TARNAME)-*\") \".\")"
+ @# cd prebuilt && $(MAKE) $(MDEFINES) $@
stamp: fake_target
cd include && $(MAKE) $(MDEFINES) $@
@@ -1,6 +1,6 @@
# makefile for Gambit-C build on MacOS X.
-# Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
+# Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
herefromroot = prebuilt/macosx
rootfromhere = ../..
@@ -79,6 +79,9 @@ all-pre:
all-post:
+prebuilt:
+ PATH="$(rootfromhere)/gsi:$$PATH" ../remote-connect macosx "" "(define tmpdir \"gambtmp1\")(define gambc-dist \"$(PACKAGE_TARNAME)\")(define timeout 600)(ssh timeout (string-append \"rm -rf \" tmpdir \";mkdir \" tmpdir \";\"))(scp-to timeout (string-append \"$(rootfromhere)/\" gambc-dist \".tgz\") (string-append tmpdir \"/.\"))(ssh timeout (string-append \"cd \" tmpdir \";tar zxf \" gambc-dist \".tgz;cd \" gambc-dist \";sudo $(herefromroot)/build\"))(scp-from timeout (string-append tmpdir \"/\" gambc-dist \"/$(PACKAGE_TARNAME)-*\") \"$(rootfromhere)\")"
+
install-pre:
install-post: all
View
@@ -17,7 +17,12 @@
;;
;; Usage: ./remote-connect <host> <password> <commands>
+(define debug? #f)
+
(define (main host pw commands)
+ (remote-connect host pw commands))
+
+(define (remote-connect host pw commands)
(define (err)
(exit 1))
@@ -109,6 +114,7 @@
(same-prefix? (cdr prefix) (cdr lst))
#f))))
+ (if debug? (set! echo? #t))
(let ((rev-str (reverse (string->list str))))
(let loop ((lst '()))
(if (same-prefix? rev-str lst)
@@ -121,11 +127,12 @@
#f))))))
(define (send output port)
- ;;(print output)
+ (if debug? (print output))
(print port: port output)
(force-output port))
(define (end-process port echo?)
+ (if debug? (set! echo? #t))
(let* ((output (read-line port #f))
(output (if (string? output) output "")))
(if echo? (print output)) ;; echo command output
@@ -136,6 +143,12 @@
(if (not echo?) (print output))
#f))))
+(define (send-password port)
+ (if password
+ (begin
+ (expect "assword:" port #f)
+ (send (list password "\n") port))))
+
(define (sh cmd)
(= 0 (shell-command cmd)))
@@ -152,10 +165,7 @@
(input-port-timeout-set! port timeout) ;; must login within this time
- (if password
- (begin
- (expect "assword:" port #f)
- (send (list password "\n") port)))
+ (send-password port)
(if (expect (string-append start-marker "\n") port #f)
@@ -179,8 +189,7 @@
(input-port-timeout-set! port timeout) ;; must login and copy within this time
- (expect "assword:" port #f)
- (send (list password "\n") port)
+ (send-password port)
(end-process port #f)))
@@ -196,8 +205,7 @@
(input-port-timeout-set! port timeout) ;; must login and copy within this time
- (expect "assword:" port #f)
- (send (list password "\n") port)
+ (send-password port)
(end-process port #f)))
View
@@ -1,14 +1,14 @@
#! /bin/sh
-# Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
+# Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
herefromroot="prebuilt/windows"
rootfromhere="../.."
-if [ "`id -un`" != "Administrator" ] ; then
- echo "You must execute this script as Administrator!"
- exit 1
-fi
+#if [ "`id -un`" != "Administrator" ] ; then
+# echo "You must execute this script as Administrator!"
+# exit 1
+#fi
export INSTALL_PREFIX="/c/Gambit-C/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././."
export DOS_INSTALL_PREFIX="`echo \"$INSTALL_PREFIX\" | sed -e \"s|^/c|C:|g\"`"
@@ -28,13 +28,13 @@ for VARIANT in mingw visualc; do
;;
esac
- cmd /c "C:\PROGRA~1\MICROS~2\VC\VCVARS~1.BAT && C:\PROGRA~1\MICROS~4\SETENV.CMD /RETAIL && sh -c \"CC=\\\"$CONFIG_CC\\\" ./configure --prefix=\\\"$DOS_INSTALL_PREFIX\\\" --enable-multiple-versions --enable-symlinks --enable-single-host # --enable-gcc-opts\""
+ cmd /c "C:\PROGRA~1\MICROS~1.0\VC\VCVARS~1.BAT && c:/MinGW/msys/1.0/bin/sh -c \"CC=\\\"$CONFIG_CC\\\" ./configure --prefix=\\\"$DOS_INSTALL_PREFIX\\\" --enable-multiple-versions --enable-symlinks --enable-single-host # --enable-gcc-opts\""
cd "$herefromroot"
chmod +x build-phase2
- cmd /c "C:\PROGRA~1\MICROS~2\VC\VCVARS~1.BAT && C:\PROGRA~1\MICROS~4\SETENV.CMD /RETAIL && sh -c \"./build-phase2 \\\"$VARIANT\\\" \\\"$RUN_TESTS\\\"\"" > build-phase2.out
+ cmd /c "C:\PROGRA~1\MICROS~1.0\VC\VCVARS~1.BAT && c:/MinGW/msys/1.0/bin/sh -c \"./build-phase2 \\\"$VARIANT\\\" \\\"$RUN_TESTS\\\"\"" > build-phase2.out
cat build-phase2.out
@@ -1,6 +1,6 @@
# makefile for Gambit-C build on Windows.
-# Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved.
+# Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
herefromroot = prebuilt/windows
rootfromhere = ../..
@@ -78,6 +78,9 @@ all-pre:
all-post:
+prebuilt:
+ PATH="$(rootfromhere)/gsi:$$PATH" ../remote-connect windows "" "(define tmpdir \"gambtmp1\")(define gambc-dist \"$(PACKAGE_TARNAME)\")(define timeout 600)(ssh timeout (string-append \"rm -rf \" tmpdir \";mkdir \" tmpdir \";\"))(scp-to timeout (string-append \"$(rootfromhere)/\" gambc-dist \".tgz\") (string-append tmpdir \"/.\"))(ssh timeout (string-append \"c:/MinGW/msys/1.0/bin/sh --login -c 'cd \" tmpdir \";tar zxf \" gambc-dist \".tgz;cd \" gambc-dist \";$(herefromroot)/build'\"))(scp-from timeout (string-append tmpdir \"/\" gambc-dist \"/$(PACKAGE_TARNAME)-*\") \"$(rootfromhere)\")"
+
install-pre:
install-post: all

0 comments on commit 7f62da4

Please sign in to comment.