Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 26 Sep 2000 12:01:57 -0400 From: Jason Tishler To: Cygwin Cc: pgsql-ports AT postgresql DOT org Subject: Re: Problem Building Cygwin PostgreSQL Message-ID: <20000926120157.B1021@KOSH> References: <20000921115538 DOT C19528 AT DP> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000921115538.C19528@DP>; from Jason.Tishler@dothill.com on Thu, Sep 21, 2000 at 11:55:38AM -0400 Organization: Dot Hill Systems Corp. On Thu, Sep 21, 2000 at 11:55:38AM -0400, Jason Tishler wrote: > I am attempting to build PostgreSQL 7.0.2 on a stock Cygwin 1.1.4 > distribution. When building plpgsql.dll, I get the following error: > > dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def \ > pl_parse.o pl_han dler.o pl_comp.o pl_exec.o pl_funcs.o \ > ../../../utils/dllinit.o -L/usr/local/lib -L/usr/local/lib \ > -L../../../backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32 > pl_exec.o(.text+0x1e56):pl_exec.c: undefined reference to `fmgr_pl_finfo' > pl_exec.o(.text+0x32a1):pl_exec.c: undefined reference to `fmgr_pl_finfo' > pl_exec.o(.text+0x32bd):pl_exec.c: undefined reference to `fmgr_pl_finfo' > collect2: ld returned 1 exit status After much head banging and web surfing, I finally fixed the plpgsql.dll build problem. I was pointed in the right direction by Joost Kraaijeveld. The solution was to change Gen_fmgrtab.sh.in, which generates fmgr.h, as follows: diff Gen_fmgrtab.sh.in.orig Gen_fmgrtab.sh.in 139c139,144 < extern FmgrInfo *fmgr_pl_finfo; --- > #ifdef BUILDING_DLL > #define DLL_INTERFACE __declspec(dllexport) > #else > #define DLL_INTERFACE __declspec(dllimport) > #endif > extern DLL_INTERFACE FmgrInfo *fmgr_pl_finfo; fmgr_pl_finfo is data and not a function, so I guess that it needs to be explicitly imported/exported via __declspec(dllimport)/__declspec(dllexport), respectively. Does anyone know whether or not older Cygwin versions of binutils automatically exported data items? Thanks, Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corporation Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason DOT Tishler AT dothill DOT com Hazlet, NJ 07730 USA WWW: http://www.dothill.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com