Re: BUG #2092: No answer to bug reports 1975 and 2055

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dirk Pirschel <dirk(at)pirschel(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2092: No answer to bug reports 1975 and 2055
Date: 2005-12-03 20:02:43
Message-ID: 2152.1133640163@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> What exactly is in /client/lib ... could it be that there is an existing
> SSL-dependent installation of libpq in there? In theory the link should
> find the libpq in ../../../../src/interfaces/libpq not the one in
> /client/lib, but we've seen bizarre linker search behavior before ...

Actually, not so bizarre as all that: looking at your command again, the
-L/client/lib is in there twice:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels
-fno-strict-aliasing -L../../../../src/port -L/client/lib -Wl,-bnoentry
-Wl,-H512 -Wl,-bM:SRE -o libecpg.so libecpg.a -Wl,-bE:libecpg.exp
-L../pgtypeslib -L../../../../src/interfaces/libpq -L../../../../src/port
-L/client/lib -lpgtypes -lpq -lm

Assuming there is a libpq in /client/lib, I bet this patch will help.

regards, tom lane

*** src/Makefile.shlib.orig Fri Oct 28 13:32:22 2005
--- src/Makefile.shlib Sat Dec 3 14:58:32 2005
***************
*** 76,81 ****
--- 76,84 ----
# Insert -L from LDFLAGS after any -L already present in SHLIB_LINK
SHLIB_LINK := $(filter -L%, $(SHLIB_LINK)) $(filter -L%, $(LDFLAGS)) $(filter-out -L%, $(SHLIB_LINK))

+ # Need a -L-free version of LDFLAGS to use in combination with SHLIB_LINK
+ LDFLAGS_NO_L := $(filter-out -L%, $(LDFLAGS))
+
# Default shlib naming convention used by the majority of platforms
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
***************
*** 154,160 ****
ifeq ($(PORTNAME), hpux)
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
ifeq ($(with_gnu_ld), yes)
! LINK.shared = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname)
else
# can't use the CC-syntax rpath pattern here
rpath =
--- 157,163 ----
ifeq ($(PORTNAME), hpux)
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
ifeq ($(with_gnu_ld), yes)
! LINK.shared = $(CC) $(LDFLAGS_NO_L) -shared -Wl,-h -Wl,$(soname)
else
# can't use the CC-syntax rpath pattern here
rpath =
***************
*** 309,315 ****
# AIX case
$(shlib): lib$(NAME).a
$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
! $(COMPILER) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)

endif # PORTNAME == aix

--- 312,318 ----
# AIX case
$(shlib): lib$(NAME).a
$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
! $(COMPILER) $(LDFLAGS_NO_L) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)

endif # PORTNAME == aix

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dirk Pirschel 2005-12-03 20:06:28 Re: BUG #2092: No answer to bug reports 1975 and 2055
Previous Message Tom Lane 2005-12-03 19:34:29 Re: BUG #2092: No answer to bug reports 1975 and 2055