BUG #2170: --rpath option is skipping shared libs

Started by Lee Thompsonover 20 years ago5 messagesbugs
Jump to latest
#1Lee Thompson
bm55b@yahoo.com

The following bug has been logged online:

Bug reference: 2170
Logged by: Lee Thompson
Email address: bm55b@yahoo.com
PostgreSQL version: 8.1.2
Operating system: linux
Description: --rpath option is skipping shared libs
Details:

I use the patch that I pasted into bug report web form (so spacing and lines
are probably going to garble some) to get postgres to add rpath hints into
the postgres shared libraries.

After patching and re-running autoconf/configure/make, you can test for
success of this change by running "eu-readelf -d filename.so" and look for
the rpath in the output of the utility.

diff -Nru postgresql-8.1.2.orig/configure.in postgresql-8.1.2/configure.in
--- postgresql-8.1.2.orig/configure.in  2006-01-12 12:48:05.000000000 -0600
+++ postgresql-8.1.2/configure.in       2006-01-12 13:23:25.000000000 -0600
@@ -357,6 +357,9 @@
 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
 for dir in $LIBRARY_DIRS $SRCH_LIB; do
   if test -d "$dir"; then
+    if test "$enable_rpath" = yes ; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi
     LIBDIRS="$LIBDIRS -L$dir"
   else
     AC_MSG_WARN([*** Library directory $dir does not exist.])
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lee Thompson (#1)
Re: BUG #2170: --rpath option is skipping shared libs

"Lee Thompson" <bm55b@yahoo.com> writes:

+    if test "$enable_rpath" = yes ; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi

What is this supposed to accomplish? (Other than probably breaking
every non-gcc toolchain on the planet...)

regards, tom lane

#3Lee Thompson
bm55b@yahoo.com
In reply to: Tom Lane (#2)
Re: BUG #2170: --rpath option is skipping shared libs

Think it should be separted from --enable-rpath?
Maybe something like --enable-ldrpath?

--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Lee Thompson" <bm55b@yahoo.com> writes:

+    if test "$enable_rpath" = yes ; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi

What is this supposed to accomplish? (Other than
probably breaking
every non-gcc toolchain on the planet...)

regards, tom lane

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#4Lee Thompson
bm55b@yahoo.com
In reply to: Tom Lane (#2)
Re: BUG #2170: --rpath option is skipping shared libs

Better version of patch. Only kicks in when asked for
with --enable-rpath_sl

--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Lee Thompson" <bm55b@yahoo.com> writes:

+    if test "$enable_rpath" = yes ; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi

What is this supposed to accomplish? (Other than
probably breaking
every non-gcc toolchain on the planet...)

regards, tom lane

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Attachments:

postgresql-8.1.2-rpath.patchtext/x-patch; name=postgresql-8.1.2-rpath.patchDownload+44-1
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lee Thompson (#4)
Re: BUG #2170: --rpath option is skipping shared libs

Lee Thompson <bm55b@yahoo.com> writes:

Better version of patch. Only kicks in when asked for
with --enable-rpath_sl

You still haven't explained why such a change is needed. We're unlikely
to accept a patch without explanation, especially given that the
existing build system works fine on all the platforms we support.

A good way of making such a case is to write the documentation addition
that this patch is lacking, explaining when and why people should use
this configure switch.

BTW, submitting patches against the configure script is useless, as that
is a derived file.

regards, tom lane