
Hi Dann,

whilst I have, on rare occasions, observed the symlink failure under MingW,
I've never come across the other issues you've mentioned (I build from cvs,
instead of snapshots, but I can't imagine that causes these problems).

Is it possible your MingW install is a broken? Which version are you using?
Is it possible the wrong libs/include files are being referenced? Are you
sure parts of cygwin are not in your path? ...

Cheers,
Claudio



-----Original Message-----
From: Dann Corbit
To: pgsql-hackers@postgresql.org
Sent: 4/7/04 7:14 AM
Subject: [HACKERS] Small suggestion on build script

I would like to suggest changing the symlinks to copy commands:

cp ./src/backend/port/tas/dummy.s ./src/backend/port/tas.s
cp ./src/backend/port/dynloader/win32.c ./src/backend/port/dynloader.c
cp ./src/backend/port/sysv_sema.c ./src/backend/port/pg_sema.c
cp ./src/backend/port/sysv_shmem.c ./src/backend/port/pg_shmem.c
cp ./src/backend/port/dynloader/win32.h ./src/include/dynloader.h
cp ./src/include/port/win32.h ./src/include/pg_config_os.h
cp ./src/makefiles/Makefile.win32 ./src/Makefile.port

The reason is that under Mingw, I get random failures with the symlinks
(typically all will work but one or two, but there is no telling which
will succeed and which will fail).

The space consumed by a copy instead of a symblink is very small.

Here is a summary of the changes I need to make to do a build of the
latest drop:

1.  Go to the Postgresql site and download the latest development
snapshot called postgresql-snapshot.tar.bz2 and decompress and untar it.
 
2.  Install the complete MINGW tool chain from here:
http://www.mingw.org/download.shtml
I went from the bottom up.
 
3.  Using mingw, change directory to the /postgresql-snapshot directory
and run
$ ./configure   --without-readline
3. b) even at that, the pg_config.h file will be messed up.  You have to
manually edit it so that every reference to readline is #undef removed.
3. c) edit pg_config.h and make these changes:
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H 
#define WIN32 1
3. d) a sample of a working pg_config.h file is attached.
 
 
4.  You will probably have to repair either float.c or ieeefp.h.  The
file float.c needs the following modification after the comments,
because something goes haywire in ieeefp.h:
 
#include "postgres.h"
 
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <math.h>
#include <limits.h>
/* for finite() on Solaris */
#ifdef HAVE_IEEEFP_H 
#ifndef __MINGW32__ /* <<<== ICKY_WIN32_KLUDGE --> DRC {BROKEN ieeefp.h
file} */
#include <ieeefp.h>
#endif /* end ICKY_WIN32_KLUDGE */
#endif

5.  The build will stop where the symlinks fail (random).  For the files
that are missing, perform the copy commands shown above.

6.  Run make, correcting any errors with symlinks until all are resolved

7.  Make install

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Wed, 7 Apr 2004 10:41:32 +1000 
Claudio Natoli <claudio.natoli@memetrics.com>
Re: Small suggestion on build script