Thread: Re: problem install postgres7.03 on win2000!!!!
James, On Wed, Mar 21, 2001 at 10:15:49AM +0800, james wrote: > I had downloaded thecygwin DLL 1.1.8 install it on 'Windows 2000 professional' > platform. > then i download the postgresql 7.03 and I followed the instructions "http:// > people.freebsd.org/~kevlo/postgres/portNT.html". > > I could successfully run the 'configure' command. > The next step 'make' is unsuccessful. 'make' terminates > giving the following error message: > > In file included from dllinit.c:46: > /usr/include/cygwin/cygwin_dll.h:14: windows.h: No such file or directory > make[2]: *** [dllinit.o] Error 1 > make[2]: Leaving directory `/usr/src/postgresql-7.0.3/src/utils' > make[1]: *** [../utils/dllinit.o] Error 2 > make[1]: Leaving directory `/usr/src/postgresql-7.0.3/src/backend' > make: *** [all] Error 2 I presume from the above that your version of Cygwin gcc is 2.95.2-7 or later. You can execute "gcc --version" to verify. Anyway, there has been a change to Cygwin gcc that stops it from automatically looking in /usr/include/w32api. This is why you are getting the "windows.h: No such file or directory" error above. You can try reconfiguring (after removing config.cache), using the following: $ CC='gcc -mwin32' configure I believe that this should work but you may get other problems due to the "-mwin32" option. Alternatively, I strongly recommend using PostgreSQL 7.1beta6 since it builds OOTB under Cygwin (and for other reasons too). Additionally, you should replace the Cygwin 1.1.8-2 DLL (i.e., cygwin1.dll) with one from a recent snapshot to avoid the following problem: http://www.postgresql.org/mhonarc/pgsql-ports/2001-02/msg00012.html In the future, please post to the list instead of using direct email so others can benefit too. Thanks, Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
i try to do as you recommend but still doesn't work. new error message; : : ../../../src/include/libpq/pqcomm.h:45: field `un' has incomplete type In file included from async.c:89: ../../../src/include/miscadmin.h:204: conflicting types for `GetUserNameA' /usr/include/w32api/winbase.h:1260: previous declaration of `GetUserNameA' make[3]: *** [async.o] Error 1 make[3]: Leaving directory `/usr/src/postgresql-7.1beta6/src/backend/commands' make[2]: *** [commands-recursive] Error 2 make[2]: Leaving directory `/usr/src/postgresql-7.1beta6/src/backend' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/postgresql-7.1beta6/src' make: *** [all] Error 2 <I presume from the above that your version of Cygwin gcc is 2.95.2-7 or <later. You can execute "gcc --version" to verify. yes my gcc version is gcc-2.95.2-9 <Anyway, there has <been a change to Cygwin gcc that stops it from automatically looking in </usr/include/w32api. This is why you are getting the "windows.h: No <such file or directory" error above. < <You can try reconfiguring (after removing config.cache), using the <following: < < $ CC='gcc -mwin32' configure <I believe that this should work but you may get other problems due to the <"-mwin32" option. <Alternatively, I strongly recommend using PostgreSQL 7.1beta6 since it <builds OOTB under Cygwin (and for other reasons too). <Additionally, you should replace the Cygwin 1.1.8-2 DLL (i.e., <cygwin1.dll) with one from a recent snapshot to avoid the following <problem: < http://www.postgresql.org/mhonarc/pgsql-ports/2001-02/msg00012.html thanks james
James, On Thu, Mar 22, 2001 at 06:20:18PM +0800, james wrote: > i try to do as you recommend but still doesn't work. > new error message: > > ../../../src/include/libpq/pqcomm.h:45: field `un' has incomplete type > In file included from async.c:89: > ../../../src/include/miscadmin.h:204: conflicting types for `GetUserNameA' > /usr/include/w32api/winbase.h:1260: previous declaration of `GetUserNameA' > make[3]: *** [async.o] Error 1 > make[3]: Leaving directory > `/usr/src/postgresql-7.1beta6/src/backend/commands' > make[2]: *** [commands-recursive] Error 2 > make[2]: Leaving directory `/usr/src/postgresql-7.1beta6/src/backend' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/usr/src/postgresql-7.1beta6/src' > make: *** [all] Error 2 I just successfully built PostgreSQL 7.1beta6 using Cygwin gcc 2.95.2-9. I used the following: $ configure --with-CXX $ make The above build passed all regression tests. Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
James, On Thu, Mar 22, 2001 at 09:14:40PM +0800, james wrote: > jason: > sorry i don't know how to post to list, so i mail u again. > i try again as u recommend, every thing is ok, but a postmaster problem > > $ D:\cygwin\usr\local\pgsql\bin\postgres.exe: *** > recreate_mmaps_after_fork_failed > postmaster: Startup proc 764 exited with status 256 - abort > IpcMemoryDetach: shmdt(0x1c500000) failed: Invalid argument > > i find > thishttp://www.postgresql.org/mhonarc/pgsql-ports/2001-02/msg00014.html > but i don't know how to fix it, could u please tell me the detail!!!! You need to replace your cygwin1.dll with one from a recent snapshot: $ wget -nd ftp://ftp.freesoftware.com/.0/sourceware/cygwin/snapshots/cygwin1-20010319.dll.bz2 $ bunzip2 cygwin1-20010319.dll.bz2 $ # shutdown all Cygwin processes $ # using cmd or Windows Explorer rename cygwin1-20010319.dll to cygwin1.dll $ # using cmd or Windows Explorer move (new) cygwin1.dll to Cygwin's bin Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
James, On Fri, Mar 23, 2001 at 11:17:44AM +0800, james wrote: > thanks for your helping! sorry to bother you again. > > i remove all cygwin and postgresql and reinstall again; > 1. install cygwin 1.1.8 > 2. $tar zxvf cygipc-1.09-2.tar.gz (at "/") > 3. $cd /usr/src > 3. $tar zxvf postgresql-7.1beta6.tar.gz > 4. $cd postgresql-7.1beta6 > 5. $./configure --with-CXX > 6. $make > 7. $make install > 8. $cp /usr/local/pgsql/lib/pq.dll /usr/local/pgsql/bin > 9. $ wget -nd > ftp://ftp.freesoftware.com/.0/sourceware/cygwin/snapshots/cygwin1-20010319.d > ll.bz2 > $ bunzip2 cygwin1-20010319.dll.bz2 > $ # shutdown all Cygwin processes > $ # using cmd or Windows Explorer rename cygwin1-20010319.dll to > cygwin1.dll > $ # using cmd or Windows Explorer move (new) cygwin1.dll to Cygwin's bin > 10. editor to create .bashrc in / directory as belows: > PATH=$PATH:/usr/local/pgsql/bin:/usr/local/bin > PGDATA=/usr/local/pgsql/data > PGLIB=/usr/local/pgsql/lib > LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/local/lib > export LD_LIBRARY_PATH PATH PGDATA PGLIB > 11. $source /.bashrc, > 12. $initdb then show the message and hang.... > 13. i try to remove /usr/local/pgsql/data then initdb i got the same resoult > > administrator@JAMES /usr/src > $ initdb > This database system will be initialized with username "administrator". > This user will own all the data files and must also own the server process. > Creating directory /usr/local/pgsql/data > Creating directory /usr/local/pgsql/data/base > Creating directory /usr/local/pgsql/data/global > Creating directory /usr/local/pgsql/data/pg_xlog > Creating template1 database in /usr/local/pgsql/data/base/1 The only suggestion that I can offer is to try the initdb when not logged on as administrator. Otherwise, may be someone on the list has a better suggestion. Sorry, Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
James, Did you start up the ipc-daemon process provided by cygipc? That process must be running at all times when you're running postgres/postmaster or any utility such as 'initdb' that implicitly runs those programs. > On Fri, Mar 23, 2001 at 11:17:44AM +0800, james wrote: > > 12. $initdb then show the message and hang.... -- 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