Hi,
I found the "Porting PostgreSQL to Windows 2000 installation procedures", which are a lot more detailed and clear than many other instructions for installing postgreSQL I found on the web, but still I ran into a problem. I followed the instructions step by step, but when I got to "8. make", I get the following error:

bash-2.04$ make
make -C utils all
make[1]: Entering directory `/usr/src/postgresql-7.0.3/src/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/postgresql-7.0.3/src/utils'
make -C backend all
make[1]: Entering directory `/usr/src/postgresql-7.0.3/src/backend'
make -C access all
make[2]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access'
make -C common  SUBSYS.o
make[3]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access/common'
make[3]: `SUBSYS.o' is up to date.
make[3]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access/common'
make -C gist    SUBSYS.o
make[3]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access/gist'
make[3]: `SUBSYS.o' is up to date.
make[3]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access/gist'
make -C hash    SUBSYS.o
make[3]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access/hash'
make[3]: `SUBSYS.o' is up to date.
make[3]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access/hash'
make -C heap    SUBSYS.o
make[3]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access/heap'
make[3]: `SUBSYS.o' is up to date.
make[3]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access/heap'
make -C index   SUBSYS.o
make[3]: Entering directory `/usr/src/postgresql-7.0.3/src/backend/access/index'
gcc -I../../../include -I../../../backend   -I/usr/local/include -O2 -I/usr/local/inc
lude -DBUILDING_DLL=1 -Wall -Wmissing-prototypes -Wmissing-declarations -I../..    -c
 -o istrat.o istrat.c
istrat.c: In function `OperatorRelationFillScanKeyEntry':
istrat.c:494: `F_OIDEQ' undeclared (first use in this function)
istrat.c:494: (Each undeclared identifier is reported only once
istrat.c:494: for each function it appears in.)
istrat.c: In function `IndexSupportInitialize':
istrat.c:561: `F_OIDEQ' undeclared (first use in this function)
make[3]: *** [istrat.o] Error 1
make[3]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access/index'
make[2]: *** [submake] Error 2
make[2]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend/access'
make[1]: *** [access.dir] Error 2
make[1]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend'
make: *** [all] Error 2
bash-2.04$

My './configure' worked fine and looked like this:

bash-2.04$ ./configure
loading cache ./config.cache
checking host system type... i686-pc-cygwin
checking echo setting...
checking setting template to... cygwin32
checking whether to support locale... disabled
checking whether to support cyrillic recode... disabled
checking whether to support multibyte... disabled
checking setting DEF_PGPORT... 5432
checking setting DEF_MAXBACKENDS... 32
checking setting USE_TCL... disabled
checking setting USE_PERL... disabled
checking setting USE_ODBC... disabled
checking setproctitle... disabled
checking setting ASSERT CHECKING... disabled
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -O2 ) works... yes
checking whether the C compiler (gcc -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking whether gcc needs -traditional... (cached) no
- setting CPPFLAGS=  -I/usr/local/include
- setting LDFLAGS=  -L/usr/local/lib
checking setting debug compiler flag... using default
checking for c++... (cached) c++
checking whether the C++ compiler (c++    -L/usr/local/lib) works... yes
checking whether the C++ compiler (c++    -L/usr/local/lib) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking for include <string> in C++... yes
checking for namespace std in C++... yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking whether ln -s works... (cached) yes
checking whether make sets ${MAKE}... (cached) yes
checking for ranlib... (cached) ranlib
checking for find... (cached) /cygdrive/c/WINNT/system32/find
checking for tar... (cached) /usr/bin/tar
checking for split... (cached) /usr/bin/split
checking for etags... (cached) /usr/bin/etags
checking for xargs... (cached) /usr/bin/xargs
checking for gzcat... (cached) /usr/bin/zcat
checking for perl... no
checking for bison... (cached) /usr/bin/bison
- Using /usr/bin/bison -y -d -L /sw/cygwin-b20/share/
checking for main in -lsfio... (cached) no
checking for main in -lncurses... (cached) yes
checking for main in -ltermcap... (cached) yes
checking for main in -lreadline... (cached) no
checking for using_history in -lreadline... (cached) no
checking for main in -lhistory... (cached) no
checking for main in -lbsd... (cached) no
checking for main in -lutil... (cached) no
checking for main in -lm... (cached) yes
checking for main in -ldl... (cached) no
checking for main in -lsocket... (cached) no
checking for main in -lnsl... (cached) no
checking for main in -lipc... (cached) no
checking for main in -lIPC... (cached) no
checking for main in -llc... (cached) no
checking for main in -ldld... (cached) no
checking for main in -lln... (cached) no
checking for main in -lld... (cached) no
checking for main in -lcompat... (cached) no
checking for main in -lBSD... (cached) no
checking for main in -lcrypt... (cached) yes
checking for main in -lgen... (cached) no
checking for main in -lPW... (cached) no
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for arpa/inet.h... (cached) yes
checking for crypt.h... (cached) yes
checking for dld.h... (cached) no
checking for endian.h... (cached) yes
checking for float.h... (cached) yes
checking for fp_class.h... (cached) no
checking for getopt.h... (cached) yes
checking for history.h... (cached) no
checking for ieeefp.h... (cached) yes
checking for limits.h... (cached) yes
checking for netdb.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for readline.h... (cached) no
checking for readline/history.h... (cached) no
checking for readline/readline.h... (cached) no
checking for sys/select.h... (cached) yes
checking for termios.h... (cached) yes
checking for unistd.h... (cached) yes
checking for values.h... (cached) no
checking for sys/param.h... (cached) yes
checking for pwd.h... (cached) yes
checking for working const... (cached) yes
checking for inline... (cached) inline
checking for preprocessor stringizing operator... (cached) yes
checking for uid_t in sys/types.h... (cached) yes
checking for mode_t... (cached) yes
checking for off_t... (cached) yes
checking for size_t... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for tm_zone in struct tm... (cached) no
checking for tzname... (cached) no
checking for signed types... yes
checking for volatile... yes
checking for type of last arg to accept... size_t
checking for int timezone... no
checking for gettimeofday args... 2 args
checking for union semun... yes
checking for fcntl(F_SETLK)... no
checking for 8-bit clean memcmp... (cached) yes
checking return type of signal handlers... (cached) void
checking for vprintf... (cached) yes
checking for memmove... (cached) yes
checking for sysconf... (cached) yes
checking for sigprocmask... (cached) yes
checking for waitpid... (cached) yes
checking for setsid... (cached) yes
checking for fcvt... (cached) yes
checking for fpclass... (cached) no
checking for fp_class... (cached) no
checking for fp_class_d... (cached) no
checking for class... (cached) no
checking for snprintf... (cached) yes
checking for vsnprintf... (cached) yes
checking for isinf... (cached) yes
checking for getrusage... (cached) yes
checking for srandom... (cached) yes
checking for gethostname... (cached) yes
checking for random... (cached) yes
checking for inet_aton... (cached) yes
checking for strerror... (cached) yes
checking for strdup... (cached) yes
checking for strtol... (cached) yes
checking for strtoul... (cached) yes
checking for strcasecmp... (cached) yes
checking for cbrt... (cached) yes
checking for rint... (cached) yes
checking for filename_completion_function... (cached) no
checking for getopt_long... (cached) yes
checking for finite... yes
checking for sigsetjmp... yes
checking whether 'long int' is 64 bits... no
checking whether 'long long int' is 64 bits... yes
checking whether snprintf handles 'long long int' as %lld... yes
checking alignment of short... (cached) 2
checking alignment of int... (cached) 4
checking alignment of long... (cached) 4
checking alignment of long long int... (cached) 8
checking alignment of double... (cached) 8
checking for POSIX signal interface... no
checking for tclsh... no
checking for tcl... no
configure: warning: TCL/TK support disabled; tcl shell is not in your path
updating cache ./config.cache
creating ./config.status
creating GNUmakefile
creating Makefile.global
creating backend/port/Makefile
creating backend/catalog/genbki.sh
creating backend/utils/Gen_fmgrtab.sh
creating bin/pg_dump/Makefile
creating bin/pg_version/Makefile
creating bin/pgtclsh/mkMakefile.tcldefs.sh
creating bin/pgtclsh/mkMakefile.tkdefs.sh
creating bin/psql/Makefile
creating include/version.h
creating interfaces/libpq/Makefile
creating interfaces/ecpg/lib/Makefile
creating interfaces/ecpg/preproc/Makefile
creating interfaces/libpq++/Makefile
creating interfaces/libpgeasy/Makefile
creating interfaces/libpgtcl/Makefile
creating interfaces/odbc/GNUmakefile
creating interfaces/odbc/Makefile.global
creating pl/plpgsql/src/Makefile
creating pl/plpgsql/src/mklang.sql
creating pl/tcl/mkMakefile.tcldefs.sh
creating test/regress/GNUmakefile
creating include/config.h
include/config.h is unchanged
linking ./backend/port/dynloader/win.c to backend/port/dynloader.c
linking ./backend/port/dynloader/win.h to include/dynloader.h
linking ./include/port/win.h to include/os.h
linking ./makefiles/Makefile.win to Makefile.port
linking ./backend/port/tas/dummy.s to backend/port/tas.s
linking ./include/port to interfaces/odbc/port
linking ./makefiles to interfaces/odbc/makefiles
linking ./template to interfaces/odbc/template
linking ./include/config.h to interfaces/odbc/config.h
bash-2.04$

Can someone tell me what's wrong?
After running into this problem, I tried to install a binary version for NT, but that did not work either.  With the ipc-daemon running, I get

bash-2.04$ ipc-daemon.exe&
[1] 143
bash-2.04$ bin/postmaster -i -D data
Creation de Semaphore "Sem" impossible
IpcSemaphoreCreate: semget failed (Not enough memory) key=5432014, num=16, permission
=600
This type of error is usually caused by an improper
shared memory or System V IPC semaphore configuration.
For more information, see the FAQ and platform-specific
FAQ's in the source directory pgsql/doc or on our
web site at http://www.postgresql.org.
FATAL 1:  InitProcGlobal: IpcSemaphoreCreate failed
NOTICE:  IpcMemoryDetach: shmdt(0x???????): Invalid argument
NOTICE:  IpcMemoryDetach: shmdt(0x???????): Invalid argument
bash-2.04$

Without the ipc-daemon running, I get something similar:

bash-2.04$ bin/postmaster -i -D data
IpcMemoryCreate: shmget failed (Permission denied) key=5432010, size=144, permission=
700
This type of error is usually caused by an improper
shared memory or System V IPC semaphore configuration.
For more information, see the FAQ and platform-specific
FAQ's in the source directory pgsql/doc or on our
web site at http://www.postgresql.org.
IpcMemoryIdGet: shmget failed (Permission denied) key=5432010, size=144, permission=0
IpcMemoryAttach: shmat failed (Permission denied) id=-2
FATAL 1:  AttachSLockMemory: could not attach segment
bash-2.04$

I found both errors on the FAQ at postgreSQL.org , but they only offered remedies for UNIX users, no word about WinNT.
I'd be real glad to hear from somebody. Thanks in advance.

Felix
felix.koenig@web.de

_______________________________________________________________________________
Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://web.de
Die groï¿½e Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.web.de


Fri, 26 Jan 2001 19:27:24 +0100
=?iso-8859-1?Q?"Felix=20K=F6nig"?= <felix.koenig@web.de>
Trouble porting postgreSQL to WinNT
=?iso-8859-1?Q?"Felix=20K=F6nig"?= <felix.koenig@web.de> writes:
> gcc -I../../../include -I../../../backend   -I/usr/local/include -O2 -I/usr/local/inc
> lude -DBUILDING_DLL=1 -Wall -Wmissing-prototypes -Wmissing-declarations -I../..    -c
>  -o istrat.o istrat.c
> istrat.c: In function `OperatorRelationFillScanKeyEntry':
> istrat.c:494: `F_OIDEQ' undeclared (first use in this function)
> istrat.c:494: (Each undeclared identifier is reported only once
> istrat.c:494: for each function it appears in.)

F_OIDEQ (and a lot of other F_xxx macros) should be declared in
src/backend/fmgr.h, which is normally generated during build by
the shell script src/backend/utils/Gen_fmgrtab.sh.  I speculate
that fmgr.h is completely hosed (perhaps empty) due to script
execution problems, and that this just happens to be the first
place in the compile that references an F_xxx macro.

Gen_fmgrtab.sh depends on a shell, awk, sed, and a bunch of other
stuff, so I wouldn't be too surprised if it fails under Win2000.
Not sure why Sasha is seeing a problem, though, unless he's trying
to build under Windows ...

			regards, tom lane

Sat, 27 Jan 2001 01:30:59 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Trouble porting postgreSQL to WinNT 
Is it that \n in genbki.sh.  Please try to apply this patch to
genbki.sh.in, re-run configure, and try again.  If you want to manually
patch it, the \n in the sed script is wrong.


> =?iso-8859-1?Q?"Felix=20K=F6nig"?= <felix.koenig@web.de> writes:
> > gcc -I../../../include -I../../../backend   -I/usr/local/include -O2 -I/usr/local/inc
> > lude -DBUILDING_DLL=1 -Wall -Wmissing-prototypes -Wmissing-declarations -I../..    -c
> >  -o istrat.o istrat.c
> > istrat.c: In function `OperatorRelationFillScanKeyEntry':
> > istrat.c:494: `F_OIDEQ' undeclared (first use in this function)
> > istrat.c:494: (Each undeclared identifier is reported only once
> > istrat.c:494: for each function it appears in.)
> 
> F_OIDEQ (and a lot of other F_xxx macros) should be declared in
> src/backend/fmgr.h, which is normally generated during build by
> the shell script src/backend/utils/Gen_fmgrtab.sh.  I speculate
> that fmgr.h is completely hosed (perhaps empty) due to script
> execution problems, and that this just happens to be the first
> place in the compile that references an F_xxx macro.
> 
> Gen_fmgrtab.sh depends on a shell, awk, sed, and a bunch of other
> stuff, so I wouldn't be too surprised if it fails under Win2000.
> Not sure why Sasha is seeing a problem, though, unless he's trying
> to build under Windows ...
> 
> 			regards, tom lane
> 


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Index: genbki.sh.in
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/catalog/genbki.sh,v
retrieving revision 1.18
retrieving revision 1.19
diff -c -r1.18 -r1.19
*** genbki.sh	2000/10/28 22:14:14	1.18
--- genbki.sh	2001/01/16 22:48:34	1.19
***************
*** 161,170 ****
  ;g' | # we must run a new sed here to see the newlines we added
  sed -e "s/;[ 	]*$//g" \
      -e "s/^[ 	]*//" \
!     -e "s/[ 	]Oid/\ oid/g" \
!     -e "s/[ 	]NameData/\ name/g" \
      -e "s/^Oid/oid/g" \
!     -e "s/^NameData/\name/g" \
      -e "s/(NameData/(name/g" \
      -e "s/(Oid/(oid/g" \
      -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
--- 161,170 ----
  ;g' | # we must run a new sed here to see the newlines we added
  sed -e "s/;[ 	]*$//g" \
      -e "s/^[ 	]*//" \
!     -e "s/[ 	]Oid/ oid/g" \
!     -e "s/[ 	]NameData/ name/g" \
      -e "s/^Oid/oid/g" \
!     -e "s/^NameData/name/g" \
      -e "s/(NameData/(name/g" \
      -e "s/(Oid/(oid/g" \
      -e "s/NAMEDATALEN/$NAMEDATALEN/g" \
Sat, 27 Jan 2001 13:09:09 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Trouble porting postgreSQL to WinNT
Sasha Pachev <sasha@mysql.com> writes:
> On Saturday 27 January 2001 11:09, Bruce Momjian wrote:
>> Is it that \n in genbki.sh.  Please try to apply this patch to
>> genbki.sh.in, re-run configure, and try again.  If you want to manually
>> patch it, the \n in the sed script is wrong.

> Thanks - that did the trick - I got it up and running.

This doesn't make any sense, since genbki.sh has nothing to do with
creating the fmgr.h file.  I think your rebuild probably cleaned up
something else ... hard to tell what though.

			regards, tom lane

Mon, 29 Jan 2001 12:35:13 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Trouble porting postgreSQL to WinNT 
Quoting Tom Lane <tgl@sss.pgh.pa.us>:

> This doesn't make any sense, since genbki.sh has nothing to do with
> creating the fmgr.h file.  I think your rebuild probably cleaned up
> something else ... hard to tell what though.

On a similar vein, is anyone seeing initdb hanging under NT? So far everything 
compiles, but it just hangs (CPU isn't going anything either, so it's not 
looping etc).

Peter

-- 
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

Tue, 30 Jan 2001 04:15:47 -0500 (EST)
Peter T Mount <peter@retep.org.uk>
Re: [GENERAL] Trouble porting postgreSQL to WinNT
Peter,

Yes I had the same problem, but for me the reason was that I forgot to
start the ipc-daemon before running initdb.  Last night I had no
problems installing beta4 on WinNT 4.0.

thanks,
--Barry

Peter T Mount wrote:
> 
> Quoting Tom Lane <tgl@sss.pgh.pa.us>:
> 
> > This doesn't make any sense, since genbki.sh has nothing to do with
> > creating the fmgr.h file.  I think your rebuild probably cleaned up
> > something else ... hard to tell what though.
> 
> On a similar vein, is anyone seeing initdb hanging under NT? So far everything
> compiles, but it just hangs (CPU isn't going anything either, so it's not
> looping etc).
> 
> Peter
> 
> --
> Peter Mount peter@retep.org.uk
> PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
> RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

Tue, 30 Jan 2001 09:41:11 -0800
Barry Lind <barry@xythos.com>
Re: Re: [GENERAL] Trouble porting postgreSQL to WinNT
On Tue, Jan 30, 2001 at 09:41:11AM -0800, Barry Lind wrote:
> Yes I had the same problem, but for me the reason was that I forgot to
> start the ipc-daemon before running initdb.  Last night I had no
> problems installing beta4 on WinNT 4.0.

Also, AFAICT, ipc-daemon must be running under the same NT logon as
the logon that you're using to run initdb (or postmaster), or else
you'll see initdb hang (but use lots of CPU).

This a major PITA for me, because I went by the book (figuratively)
and set up the postgres service to run under a 'postgres' NT logon
account created for just that purpose.  That means I have to run
ipc-daemon logged on as postgres as well.  That's not so bad, but now
when I want to run 'make check' to run regression tests I have to
logon as postgres to do that as well (since the tests run initdb and
postmaster).  Since Cygwin doesn't have any su/sudo (again, AFAICT)
this means logging off my usual development logon, losing all my
pretty windows, and into the postgres login.  (Makes me appreciate
Linux all the more, as if I needed that.)

I don't understand why a single ipc-daemon process can't serve
processes for multiple NT logons at once.  Or can it, and I just don't
have it set up right?

-- 
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

Tue, 30 Jan 2001 14:07:11 -0600
Fred Yankowski <fred@ontosys.com>
Re: Re: [GENERAL] Trouble porting postgreSQL to WinNT
At 14:07 30/01/01 -0600, Fred Yankowski wrote:
>On Tue, Jan 30, 2001 at 09:41:11AM -0800, Barry Lind wrote:
> > Yes I had the same problem, but for me the reason was that I forgot to
> > start the ipc-daemon before running initdb.  Last night I had no
> > problems installing beta4 on WinNT 4.0.
>
>Also, AFAICT, ipc-daemon must be running under the same NT logon as
>the logon that you're using to run initdb (or postmaster), or else
>you'll see initdb hang (but use lots of CPU).

Doh! That would explain it (although my CPU was idle).

Anyhow, it's now running (my linux box still has problems - won't connect 
to the net - so I'm having to rely on NT to get JDBC sorted). Oh hum.


>This a major PITA for me, because I went by the book (figuratively)
>and set up the postgres service to run under a 'postgres' NT logon
>account created for just that purpose.  That means I have to run
>ipc-daemon logged on as postgres as well.  That's not so bad, but now
>when I want to run 'make check' to run regression tests I have to
>logon as postgres to do that as well (since the tests run initdb and
>postmaster).  Since Cygwin doesn't have any su/sudo (again, AFAICT)
>this means logging off my usual development logon, losing all my
>pretty windows, and into the postgres login.  (Makes me appreciate
>Linux all the more, as if I needed that.)

I can't wait to get the linux box back up. Even though I like JBuilder for 
the IDE, I still prefer Linux for the serious backend stuff.

>I don't understand why a single ipc-daemon process can't serve
>processes for multiple NT logons at once.  Or can it, and I just don't
>have it set up right?

Not sure on that one.

Peter


Tue, 30 Jan 2001 21:33:07 +0000
Peter Mount <peter@retep.org.uk>
Re: Re: [GENERAL] Trouble porting postgreSQL to WinNT