Re: [PATCHES] mingw configure failure detection
OK, fixed. --- Andrew Dunstan wrote: Bruce Momjian wrote: Andrew Dunstan wrote: following up our conversation last night, I have tested the following with autoconf 2.57 and it apparently does the right thing: # Links sometimes fail undetected on Mingw - # so here we detect it and warn the user case $host_os in mingw*) AC_CONFIG_COMMANDS([default],[ for linkspec in : $config_links; do test x$linkspec = x: continue linktry=`echo $linkspec | sed 's,:.*,,'` test -e $linktry || AC_MSG_WARN([ link for $linktry failed - please fix by hand]) done ]) ;; esac OK, got it working nicely: case $host_os in mingw*) AC_CONFIG_COMMANDS([check_win32_symlinks],[ # Links sometimes fail undetected on Mingw - # so here we detect it and warn the user for FILE in $CONFIG_LINKS The quotes in the line above are spurious and need to be removed - they inhibit expansion of the variable into words, which is needed. I have checked that with the quotes removed the macro works correctly. cheers andrew do # test -e works for symlinks in the MinGW console test -e `expr $FILE : '\(^:*\)'` || AC_MSG_WARN([*** link for $FILE - please fix by hand]) done ]) ;; esac Applied. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] mingw configure failure detection
The patch as applied is totally broken - the tests have to be run by config.status after it has actually tried to make the links, which is why I used AC_CONFIG_COMMANDS. cheers andrew Bruce Momjian wrote: Adjusted attached patch applied. Thanks. I didn't change 'test -e' because 'test -h' doesn't work (is symlink test on my platform). test -f actually works on symlinks too in MinGW, strangely enough. Anyway, the code is only run on MinGW so we don't have to worry about other platforms. I added a comment explaining it works. I got rid of the AC_CONFIG_COMMANDS and just do the for/test loop in the shell code directly. AC_CONFIG_COMMANDS wouldn't allow me to call AC_MSG_WARN. --- Peter Eisentraut wrote: Andrew Dunstan wrote: This patch for configure.in detects the link failures in MINGW that I and others have seen and warns the user they have to fix it up. I continue to object to these sort of patches if no one wants to bother to contact the mingw maintainers about this problem. Maybe they have a better fix available? Btw. test -e is not portable. And please use AC_MSG_WARN instead of echo. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] Index: configure === RCS file: /cvsroot/pgsql-server/configure,v retrieving revision 1.358 diff -c -c -r1.358 configure *** configure 11 May 2004 21:57:13 - 1.358 --- configure 13 May 2004 01:26:20 - *** *** 17974,17979 --- 17974,17998 ac_config_links=$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template} + # Links sometimes fail undetected on Mingw - + # so here we detect it and warn the user + case $host_os in mingw*) + for linktarget in \ + src/backend/port/tas.s \ + src/backend/port/dynloader.c \ + src/backend/port/pg_sema.c \ + src/backend/port/pg_shmem.c \ + src/include/dynloader.h \ + src/include/pg_config_os.h \ + src/Makefile.port + do + # test -e works for symlinks in the MinGW console + test -e $linktarget || { echo $as_me:$LINENO: WARNING: *** link for $linktarget failed - please fix by hand 5 + echo $as_me: WARNING: *** link for $linktarget failed - please fix by hand 2;} + done + ;; + esac + ac_config_headers=$ac_config_headers src/include/pg_config.h Index: configure.in === RCS file: /cvsroot/pgsql-server/configure.in,v retrieving revision 1.346 diff -c -c -r1.346 configure.in *** configure.in 11 May 2004 21:57:13 - 1.346 --- configure.in 13 May 2004 01:26:22 - *** *** 1236,1241 --- 1236,1259 src/Makefile.port:src/makefiles/Makefile.${template} ]) + # Links sometimes fail undetected on Mingw - + # so here we detect it and warn the user + case $host_os in mingw*) + for linktarget in \ + src/backend/port/tas.s \ + src/backend/port/dynloader.c \ + src/backend/port/pg_sema.c \ + src/backend/port/pg_shmem.c \ + src/include/dynloader.h \ + src/include/pg_config_os.h \ + src/Makefile.port + do + # test -e works for symlinks in the MinGW console + test -e $linktarget || AC_MSG_WARN([*** link for $linktarget failed - please fix by hand]) + done + ;; + esac + AC_CONFIG_HEADERS([src/include/pg_config.h], [ # Update timestamp for pg_config.h (see Makefile.global) ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] mingw configure failure detection
Peter Eisentraut wrote: Andrew Dunstan wrote: The patch as applied is totally broken - the tests have to be run by config.status after it has actually tried to make the links, which is why I used AC_CONFIG_COMMANDS. Additional note: Instead of listing the files explicitly, just use $CONFIG_LINKS, which contains the list of files. Well, yes, except that each entry there is in the form linkname:targetname - we'd have to have extra code to split them up. Something like: for ac_file in : $CONFIG_LINKS; do test x$ac_file = x: continue linktry=`echo $ac_file | sed 's,:.*,,'` test .. done cheers andrew ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [PATCHES] mingw configure failure detection
Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: The patch as applied is totally broken - the tests have to be run by config.status after it has actually tried to make the links, which is why I used AC_CONFIG_COMMANDS. Additional note: Instead of listing the files explicitly, just use $CONFIG_LINKS, which contains the list of files. Well, yes, except that each entry there is in the form linkname:targetname - we'd have to have extra code to split them up. Something like: for ac_file in : $CONFIG_LINKS; do test x$ac_file = x: continue linktry=`echo $ac_file | sed 's,:.*,,'` test .. done OK, attached patch applied. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: configure === RCS file: /cvsroot/pgsql-server/configure,v retrieving revision 1.359 diff -c -c -r1.359 configure *** configure 13 May 2004 01:44:59 - 1.359 --- configure 13 May 2004 22:56:38 - *** *** 17974,17998 ac_config_links=$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template} - # Links sometimes fail undetected on Mingw - - # so here we detect it and warn the user - case $host_os in mingw*) - for linktarget in \ - src/backend/port/tas.s \ - src/backend/port/dynloader.c \ - src/backend/port/pg_sema.c \ - src/backend/port/pg_shmem.c \ - src/include/dynloader.h \ - src/include/pg_config_os.h \ - src/Makefile.port - do - # test -e works for symlinks in the MinGW console - test -e $linktarget || { echo $as_me:$LINENO: WARNING: *** link for $linktarget failed - please fix by hand 5 - echo $as_me: WARNING: *** link for $linktarget failed - please fix by hand 2;} - done - ;; - esac - ac_config_headers=$ac_config_headers src/include/pg_config.h --- 17974,17979 *** *** 19200,19203 --- 19181,19197 # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi + + + # Links sometimes fail undetected on Mingw - + # so here we detect it and warn the user + case $host_os in mingw*) + for FILE in $CONFIG_LINKS + do + # test -e works for symlinks in the MinGW console + test -e `expr $FILE : '\(^:*\)'` || { echo $as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand 5 + echo $as_me: WARNING: *** link for $FILE - please fix by hand 2;} + done + ;; + esac Index: configure.in === RCS file: /cvsroot/pgsql-server/configure.in,v retrieving revision 1.347 diff -c -c -r1.347 configure.in *** configure.in13 May 2004 01:45:02 - 1.347 --- configure.in13 May 2004 22:56:39 - *** *** 1236,1263 src/Makefile.port:src/makefiles/Makefile.${template} ]) # Links sometimes fail undetected on Mingw - # so here we detect it and warn the user case $host_os in mingw*) ! for linktarget in \ ! src/backend/port/tas.s \ ! src/backend/port/dynloader.c \ ! src/backend/port/pg_sema.c \ ! src/backend/port/pg_shmem.c \ ! src/include/dynloader.h \ ! src/include/pg_config_os.h \ ! src/Makefile.port do # test -e works for symlinks in the MinGW console ! test -e $linktarget || AC_MSG_WARN([*** link for $linktarget failed - please fix by hand]) done ;; esac - AC_CONFIG_HEADERS([src/include/pg_config.h], - [ - # Update timestamp for pg_config.h (see Makefile.global) - echo src/include/stamp-h - ]) - - AC_OUTPUT --- 1236,1257 src/Makefile.port:src/makefiles/Makefile.${template} ]) + AC_CONFIG_HEADERS([src/include/pg_config.h], + [ + # Update timestamp for pg_config.h (see Makefile.global) + echo src/include/stamp-h + ]) + + AC_OUTPUT + # Links sometimes fail undetected on Mingw - # so here we detect it and warn the user case $host_os in mingw*) ! for FILE in $CONFIG_LINKS do # test -e works for symlinks in the MinGW console ! test -e `expr $FILE : '\([^:]*\)'` || AC_MSG_WARN([*** link for $FILE - please fix by hand]) done ;; esac ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get
Re: [PATCHES] mingw configure failure detection
Am Montag, 10. Mai 2004 09:17 schrieb Andrew Dunstan: It appears that Dann Corbit has filed a MinGW bug on this, with accurate problem description, but he received a less than stellar response. See https://sourceforge.net/tracker/index.php? func=detailaid=931263group_id=2435atid=102435 I added a followup to this bug and he requests a minimal reproduceable example. Can someone provide one? ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] mingw configure failure detection
Peter Eisentraut [EMAIL PROTECTED] writes: Am Montag, 10. Mai 2004 09:17 schrieb Andrew Dunstan: It appears that Dann Corbit has filed a MinGW bug on this, with accurate problem description, but he received a less than stellar response. See https://sourceforge.net/tracker/index.php? func=detailaid=931263group_id=2435atid=102435 I added a followup to this bug and he requests a minimal reproduceable example. Can someone provide one? From what we've been hearing, all you have to do is download current Postgres (snapshot tarball or CVS pull) and try configure a few times (with make distclean to clean up). That's perhaps not minimal but it should at least convince him the bug exists ... regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] mingw configure failure detection
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Am Montag, 10. Mai 2004 09:17 schrieb Andrew Dunstan: It appears that Dann Corbit has filed a MinGW bug on this, with accurate problem description, but he received a less than stellar response. See https://sourceforge.net/tracker/index.php? func=detailaid=931263group_id=2435atid=102435 I added a followup to this bug and he requests a minimal reproduceable example. Can someone provide one? From what we've been hearing, all you have to do is download current Postgres (snapshot tarball or CVS pull) and try configure a few times (with make distclean to clean up). That's perhaps not minimal but it should at least convince him the bug exists ... I just installed the configure symlink test code that throws a warning if the symlinks don't work, so it is even easier to test now. Just run configure until it fails --- nothing to compile. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] mingw configure failure detection
I said: Peter Eisentraut said: Andrew Dunstan wrote: This patch for configure.in detects the link failures in MINGW that I and others have seen and warns the user they have to fix it up. I continue to object to these sort of patches if no one wants to bother to contact the mingw maintainers about this problem. Maybe they have a better fix available? I have already said I would follow it up. But the problem exists today and shouldn't be left until we get an answer. Maybe it will take a week or a month, or there will be no good answer at all. It appears that Dann Corbit has filed a MinGW bug on this, with accurate problem description, but he received a less than stellar response. See https://sourceforge.net/tracker/index.php? func=detailaid=931263group_id=2435atid=102435 (Despite previous speculation, he did indicate that the problem is intermittent, not constant). Cheers andrew ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] mingw configure failure detection
Peter Eisentraut said: Andrew Dunstan wrote: This patch for configure.in detects the link failures in MINGW that I and others have seen and warns the user they have to fix it up. I continue to object to these sort of patches if no one wants to bother to contact the mingw maintainers about this problem. Maybe they have a better fix available? I have already said I would follow it up. But the problem exists today and shouldn't be left until we get an answer. Maybe it will take a week or a month, or there will be no good answer at all. All this does is issue a warning. This problem has happened to a number of users. So far the reponse has largely been 'fix it by hand and move on'. I think our reputation is and ought to be better than that. Btw. test -e is not portable. Since this would only be run under Mingw, where it does work, why does that matter? And please use AC_MSG_WARN instead of echo. I guess Bruce can make this change. cheers andrew ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings