public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Make-Problem Postgres on Cygwin
       [not found] <IEEEIIEOMKMOKHPPJGJICEDOFDAA.tarabas@tarabas.de>
@ 2002-11-22  7:51 ` Jason Tishler
       [not found]   ` <IEEEIIEOMKMOKHPPJGJICEEIFDAA.tarabas@tarabas.de>
  2002-11-26  3:43   ` Godson Retna
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Tishler @ 2002-11-22  7:51 UTC (permalink / raw)
  To: Tarabas; +Cc: Cygwin, Pgsql-Cygwin

[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]

Manuel,

Please post instead of sending private email.  However, your timing is
impeccable.  I just got around (yesterday) to building PostgreSQL under
the latest Cygwin gcc2 and gcc packages.

On Fri, Nov 22, 2002 at 01:23:48PM +0100, Tarabas wrote:
> I read your thread abut problems installing Postgresql on Cygwin as
> source-distribution. I got exactly the same problems with that!
> 
> Before you ask:
> I HAVE TO use the source-build because I need to patch the maximum arguments
> for a function on postgresql for my application, so installing binary is not
> an option!
> 
> I first got the Problem that the IPC-lib was not found in the configure
> which was solved by configuring with
> 
> $ LDFLAGS=-L/usr/local/lib ./configure
> instead of the simple "./configure" ...
> 
> Also the IPC-Daemon is installed an running! (ps -aef|grep ipc show's it!)
> 
> Now i get an error when calling the make:
> 
> <-snip->
> make[4]: Entering directory '/postgresql-7.2.3/src/backend/storage/ipc'
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include -I/usr/local/include -DBUILDING_DLL=1 -c -o -ipc.o ipc.c
> cc1: warning: changing search order for system directory "/usr/local/include"
> cc1: warning: as it has already been specified as a non-system-directory

The "-I/usr/local/include" is causing configure to get confused and
mis-configure PostgreSQL which causes the following (and other)
problems:

> ipc.c: In function 'InternalIpcSemaphoreCreate':
> ipc.c:271: warning: implicit declaration of function `semget'
> ipc.c:271: `IPC_CREAT' undeclared (first use in this function)
> ipc.c:271: (Each undeclared identifier is reported only once
> ipc.c:271: for each function it appears in.)
> <-snip->
> 
> any ideas how to fix that ?!

Yes.

To build PostgreSQL 7.2.3 under gcc2, use the following procedure:

    1. apply attached postgresql-7.2.3-gcc2.patch
       $ patch -p1 <postgresql-7.2.3-gcc2.patch

    2. define CC and LDFLAGS as appropriate on configure command line:
       $ CC=gcc-2 LDFLAGS=-L/usr/local/lib configure ...

To build PostgreSQL 7.2.3 under gcc (i.e gcc 3.2), use the following
procedure:

    1. apply attached postgresql-7.2.3-gcc3.patch
       $ patch -p1 <postgresql-7.2.3-gcc3.patch

    2. define LDFLAGS as appropriate on configure command line:
       $ LDFLAGS=-L/usr/local/lib configure ...

Note:

    1. PostgreSQL CVS (i.e., 7.3) builds OOTB under Cygwin CVS (i.e.,
       1.3.16) and Perl 5.8.0.
    2. PostgreSQL 7.2.3's plperl fails to build (against Perl 5.6.1)
       with either the latest gcc2 or gcc.  I do not intend to track
       this issue down.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

[-- Attachment #2: postgresql-7.2.3-gcc2.patch --]
[-- Type: text/plain, Size: 511 bytes --]

diff -rup postgresql-7.2.3.orig/src/makefiles/Makefile.win postgresql-7.2.3-gcc2/src/makefiles/Makefile.win
--- postgresql-7.2.3.orig/src/makefiles/Makefile.win	2001-09-05 22:58:33.000000000 -0400
+++ postgresql-7.2.3-gcc2/src/makefiles/Makefile.win	2002-11-21 12:43:07.000000000 -0500
@@ -2,7 +2,7 @@
 LDFLAGS+= -g
 DLLTOOL= dlltool
 DLLWRAP= dllwrap
-DLLLIBS= -lcygipc -lcrypt
+DLLLIBS= -L/usr/local/lib -lcygipc -lcrypt
 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
 MK_NO_LORDER=true
 MAKE_DLL=true

[-- Attachment #3: postgresql-7.2.3-gcc3.patch --]
[-- Type: text/plain, Size: 855 bytes --]

diff -rup postgresql-7.2.3.orig/src/makefiles/Makefile.win postgresql-7.2.3-gcc3/src/makefiles/Makefile.win
--- postgresql-7.2.3.orig/src/makefiles/Makefile.win	2001-09-05 22:58:33.000000000 -0400
+++ postgresql-7.2.3-gcc3/src/makefiles/Makefile.win	2002-11-21 10:52:41.000000000 -0500
@@ -2,7 +2,7 @@
 LDFLAGS+= -g
 DLLTOOL= dlltool
 DLLWRAP= dllwrap
-DLLLIBS= -lcygipc -lcrypt
+DLLLIBS= -L/usr/local/lib -lcygipc -lcrypt
 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
 MK_NO_LORDER=true
 MAKE_DLL=true
diff -rup postgresql-7.2.3.orig/src/template/win postgresql-7.2.3-gcc3/src/template/win
--- postgresql-7.2.3.orig/src/template/win	2000-10-21 18:36:14.000000000 -0400
+++ postgresql-7.2.3-gcc3/src/template/win	2002-11-21 10:31:22.000000000 -0500
@@ -1,4 +1,3 @@
 CFLAGS=-O2
-SRCH_INC=/usr/local/include
 SRCH_LIB=/usr/local/lib
 LIBS=-lcygipc


[-- Attachment #4: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Make-Problem Postgres on Cygwin
       [not found]   ` <IEEEIIEOMKMOKHPPJGJICEEIFDAA.tarabas@tarabas.de>
