dbTalk Databases Forums  

[BUGS] BUG #2170: --rpath option is skipping shared libs

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2170: --rpath option is skipping shared libs in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lee Thompson
 
Posts: n/a

Default [BUGS] BUG #2170: --rpath option is skipping shared libs - 01-14-2006 , 04:38 PM







The following bug has been logged online:

Bug reference: 2170
Logged by: Lee Thompson
Email address: bm55b (AT) yahoo (DOT) 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.])

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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2170: --rpath option is skipping shared libs - 01-14-2006 , 10:08 PM






"Lee Thompson" <bm55b (AT) yahoo (DOT) com> writes:
Quote:
+ 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Lee Thompson
 
Posts: n/a

Default Re: [BUGS] BUG #2170: --rpath option is skipping shared libs - 01-15-2006 , 08:04 AM



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

--- Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> wrote:

Quote:
"Lee Thompson" <bm55b (AT) yahoo (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2170: --rpath option is skipping shared libs - 02-15-2006 , 01:28 PM



Lee Thompson <bm55b (AT) yahoo (DOT) com> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #5  
Old   
Lee Thompson
 
Posts: n/a

Default Re: [BUGS] BUG #2170: --rpath option is skipping shared libs - 02-15-2006 , 01:29 PM



--0-790164961-1140030431=:34713
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Id:
Content-Disposition: inline

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

--- Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> wrote:

Quote:
"Lee Thompson" <bm55b (AT) yahoo (DOT) 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
--0-790164961-1140030431=:34713
Content-Type: text/x-patch; name="postgresql-8.1.2-rpath.patch"
Content-Description: 3338246661-postgresql-8.1.2-rpath.patch
Content-Disposition: inline; filename="postgresql-8.1.2-rpath.patch"

diff -Nru postgresql-8.1.2.orig/configure postgresql-8.1.2/configure
--- postgresql-8.1.2.orig/configure 2006-02-15 10:00:03.000000000 -0600
+++ postgresql-8.1.2/configure 2006-02-15 11:44:10.000000000 -0600
@@ -314,7 +314,7 @@
# include <unistd.h>
#endif"

-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_versi
on python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_rpath_sl enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYT
HON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
ac_subst_files=''

# Initialize some variables set by options.
@@ -863,6 +863,7 @@
--enable-nls[=LANGUAGES] enable Native Language Support
--disable-shared do not build shared libraries
--disable-rpath do not embed shared library search path in executables
+ --enable-rpath_sl embed shared library search path in dynamic shared libraries
--disable-spinlocks do not use spinlocks
--enable-debug build with debugging symbols (-g)
--enable-depend turn on automatic dependency tracking
@@ -1875,6 +1876,32 @@



+
+# Check whether --enable-rpath_sl or --disable-rpath_sl was given.
+if test "${enable_rpath_sl+set}" = set; then
+ enableval="$enable_rpath_sl"
+
+ case $enableval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath_sl option" >&5
+echo "$as_me: error: no argument expected for --enable-rpath_sl option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ enable_rpath_sl=no
+
+fi;
+
+
+
#
# Spinlocks
#
@@ -3358,6 +3385,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_sl" = yes; then
+ LIBDIRS="$LIBDIRS -Wl,-R$dir"
+ fi
LIBDIRS="$LIBDIRS -L$dir"
else
{ echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
@@ -3908,6 +3938,9 @@
echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}


+if test "$enable_rpath_sl" = yes; then
+ LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS"
+fi

for ac_prog in gawk mawk nawk awk
do
@@ -23209,6 +23242,7 @@
s,@default_port@,$default_port,;t t
s,@enable_shared@,$enable_shared,;t t
s,@enable_rpath@,$enable_rpath,;t t
+s,@enable_rpath_sl@,$enable_rpath_sl,;t t
s,@enable_debug@,$enable_debug,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
diff -Nru postgresql-8.1.2.orig/configure.in postgresql-8.1.2/configure.in
--- postgresql-8.1.2.orig/configure.in 2006-02-15 10:00:03.000000000 -0600
+++ postgresql-8.1.2/configure.in 2006-02-15 11:43:57.000000000 -0600
@@ -193,6 +193,9 @@
PGAC_ARG_BOOL(enable, rpath, yes,
[ --disable-rpath do not embed shared library search path in executables])
AC_SUBST(enable_rpath)
+PGAC_ARG_BOOL(enable, rpath_sl, no,
+ [ --enable-rpath_sl embed shared library search path in dynamic shared libraries])
+AC_SUBST(enable_rpath_sl)

#
# Spinlocks
@@ -357,6 +360,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_sl" = yes; then
+ LIBDIRS="$LIBDIRS -Wl,-R$dir"
+ fi
LIBDIRS="$LIBDIRS -L$dir"
else
AC_MSG_WARN([*** Library directory $dir does not exist.])
@@ -525,6 +531,9 @@
AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])

AC_ARG_VAR(LDFLAGS_SL)
+if test "$enable_rpath_sl" = yes; then
+ LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS"
+fi

AC_PROG_AWK
PGAC_PATH_FLEX

--0-790164961-1140030431=:34713
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

--0-790164961-1140030431=:34713--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.