This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] scripts/ Handle NSS crypto libraries [BZ #21940]

The warning looked like this:

Use of uninitialized value in string ne at
  …/scripts/ line 184, <LDD> line 24.

It is triggered by this line of ldd output: => /lib64/ (0x00007f055003c000)

The other lines have a version in the soname: => /lib64/ (0x00007f055023f000)

2017-08-10  Florian Weimer  <>

	[BZ #21940]
	* scripts/ Handle NSS crypto libaries in ldd

diff --git a/scripts/ b/scripts/
index 4b0e9f3c4a..466c526cc9 100755
--- a/scripts/
+++ b/scripts/
@@ -177,10 +177,15 @@ open LDD, "ldd /tmp/test-prg$$ |"
   or die ("Couldn't execute ldd");
 while (<LDD>) {
   if (/^\s*lib/) {
+    # When libcrypt is linked against NSS, some of the referenced
+    # libraries do not have a trailing version in their soname.
     ($name, $version1, $version2) =
-      /^\s*lib(\w*)\.so\.([0-9\.]*)\s*=>.*\.so\.([0-9\.]*)/;
+      /^\s*lib(\w*)\.so(?:\.([0-9\.]*))?\s*=>.*\.so(?:\.([0-9\.]*))?/;
     $found{$name} = 1;
-    if ($versions{$name} ne $version1 || $version1 ne $version2) {
+    if (defined($version1) != defined($version2)
+	|| defined($version1) != defined($versions{$name})
+	|| (defined($versions{$name})
+	    && ($versions{$name} ne $version1 || $version1 ne $version2))) {
       print "Library lib$name is not correctly installed.\n";
       print "Please check your installation!\n";
       print "Offending line of ldd output: $_\n";

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]