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

Re: Bug#758581: debian-installer: FTBFS on armhf/network-console: No library provides non-weak __aeabi_unwind_cpp_pr0



On Sun, 2014-08-24 at 21:24 +0100, Ian Campbell wrote:
> I've timed out for now, but I'll continue prodding as I have the
> chance...

I caught up with Adam Conrad a debconf and he pointed out that __aeabi_*
are some weird internal ABI thing which doesn't actually indicate an
unresolved symbol. IOW they should be ignored, dpkg-shlibs does this too
(search for __aeabi_ in /usr/share/perl5/Dpkg/Shlibs/SymbolFile.pm)

Rebuilding the installer with mklibs patches as below seems to work, in
that I can "chroot tmp/network-console/tree/ /bin/sh" and then in the
chroot "/usb/sbin/sshd --help" runs and produces output. If the symbol
were actually required at runtime then this would have failed with some
sort of dynamic linker error.

This:
        # LD_TRACE_LOADED_OBJECTS=1 /lib/ld-linux-armhf.so.3 /usr/sbin/sshd 
        	libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0xb6ddd000)
        	libutil.so.1 => /lib/libutil.so.1 (0xb6dcb000)
        	libz.so.1 => /usr/lib/libz.so.1 (0xb6da9000)
        	libcrypt.so.1 => /lib/libcrypt.so.1 (0xb6d6c000)
        	libc.so.6 => /lib/libc.so.6 (0xb6cc1000)
        	/lib/ld-linux-armhf.so.3 (0xb6f7c000)
        	libdl.so.2 => /lib/libdl.so.2 (0xb6cb0000)

indicates that the ssh binary is indeed using those libraries which
appear to depend on the problematic symbol.

What's not clear is why this is just occurring now. I suppose changes to
gcc/glibc or something have caused it to be exposed. I don't propose to
dig much deeper into that aspect (mostly on the basis that if
dpkg-shlibs does it mklibs should too).

So I think we should upload a new mklibs and have a new debian-installer
upload which buidld-deps on it.

Ian.

>From cf0887e69d4d150e240fa3770e03464ed79aa442 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc@hellion.org.uk>
Date: Mon, 25 Aug 2014 02:22:15 +0100
Subject: [PATCH] Ignore all ARM EABI symbols (__aeabi_*)

---
 debian/changelog |  7 +++++++
 src/mklibs       | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e9afd36..303e1c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mklibs (0.1.40) UNRELEASED; urgency=medium
+
+  * Ignore all ARM EABI symbols (__aeabi_*). These are artefacts of the ABI and
+    not real symbols which need to be present.
+
+ -- Ian Campbell <ijc@hellion.org.uk>  Mon, 25 Aug 2014 02:08:09 +0100
+
 mklibs (0.1.39) unstable; urgency=medium
 
   * Sort objects and libraries to reduce entropy in the output, which
diff --git a/src/mklibs b/src/mklibs
index d9b784b..1f3d60f 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -137,6 +137,14 @@ class UndefinedSymbol(Symbol):
         super(UndefinedSymbol, self).__init__(name, version, library)
         self.weak, self.library = weak, library
 
+def symbol_is_blacklisted(name):
+    # The ARM Embedded ABI spec states symbols under this namespace as
+    # possibly appearing in output objects.
+    if name.startswith("__aeabi_"):
+        return True
+
+    return False
+
 # Return undefined symbols in an object as a set of tuples (name, weakness)
 def undefined_symbols(obj):
     if not os.access(obj, os.F_OK):
@@ -148,6 +156,9 @@ def undefined_symbols(obj):
     for line in output:
         name, weak_string, version_string, library_string = line.split()[:4]
 
+        if symbol_is_blacklisted(name):
+            continue
+
         weak = False
         if weak_string.lower() == 'true':
             weak = True
-- 
2.0.1




Reply to: