| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> | 
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | mingw configure failure workaround | 
| Date: | 2004-05-01 15:16:57 | 
| Message-ID: | 4093BF69.1030602@dunslane.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers pgsql-hackers-win32 pgsql-patches | 
The really horrid hack below fixes for me a MINGW/MSys problem that 
otherwise occurs inconsistently (fails on different links, and pretends 
to have succeeded), but reliably (every run at least one link will not 
actually have happened).
There are 2 parts - first we loop a few times until we succeed, and 
second after the loop we test that we have actually succeeded, and 
complain loudly otherwise.
The second part seems well worth doing. Nobody has yet come up with a 
reasonable alternative to the first part (other than making the user do 
it by hand, which defeats the whole purpose of configure).
So, the questions are: what parts of this should we do?
1) failure test only or
2) loop plus failure test or
3) nothing
And if not 3), is there some autoconf wizard out there who can help do 
this properly? It would probably take me many hours to work out, as I 
have never touched the beast.
cheers
andrew
Index: configure
===================================================================
RCS file: /projects/cvsroot/pgsql-server/configure,v
retrieving revision 1.351
diff -c -w -r1.351 configure
*** configure   27 Apr 2004 20:09:27 -0000      1.351
--- configure   29 Apr 2004 20:17:06 -0000
***************
*** 19141,19151 ****
--- 19141,19160 ----
   esac
   # Make a symlink if possible; otherwise try a hard link.
+ for linktry in 1 2 3 4 5; do
   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
     ln $srcdir/$ac_source $ac_dest ||
     { { echo "$as_me:$LINENO: error: cannot link $ac_dest to 
$srcdir/$ac_source" >&5
 echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
    { (exit 1); exit 1; }; }
+   test -e $ac_dest && break
+ done
+   test -e $ac_dest || + { { echo "$as_me:$LINENO: error: failed to 
link $ac_dest to $srcdir/$ac_source"
+  >&5
+ echo "$as_me: error: failed to link $ac_dest to $srcdir/$ac_source" >&2;}
+    { (exit 1); exit 1; }; }
   done
 _ACEOF
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2004-05-01 15:36:38 | Re: Plan for feature freeze? | 
| Previous Message | Andrew Payne | 2004-05-01 14:28:25 | Re: [HACKERS] What can we learn from MySQL? | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-05-01 20:42:20 | Re: mingw configure failure workaround | 
| Previous Message | Andrew Dunstan | 2004-05-01 03:18:02 | Re: win32 build and test issues | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2004-05-01 17:11:39 | Re: new aggregate functions v1 | 
| Previous Message | Fabien COELHO | 2004-05-01 14:21:21 | new aggregate functions v1 |