Thread: Re: [COMMITTERS] pgsql-server/src Makefile.global.in makefiles/ ...

Re: [COMMITTERS] pgsql-server/src Makefile.global.in makefiles/ ...

From
Bruce Momjian
Date:
OK, Peter, here is Billie's patch.

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

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > OK, how do we proceed?
>
> To be honest, I haven't even seen the patch yet, only a description.  I
> can't find the actual patch in my local mailboxes or in the archives on
> the web.  The idea sounds right and it should be expanded to all
> platforms, but it needs to be considered carefully.  Rpaths are awfully
> messy.
>
> > If we back it out, how does Billy get this working for his system?
>
> The same way everybody else does.
>
> --
> Peter Eisentraut   peter_e@gmx.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql-server/src/Makefile.global.in,v
retrieving revision 1.155
retrieving revision 1.156
diff -c -c -r1.155 -r1.156
*** src/Makefile.global.in    4 Sep 2002 22:54:18 -0000    1.155
--- src/Makefile.global.in    10 Nov 2002 00:37:28 -0000    1.156
***************
*** 189,194 ****
--- 189,197 ----
  LD = @LD@
  with_gnu_ld = @with_gnu_ld@
  ld_R_works = @ld_R_works@
+ # Set trpath to a list of library paths included in LDFLAGS
+ # These paths can be added to rpath in the port specific makefiles if needed.
+ trpath = $(filter -L%,@LDFLAGS@)
  LDFLAGS = @LDFLAGS@
  LDREL = -r
  LDOUT = -o
Index: src/makefiles/Makefile.unixware
===================================================================
RCS file: /cvsroot/pgsql-server/src/makefiles/Makefile.unixware,v
retrieving revision 1.14
retrieving revision 1.15
diff -c -c -r1.14 -r1.15
*** src/makefiles/Makefile.unixware    4 Sep 2002 22:54:18 -0000    1.14
--- src/makefiles/Makefile.unixware    10 Nov 2002 00:37:28 -0000    1.15
***************
*** 7,15 ****

  ifeq ($(ld_R_works), yes)
  ifeq ($(with_gnu_ld), yes)
!     rpath = -Wl,-rpath,$(libdir)
  else
!     rpath = -Wl,-R$(libdir)
  endif
  endif
  shlib_symbolic = -Wl,-Bsymbolic
--- 7,29 ----

  ifeq ($(ld_R_works), yes)
  ifeq ($(with_gnu_ld), yes)
!     # Convert the list of library search paths into -rpath options
!     # (i.e. "-LpathA -LpathB" -> ",-rpath,pathA,-rpath,pathB"), adding
!     # the contents of LD_LIBRARY_PATH if it exists.
!     tpath1=$(shell echo $(trpath) | sed -e 's/ *-L/,-rpath,/g')
! ifdef LD_LIBRARY_PATH
!     tpath2 = ,-rpath,tpath+=$(shell echo $(LD_LIBRARY_PATH) | sed -e 's/:/,-rpath,/g')
! endif
!     rpath = -Wl,-rpath,$(libdir)$(tpath)$(tpath2)
  else
!     # Convert the list of library search paths into a -R option path
!     # (i.e. "-LpathA -LpathB" -> ":pathA:pathB"), adding the contents of
!     # LD_LIBRARY_PATH if it exists.
!     tpath1 = $(shell echo $(trpath) | sed -e 's/ *-L/:/g')
! ifdef LD_LIBRARY_PATH
!     tpath2 = :$(LD_LIBRARY_PATH)
! endif
!     rpath = -Wl,-R$(libdir)$(tpath1)$(tpath2)
  endif
  endif
  shlib_symbolic = -Wl,-Bsymbolic

Re: [COMMITTERS] pgsql-server/src Makefile.global.in makefiles/ ...

From
Peter Eisentraut
Date:
This patch needs to be reverted.  It causes the compilation environment
seen by the makefiles to be different from what is dealt with in
configure, which creates a recipe for desaster.  If additional "rpaths"
are to be added to the linker flags, it needs to be done in configure
before any tests that invoke the linker.

As a side note, I would even question that the patch as it stands is
generally useful: Consider the case that one has libraries in the
non-standard directories that are now covered by the additional rpath
flags.  How could configure even produce reliable results if it doesn't
have access to those presumably relevant libraries?

Bruce Momjian writes:

>
> OK, Peter, here is Billie's patch.
>
> ---------------------------------------------------------------------------
>
> Peter Eisentraut wrote:
> > Bruce Momjian writes:
> >
> > > OK, how do we proceed?
> >
> > To be honest, I haven't even seen the patch yet, only a description.  I
> > can't find the actual patch in my local mailboxes or in the archives on
> > the web.  The idea sounds right and it should be expanded to all
> > platforms, but it needs to be considered carefully.  Rpaths are awfully
> > messy.
> >
> > > If we back it out, how does Billy get this working for his system?
> >
> > The same way everybody else does.
> >
> > --
> > Peter Eisentraut   peter_e@gmx.net
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
>
>

--
Peter Eisentraut   peter_e@gmx.net



Re: [COMMITTERS] pgsql-server/src Makefile.global.in makefiles/

From
Bruce Momjian
Date:
OK, feel free to revert it.  It seems what Billie needs to do is a
reasonable thing, and I think you wanted to make it more generic rather
than port specific --- go ahead.

Billie, we will try to keep you on this as a CC so you can see how it
will be merged into the configure process.

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

Peter Eisentraut wrote:
> This patch needs to be reverted.  It causes the compilation environment
> seen by the makefiles to be different from what is dealt with in
> configure, which creates a recipe for desaster.  If additional "rpaths"
> are to be added to the linker flags, it needs to be done in configure
> before any tests that invoke the linker.
>
> As a side note, I would even question that the patch as it stands is
> generally useful: Consider the case that one has libraries in the
> non-standard directories that are now covered by the additional rpath
> flags.  How could configure even produce reliable results if it doesn't
> have access to those presumably relevant libraries?
>
> Bruce Momjian writes:
>
> >
> > OK, Peter, here is Billie's patch.
> >
> > ---------------------------------------------------------------------------
> >
> > Peter Eisentraut wrote:
> > > Bruce Momjian writes:
> > >
> > > > OK, how do we proceed?
> > >
> > > To be honest, I haven't even seen the patch yet, only a description.  I
> > > can't find the actual patch in my local mailboxes or in the archives on
> > > the web.  The idea sounds right and it should be expanded to all
> > > platforms, but it needs to be considered carefully.  Rpaths are awfully
> > > messy.
> > >
> > > > If we back it out, how does Billy get this working for his system?
> > >
> > > The same way everybody else does.
> > >
> > > --
> > > Peter Eisentraut   peter_e@gmx.net
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with the unregister command
> > >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > >
> >
> >
>
> --
> Peter Eisentraut   peter_e@gmx.net
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

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