@ 2002-11-23  9:44     ` Jason Tishler
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Tishler @ 2002-11-23  9:44 UTC (permalink / raw)
  To: Tarabas; +Cc: Cygwin, Pgsql-Cygwin

Manuel,

Sigh...

Repeat after me:

    Post instead of sending private email.

    Keep replies on-list.

    Post instead of sending private email.

    Keep replies on-list.

    ...

On Fri, Nov 22, 2002 at 06:48:39PM +0100, Tarabas wrote:
> Thanks a lot for your help! The "make" and "make install" worked fine
> after the patch BUT I sadly have to bother you again.
> 
> After I did the ./initdb /usr/local/pgsql/data
> and the ./postmaster -D /usr/local/pgsql/data -i &
> 
> and then tried to do ANYTHING on the DB (either connecting via pgAdmin
> oder createdb or createuser), I get the Message:
> 
> "FATAL 1: IndexSupportInitialize: bogus pg_index tuple"
> 
> Any suggestions ?!

No.  I just ran a gcc3 postmaster (i.e., postgres.exe) against a
previously initialized database without any problems.  From posts to
pgsql-cygwin@, I'm under the impression that others have successfully
built, initialized (i.e., ran initdb), and ran postmaster with my
supplied patches.

> I used the gcc3-patch to compile postgres. Initdb ran fine without any
> errors and the postmaster started fine too. Could this still be
> related to that patch ?!

I don't think so.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Make-Problem Postgres on Cygwin
  2002-11-22  7:51 ` Make-Problem Postgres on Cygwin Jason Tishler
       [not found]   ` <IEEEIIEOMKMOKHPPJGJICEEIFDAA.tarabas@tarabas.de>
@ 2002-11-26  3:43   ` Godson Retna
  2002-11-27  5:27     ` Jason Tishler
  1 sibling, 1 reply; 5+ messages in thread
From: Godson Retna @ 2002-11-26  3:43 UTC (permalink / raw)
  To: Jason Tishler; +Cc: Cygwin, Pgsql-Cygwin

Hi

The problem persists and I get the following error using make...even after
applying the patch.

Help me see where I am missing it.

Awaiting your input.

Thanks.

Godson R.

==============[begin
quote]===========================================================
make[3]: `SUBSYS.o' is up to date.
make[3]: Leaving directory
`/cygdrive/e/postgresql-7.2.1/src/backend/storage/fre
espace'
make -C ipc SUBSYS.o
make[3]: Entering directory
`/cygdrive/e/postgresql-7.2.1/src/backend/storage/ip
c'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/
incl
ude -I/usr/local/include -DBUILDING_DLL=1  -c -o ipc.o ipc.c
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning:   as it has already been specified as a non-system directory
ipc.c: In function `InternalIpcSemaphoreCreate':
ipc.c:271: warning: implicit declaration of function `semget'
ipc.c:271: `IPC_CREAT' undeclared (first use in this function)
ipc.c:271: (Each undeclared identifier is reported only once
ipc.c:271: for each function it appears in.)
ipc.c:271: `IPC_EXCL' undeclared (first use in this function)
ipc.c:318: warning: implicit declaration of function `semctl'
ipc.c:318: `SETALL' undeclared (first use in this function)
ipc.c: In function `IpcSemaphoreKill':
ipc.c:351: `IPC_RMID' undeclared (first use in this function)
ipc.c: In function `IpcSemaphoreLock':
ipc.c:378: storage size of `sops' isn't known
ipc.c:422: warning: implicit declaration of function `semop'
ipc.c:378: warning: unused variable `sops'
ipc.c: In function `IpcSemaphoreUnlock':
ipc.c:441: storage size of `sops' isn't known
ipc.c:441: warning: unused variable `sops'
ipc.c: In function `IpcSemaphoreTryLock':
ipc.c:475: storage size of `sops' isn't known
ipc.c:478: `IPC_NOWAIT' undeclared (first use in this function)
ipc.c:475: warning: unused variable `sops'
ipc.c: In function `IpcSemaphoreGetValue':
ipc.c:519: `GETVAL' undeclared (first use in this function)
ipc.c: In function `IpcSemaphoreGetLastPID':
ipc.c:530: `GETPID' undeclared (first use in this function)
ipc.c: In function `InternalIpcMemoryCreate':
ipc.c:561: warning: implicit declaration of function `shmget'
ipc.c:561: `IPC_CREAT' undeclared (first use in this function)
ipc.c:561: `IPC_EXCL' undeclared (first use in this function)
ipc.c:638: warning: implicit declaration of function `shmat'
ipc.c:638: warning: assignment makes pointer from integer without a cast
ipc.c: In function `IpcMemoryDetach':
ipc.c:664: warning: implicit declaration of function `shmdt'
ipc.c: In function `IpcMemoryDelete':
ipc.c:681: warning: implicit declaration of function `shmctl'
ipc.c:681: `IPC_RMID' undeclared (first use in this function)
ipc.c: In function `SharedMemoryIsInUse':
ipc.c:697: storage size of `shmStat' isn't known
ipc.c:707: `IPC_STAT' undeclared (first use in this function)
ipc.c:697: warning: unused variable `shmStat'
ipc.c: In function `IpcMemoryCreate':
ipc.c:818: warning: assignment makes pointer from integer without a cast
ipc.c:850: `IPC_RMID' undeclared (first use in this function)
ipc.c: In function `IpcSemaphoreCreate':
ipc.c:940: `IPC_RMID' undeclared (first use in this function)
ipc.c:966: `SETVAL' undeclared (first use in this function)
make[3]: *** [ipc.o] Error 1
make[3]: Leaving directory
`/cygdrive/e/postgresql-7.2.1/src/backend/storage/ipc
'
make[2]: *** [ipc-recursive] Error 2
make[2]: Leaving directory
`/cygdrive/e/postgresql-7.2.1/src/backend/storage'
make[1]: *** [storage-recursive] Error 2
make[1]: Leaving directory `/cygdrive/e/postgresql-7.2.1/src/backend'
make: *** [all] Error 2

Administrator@WEBLOGIC /cygdrive/e/postgresql-7.2.1/src
$
================[end
quote]==================================================================


-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
Of Jason Tishler
Sent: Friday, November 22, 2002 7:51 PM
To: Tarabas
Cc: Cygwin; Pgsql-Cygwin
Subject: Re: Make-Problem Postgres on Cygwin


Manuel,

Please post instead of sending private email.  However, your timing is
impeccable.  I just got around (yesterday) to building PostgreSQL under
the latest Cygwin gcc2 and gcc packages.

On Fri, Nov 22, 2002 at 01:23:48PM +0100, Tarabas wrote:
> I read your thread abut problems installing Postgresql on Cygwin as
> source-distribution. I got exactly the same problems with that!
>
> Before you ask:
> I HAVE TO use the source-build because I need to patch the maximum
arguments
> for a function on postgresql for my application, so installing binary is
not
> an option!
>
> I first got the Problem that the IPC-lib was not found in the configure
> which was solved by configuring with
>
> $ LDFLAGS=-L/usr/local/lib ./configure
> instead of the simple "./configure" ...
>
> Also the IPC-Daemon is installed an running! (ps -aef|grep ipc show's it!)
>
> Now i get an error when calling the make:
>
> <-snip->
> make[4]: Entering directory '/postgresql-7.2.3/src/backend/storage/ipc'
>
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/
include -I/usr/local/include -DBUILDING_DLL=1 -c -o -ipc.o ipc.c
> cc1: warning: changing search order for system directory
"/usr/local/include"
> cc1: warning: as it has already been specified as a non-system-directory

The "-I/usr/local/include" is causing configure to get confused and
mis-configure PostgreSQL which causes the following (and other)
problems:

> ipc.c: In function 'InternalIpcSemaphoreCreate':
> ipc.c:271: warning: implicit declaration of function `semget'
> ipc.c:271: `IPC_CREAT' undeclared (first use in this function)
> ipc.c:271: (Each undeclared identifier is reported only once
> ipc.c:271: for each function it appears in.)
> <-snip->
>
> any ideas how to fix that ?!

Yes.

To build PostgreSQL 7.2.3 under gcc2, use the following procedure:

    1. apply attached postgresql-7.2.3-gcc2.patch
       $ patch -p1 <postgresql-7.2.3-gcc2.patch

    2. define CC and LDFLAGS as appropriate on configure command line:
       $ CC=gcc-2 LDFLAGS=-L/usr/local/lib configure ...

To build PostgreSQL 7.2.3 under gcc (i.e gcc 3.2), use the following
procedure:

    1. apply attached postgresql-7.2.3-gcc3.patch
       $ patch -p1 <postgresql-7.2.3-gcc3.patch

    2. define LDFLAGS as appropriate on configure command line:
       $ LDFLAGS=-L/usr/local/lib configure ...

Note:

    1. PostgreSQL CVS (i.e., 7.3) builds OOTB under Cygwin CVS (i.e.,
       1.3.16) and Perl 5.8.0.
    2. PostgreSQL 7.2.3's plperl fails to build (against Perl 5.6.1)
       with either the latest gcc2 or gcc.  I do not intend to track
       this issue down.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Make-Problem Postgres on Cygwin
  2002-11-26  3:43   ` Godson Retna
