Introduction
The aim of this page is to collect information on how to fix missing libraries when switching to Debian's version of libtool.
The fix-missing-libs.pl script
This script tries to iteratively fix Makefile.am files by parsing linking errors, looking up the missing references and updating *_LIBADD with the missing libraries. The script works like this:
- try going as far a possible in the build (make -k), and make a note of the missing symbols for each .la target
- if there are missing symbols, figure out what libraries are missing, patch the Makefile.am files
- if there were no missing symbols or if we were unable to figure out how to patch the Makefile.am files, stop here, otherwise go back to 1/
Download
You can download fix-missing-libs.pl here. This script is licensed under the GNU General Public License.
- v0.6
- add option to generate diff file
- add support for ’suites’ of libraries (kde, qt)
- v0.5
- support non-library targets by adding missing libraries to LDADD instead
- v0.4
- on top of checking for linking errors, check the exit status of the 'make' command
- v0.3
- try to fix locale problems by unsetting the LANG, LC_ALL, LC_LANG and LANGUAGE environment variables
Usage
To make use of this script, go to the (already configured) build directory and run:
fix-missing-libs.pl /path/to/source
Sample output
Loading symbols.. -> Loading symbols from '/usr/lib/libqt-mt.so'..done -> Loading symbols from '/usr/lib/libz.so'..done -> Loading symbols from '/usr/lib/libpng.so'..done -> Loading symbols from '/usr/X11R6/lib/libXext.so'..done -> Loading symbols from '/usr/X11R6/lib/libX11.so'..done -> Loading symbols from '/usr/lib/libkdecore.so'..done -> Loading symbols from '/usr/lib/libkdeui.so'..done -> Loading symbols from '/usr/lib/libkparts.so'..done -> Loading symbols from '/usr/lib/libkhtml.so'..done -> Loading symbols from '/usr/lib/libkio.so'..done -> Loading symbols from '/usr/lib/libkspell.so'..done -> Not loading symbols from '/usr/lib/libkab.so' (not found) -> Loading symbols from '/usr/lib/libktexteditor.so'..done -> Loading symbols from '/usr/lib/libkscript.so'..done -> Loading symbols from '/usr/lib/libDCOP.so'..done == RUN NUMBER 1 == -> In directory `src/kiosvn': * kio_ksvn.la needs: -lqt-mt -lkdecore -lkdeui -lDCOP -> In directory `src': * libkdesvnpart.la needs: -lqt-mt -lX11 -lkdecore -lkdeui Applying patches.. -> Patching 'src/Makefile.am' * Prepending to 'libkdesvnpart_la_LIBADD' -> Patching 'src/kiosvn/Makefile.am' * Prepending to 'kio_ksvn_la_LIBADD' == RUN NUMBER 2 == Finished : OK, make succeeded. No missing symbols encountered.








