delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/22/09:15:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 22 Nov 2002 09:20:31 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: Re: Make-Problem Postgres on Cygwin
In-reply-to: <IEEEIIEOMKMOKHPPJGJICEDOFDAA.tarabas@tarabas.de>
To: Tarabas <tarabas AT tarabas DOT de>
Cc: Cygwin <cygwin AT cygwin DOT com>, Pgsql-Cygwin <pgsql-cygwin AT postgresql DOT org>
Mail-followup-to: Tarabas <tarabas AT tarabas DOT de>, Cygwin <cygwin AT cygwin DOT com>,
Pgsql-Cygwin <pgsql-cygwin AT postgresql DOT org>
Message-id: <20021122142031.GB1584@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.4i
References: <IEEEIIEOMKMOKHPPJGJICEDOFDAA DOT tarabas AT tarabas DOT de>

--Boundary_(ID_jyRzHTRx3cxu6ShuxECNQA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

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

--Boundary_(ID_jyRzHTRx3cxu6ShuxECNQA)
Content-type: text/plain; charset=us-ascii; NAME=postgresql-7.2.3-gcc2.patch
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=postgresql-7.2.3-gcc2.patch

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

--Boundary_(ID_jyRzHTRx3cxu6ShuxECNQA)
Content-type: text/plain; charset=us-ascii; NAME=postgresql-7.2.3-gcc3.patch
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=postgresql-7.2.3-gcc3.patch

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


--Boundary_(ID_jyRzHTRx3cxu6ShuxECNQA)
Content-Type: text/plain; charset=us-ascii

--
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/
--Boundary_(ID_jyRzHTRx3cxu6ShuxECNQA)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019