]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: Display better and different error messages when
authorGuido Draheim <guidod@gmx.de>
Thu, 15 Nov 2001 00:34:30 +0000 (00:34 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 15 Nov 2001 00:34:30 +0000 (00:34 +0000)
library linkage fails in various ways.

ChangeLog
ltmain.in

index f6b1b535ff9128214472ebc6cb0282a55f58dfe0..5292c7207fe73cb519ae559b0e62673a71af2599 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-15  Guido Draheim <guidod@gmx.de>
+
+       * ltmain.in: Display better and different error messages when
+       library linkage fails in various ways.
+
 2001-10-28  Gary V. Vaughan  <gary@gnu.org>
 
        From Tom Bates  <Tom.Bates@compaq.com>:
index e65d75eef5a877fe6479316ad05e706af0d539f4..a8769977104f16a891877e5365ca91b611c8619b 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1461,10 +1461,12 @@ compiler."
          lib)
            if test "$deplibs_check_method" != pass_all; then
              echo
-             echo "*** Warning: This library needs some functionality provided by $deplib."
+             echo "*** Warning: Trying to link with static lib archive $deplib."
              echo "*** I have the capability to make that library automatically link in when"
              echo "*** you link to this library.  But I can only do this if you have a"
-             echo "*** shared version of the library, which you do not appear to have."
+             echo "*** shared version of the library, which you do not appear to have"
+             echo "*** because the file extensions .$libext of this argument makes me believe"
+             echo "*** that it is just a static archive that I should not used here."
            else
              echo
              echo "*** Warning: Linking the shared library $output against the"
@@ -1926,13 +1928,14 @@ compiler."
            # Just print a warning and add the library to dependency_libs so
            # that the program can be linked against the static library.
            echo
-           echo "*** Warning: This library needs some functionality provided by $lib."
+           echo "*** Warning: This system can not link to static lib archive $lib."
            echo "*** I have the capability to make that library automatically link in when"
            echo "*** you link to this library.  But I can only do this if you have a"
            echo "*** shared version of the library, which you do not appear to have."
            if test "$module" = yes; then
-             echo "*** Therefore, libtool will create a static module, that should work "
-             echo "*** as long as the dlopening application is linked with the -dlopen flag."
+             echo "*** But as you try to build a module library, libtool will still create "
+             echo "*** a static module, that should work as long as the dlopening application"
+             echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
              if test -z "$global_symbol_pipe"; then
                echo
                echo "*** However, this would only work if libtool was able to extract symbol"
@@ -2507,10 +2510,12 @@ EOF
                else
                  droppeddeps=yes
                  echo
-                 echo "*** Warning: This library needs some functionality provided by $i."
+                 echo "*** Warning: dynamic linker does not accept needed library $i."
                  echo "*** I have the capability to make that library automatically link in when"
                  echo "*** you link to this library.  But I can only do this if you have a"
-                 echo "*** shared version of the library, which you do not appear to have."
+                 echo "*** shared version of the library, which I believe you do not have" 
+                 echo "*** because a test_compile did reveal that the linker did not use it for"
+                 echo "*** its dynamic dependency list that programs get resolved with at runtime."
                fi
              else
                newdeplibs="$newdeplibs $i"
@@ -2537,10 +2542,12 @@ EOF
                  else
                    droppeddeps=yes
                    echo
-                   echo "*** Warning: This library needs some functionality provided by $i."
+                   echo "*** Warning: dynamic linker does not accept needed library $i."
                    echo "*** I have the capability to make that library automatically link in when"
                    echo "*** you link to this library.  But I can only do this if you have a"
-                   echo "*** shared version of the library, which you do not appear to have."
+                   echo "*** shared version of the library, which you do not appear to have"
+                   echo "*** because a test_compile did reveal that the linker did not use this one"
+                   echo "*** as a dynamic dependency that programs can get resolved with at runtime."
                  fi
                else
                  droppeddeps=yes
@@ -2597,10 +2604,17 @@ EOF
              if test -n "$a_deplib" ; then
                droppeddeps=yes
                echo
-               echo "*** Warning: This library needs some functionality provided by $a_deplib."
+               echo "*** Warning: linker path does not have real file for library $a_deplib."
                echo "*** I have the capability to make that library automatically link in when"
                echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have."
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 echo "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 echo "*** with $libname and none of the candidates passed a file format test"
+                 echo "*** using a file magic. Last file checked: $potlib"
+               fi
              fi
            else
              # Add a -L argument.
@@ -2619,6 +2633,7 @@ EOF
              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
                for potent_lib in $potential_libs; do
+                 potlib="$potent_lib" # see symlink-check below in file_magic test
                  if eval echo \"$potent_lib\" 2>/dev/null \
                      | sed 10q \
                      | egrep "$match_pattern_regex" > /dev/null; then
@@ -2631,10 +2646,17 @@ EOF
              if test -n "$a_deplib" ; then
                droppeddeps=yes
                echo
-               echo "*** Warning: This library needs some functionality provided by $a_deplib."
+               echo "*** Warning: linker path does not have real file for library $a_deplib."
                echo "*** I have the capability to make that library automatically link in when"
                echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have."
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 echo "*** with $libname and none of the candidates passed a file format test"
+                 echo "*** using a regex pattern. Last file checked: $potlib"
+               fi
              fi
            else
              # Add a -L argument.