@ 2002-11-27  5:27     ` Jason Tishler
  2002-11-27 20:56       ` Godson Retna
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Tishler @ 2002-11-27  5:27 UTC (permalink / raw)
  To: Godson Retna; +Cc: Cygwin, Pgsql-Cygwin

Godson,

On Tue, Nov 26, 2002 at 02:10:45PM +0530, Godson Retna wrote:
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include -I/usr/local/include -DBUILDING_DLL=1  -c -o ipc.o ipc.c
> cc1: warning: changing search order for system directory "/usr/local/include"
> cc1: warning:   as it has already been specified as a non-system directory

The above implies that you either did not successfully apply my patch or
you forgot to reconfigure after doing so.  My WAG is the latter.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Make-Problem Postgres on Cygwin
  2002-11-27  5:27     ` Jason Tishler
@ 2002-11-27 20:56       ` Godson Retna
  0 siblings, 0 replies; 5+ messages in thread
From: Godson Retna @ 2002-11-27 20:56 UTC (permalink / raw)
  To: Jason Tishler; +Cc: Cygwin, Pgsql-Cygwin

Jason

Thanks for all your valuable input.  The installation has been completed
successfully.  I downloaded PostgreSQL 7.2.3. and followed your posts on
this line.

Best Regards.

Godson R.

-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: Wednesday, November 27, 2002 6:26 PM
To: Godson Retna
Cc: Cygwin; Pgsql-Cygwin
Subject: Re: Make-Problem Postgres on Cygwin


Godson,

On Tue, Nov 26, 2002 at 02:10:45PM +0530, Godson Retna wrote:
>
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/
include -I/usr/local/include -DBUILDING_DLL=1  -c -o ipc.o ipc.c
> cc1: warning: changing search order for system directory
"/usr/local/include"
> cc1: warning:   as it has already been specified as a non-system directory

The above implies that you either did not successfully apply my patch or
you forgot to reconfigure after doing so.  My WAG is the latter.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-28  3:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <IEEEIIEOMKMOKHPPJGJICEDOFDAA.tarabas@tarabas.de>
2002-11-22  7:51 ` Make-Problem Postgres on Cygwin Jason Tishler
     [not found]   ` <IEEEIIEOMKMOKHPPJGJICEEIFDAA.tarabas@tarabas.de>
2002-11-23  9:44     ` Jason Tishler
2002-11-26  3:43   ` Godson Retna
2002-11-27  5:27     ` Jason Tishler
2002-11-27 20:56       ` Godson Retna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).