[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libunwind in unstable



On Mon, Nov 22, 2004 at 05:30:38PM -0800, David Mosberger wrote:
> That would make sense.  libstdc++5 calls _Unwind_Resume() which
> is/should be implemented by libunwind.so.7.  With older versions of
> GCC, it was implemented as part of libgcc_eh.a/libgcc_s.so.

Actually, when I checked with ldd I forgot it is recursive, if you
actually look at the DT_NEEDED flags the dependency comes from
/lib/libgcc_s.so.1

As I understand it the problem stems from the fact that the libgcc1
package actually comes from gcc-3.4 (to satisify something or other).

Poking around gcc-3.4 I think this is caused by PR14925, for which the
fix appeared in the 3.4.3 release, which was built by the autobuilder
on the 20th Nov 2004.  This (AFAICS) creates a "dummy" libunwind.so.7
in the case where the Mosberger (or other) libunwind isn't found.

I'm no gcc packaging expert, but I applied the attached patch to
gcc-3.4 and at least got libunwind into libgcc1

ianw@baci:/usr/src/tmp/glibc-debian$ dpkg --contents ./libgcc1_3.4.3-1_ia64.deb
[blah]
-rw-r--r-- root/root     48752 2004-11-23 16:04:31 ./lib/libgcc_s.so.1
-rw-r--r-- root/root     49904 2004-11-23 16:04:31 ./lib/libunwind.so.7

Of course, this means that if you install libunwind7, which lives in
/usr/lib/, /lib gets searched first and the Mosberger libunwind isn't
found.  You can't put it in /usr/lib/ because it will conflict with
the libunwind package.  So in my fairly uneducated opinion we could
either 

- write a patch similar to attached so libgcc1 includes libunwind.so,
 but setup some sort of alternatives system where the libunwind7
 package can override.

- fix the gcc build to depend on libunwind for ia64 and always use
 the Mosberger libunwind.  I see there is already a
 control.m4.unwind' but it doesn't appear to be used?  I think this
 has implications for stable which is frozen, too.

-i

--- orig/gcc-3.4-3.4.3/debian/rules.defs	2004-11-23 16:08:29.263208117 +1100
+++ gcc-3.4-3.4.3/debian/rules.defs	2004-11-23 14:16:47.000000000 +1100
@@ -477,6 +477,11 @@
 # Shared libgcc --------------------
 with_libgcc := yes
 with_shared_libgcc := yes
+ifeq ($(DEB_TARGET_ARCH),ia64)
+  with_shared_libunwind := yes
+else
+  with_shared_libunwind := no
+endif
 
 #ifeq ($(with_common_libs),yes)
 #  with_libgcc := yes
--- orig/gcc-3.4-3.4.3/debian/rules.d/binary-libgcc.mk	2004-11-23 16:08:28.424340940 +1100
+++ gcc-3.4-3.4.3/debian/rules.d/binary-libgcc.mk	2004-11-23 14:16:31.000000000 +1100
@@ -38,6 +38,11 @@
 	DH_COMPAT=2 dh_movefiles -p$(p_lgcc) $(files_lgcc)
 endif
 
+ifeq ($(with_shared_libunwind),yes)
+	mv $(d)/$(PF)/lib/libunwind.so.7 $(d)/$(libdir)/.
+	DH_COMPAT=2 dh_movefiles -p$(p_lgcc) $(libdir)/libunwind.so.7
+endif
+
 	dh_installdocs -p$(p_lgcc)
 	dh_installchangelogs -p$(p_lgcc)
 

Attachment: signature.asc
Description: Digital signature


Reply to: