Hello,

Below a patch that doesn't stop when encounter a non weak symbol.
And it can be even more verbose.
The previous reported "move print results patch" is also included.


Geert Stappers


# diff -u /usr/bin/mklibs.dist /usr/bin/mklibs
--- /usr/bin/mklibs.dist        2003-09-15 18:31:44.000000000 +0000
+++ /usr/bin/mklibs     2003-09-27 08:31:50.000000000 +0000
@@ -52,6 +52,7 @@
 DEBUG_NORMAL  = 1
 DEBUG_VERBOSE = 2
 DEBUG_SPAM    = 3
+DEBUG_SPAMSPAM    = 4
  
 debuglevel = DEBUG_NORMAL
  
@@ -118,6 +119,7 @@
     if not os.access(obj, os.F_OK):
         raise "Cannot find lib: " + obj
     output = command(target + "objdump", "--private-headers", obj)
+    debug(DEBUG_SPAMSPAM, "output", output )
     return map(lambda x: root + "/" + x, regexpfilter(output, 
".*RPATH\s*(\S+)$").elems())
  
 # Return a Set of libraries the passed objects depend on.
@@ -125,6 +127,7 @@
     if not os.access(obj, os.F_OK):
         raise "Cannot find lib: " + obj
     output = command(target + "objdump", "--private-headers", obj)
+    debug(DEBUG_SPAMSPAM, "output", output )
     return regexpfilter(output, ".*NEEDED\s*(\S+)$")
  
 # Return a list of libraries the passed objects depend on. The
@@ -133,6 +136,7 @@
     if not os.access(obj, os.F_OK):
         raise "Cannot find lib: " + obj
     output = command(target + "objdump", "--private-headers", obj)
+    debug(DEBUG_SPAMSPAM, "output", output )
     output = regexpfilter(output, ".*NEEDED\s*lib(\S+)\.so.*$")
     if not output.elems():
         return ""
@@ -152,12 +156,14 @@
  
     result = Set()
     output = command(target + "readelf", "-s", "-W", obj)
+    debug(DEBUG_SPAMSPAM, "output", output )
     for line in output:
         match = symline_regexp.match(line)
         if match:
             bind, ndx, name = match.groups()
             if ndx == "UND":
                 result.add((name, bind == "WEAK"))
+    debug(DEBUG_SPAMSPAM, "result", result )
     return result
  
 # Return a Set of symbols provided by a library
@@ -166,7 +172,6 @@
         raise "Cannot find lib" + obj
  
     result = Set()
-    debug(DEBUG_SPAM, "provided_symbols result = ", `result`)
     output = command(target + "readelf", "-s", "-W", obj)
     for line in output:
         match = symline_regexp.match(line)
@@ -175,6 +180,7 @@
             if bind != "LOCAL" and not ndx in ("UND", "ABS"):
                 debug(DEBUG_SPAM, "provided_symbols adding ", `name`)
                 result.add(name)
+    debug(DEBUG_SPAM, "provided_symbols result = ", `result`)
     return result
      
 # Return real target of a symlink
@@ -466,7 +472,7 @@
     for (symbol, is_weak) in needed_symbols.elems():
         if not symbol_provider.has_key(symbol):
             if not is_weak:
-                raise "No library provides non-weak " + symbol
+                print "WARNING:No library provides non-weak '" + symbol + "'"
         else:
             lib = symbol_provider[symbol]
             library_symbols_used[lib].add(symbol)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to