Hi,

on solaris, I had a problem that my usr/bin/python did not find
libstdc++.so.6 (as of python-2.4.2).

This really is not a python problem, but more general, because we only
add "-Wl,-R${EPREFIX}/lib:${EPREFIX}/usr/lib" to LDFLAGS.
Thing is, libstdc++.so.6 resides in a very gcc-specific directory,
${EPREFIX}/usr/lib/gcc/i386-sun-solaris2.10/4.1.1/, and gcc does not add
an appropriate -R/-rpath linker flag for good reasons.

In main Gentoo Linux, /etc/ld.so.conf contains a list of that
gcc-specific directories, which is dynamically updated when changing
installed gcc versions.
But we cannot dynamically change runtime path that way, because we don't
want to use LD_LIBRARY_PATH for other good reasons (fex 'env -i').

Now, I've fixed it this way:

My 'gcc-config' also copies 'libstdc++.so.*' to ${EPREFIX}/lib now, as
it already does for 'libgcc_s.so.*'.

Attached patch is for 'gcc-config-1.3.14-prefix.patch'.
Don't be confused, it's a patch for a patch-file, just adding 'stdc++'
to the list of to-be-copied libraries.

Comments welcome.

BTW: python-2.4.4 does not runtime-depend on libstdc++.so any more
(why?), but it is not just python having this issue. After emerging
recent system+vim here, sys-libs/groff-1.19.2-r1 and sys-libs/db-4.3.27
provide binaries and sharedlibs depending on libstdc++.so.6.

/haubi/

Index: sys-devel/gcc-config/files/gcc-config-1.3.14-prefix.patch
===================================================================
--- sys-devel/gcc-config/files/gcc-config-1.3.14-prefix.patch	(revision 2388)
+++ sys-devel/gcc-config/files/gcc-config-1.3.14-prefix.patch	(working copy)
@@ -153,7 +153,8 @@
  			libdir="lib/"$("${ROOT}/${GCC_BIN_PATH}"/gcc ${multiarg} -print-multi-os-directory)
 -			if mkdir -p "${ROOT}/${libdir}"/.gcc.config.new ; then
 +			if mkdir -p "${EROOT}/${libdir}"/.gcc.config.new ; then
- 				for gcclib in gcc_s unwind ; do
+-				for gcclib in gcc_s unwind ; do
++				for gcclib in gcc_s unwind stdc++ ; do
  					if [[ -n $(ls "${ROOT}/${LDPATH}/${multilibdir}"/lib${gcclib}.so.* 2>/dev/null) ]]; then
 -						${CP} -pP "${ROOT}/${LDPATH}/${multilibdir}"/lib${gcclib}.so.* "${ROOT}/${libdir}"/.gcc.config.new/
 +						${CP} -pP "${ROOT}/${LDPATH}/${multilibdir}"/lib${gcclib}.so.* "${EROOT}/${libdir}"/.gcc.config.new/

Reply via email to