Skip site navigation (1) Skip section navigation (2)

Re: Revert addition of -lpgport, which breaks the build

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>,pgsql-committers(at)postgresql(dot)org
Subject: Re: Revert addition of -lpgport, which breaks the build
Date: 2004-05-21 03:11:07
Message-ID: 200405210311.i4L3B7V07723@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-committers
I modified to code so only Win32 will do it.

---------------------------------------------------------------------------

Neil Conway wrote:
> Tom Lane wrote:
> > Revert addition of -lpgport, which breaks the build on platforms that
> > are sticky about non-PIC code in shared libraries.  Windows will have
> > to find another solution (probably similar to the way libpq does it).
> 
> I need to apply the attached patch to get ecpg to link successfully on 
> my machine (OSX 10.3). Is this a known issue?
> 
> -Neil

> Index: src/interfaces/ecpg/ecpglib/Makefile
> ===================================================================
> RCS file: /Users/neilc/local/cvs/pgsql-server/src/interfaces/ecpg/ecpglib/Makefile,v
> retrieving revision 1.19
> diff -c -r1.19 Makefile
> *** src/interfaces/ecpg/ecpglib/Makefile	21 May 2004 00:14:38 -0000	1.19
> --- src/interfaces/ecpg/ecpglib/Makefile	21 May 2004 00:47:23 -0000
> ***************
> *** 23,29 ****
>   OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
>   	connect.o misc.o
>   
> ! SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
>   	$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
>   
>   all: all-lib
> --- 23,29 ----
>   OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
>   	connect.o misc.o
>   
> ! SHLIB_LINK = -L../pgtypeslib -lpgtypes -lpgport $(libpq) \
>   	$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
>   
>   all: all-lib
> Index: src/interfaces/ecpg/compatlib/Makefile
> ===================================================================
> RCS file: /Users/neilc/local/cvs/pgsql-server/src/interfaces/ecpg/compatlib/Makefile,v
> retrieving revision 1.17
> diff -c -r1.17 Makefile
> *** src/interfaces/ecpg/compatlib/Makefile	30 Apr 2004 04:14:05 -0000	1.17
> --- src/interfaces/ecpg/compatlib/Makefile	21 May 2004 00:48:08 -0000
> ***************
> *** 19,25 ****
>   override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) \
>   	-I$(top_srcdir)/src/include/utils $(CPPFLAGS)
>   override CFLAGS += $(PTHREAD_CFLAGS)
> ! SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
>   	$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
>   
>   OBJS= informix.o
> --- 19,25 ----
>   override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) \
>   	-I$(top_srcdir)/src/include/utils $(CPPFLAGS)
>   override CFLAGS += $(PTHREAD_CFLAGS)
> ! SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes -lpgport $(libpq) \
>   	$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
>   
>   OBJS= informix.o

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-05-21 03:12:13
Subject: Add mention of why -lpgport is needed in ecpglib (dllwrap).
Previous:From: Bruce MomjianDate: 2004-05-21 03:10:58
Subject: Add -lpgport to ecpglib link only on win32.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group