Wireshark-bugs: [Wireshark-bugs] [Bug 10790] link against freshly compiled libraries first

Date: Tue, 20 Jan 2015 08:46:30 +0000

Comment # 5 on bug 10790 from
What the patch does is make sure you link against libraries in the build tree
first and only then against libraries found elsewhere like in @*_LIBS@, which
may or may not include (possibly incorrect) directives such as -L$libdir which
could cause wireshark to link against stale libraries from an older wireshark
install. The reordering makes sure you list freshly built libraries first and
only then @*_LIBS@ (including -L$/usr/lib/somelibdir) and more generic link
time dependencies (such as -lm).

An order like this:

  @GEOIP_LIBS@ \
  ${top_builddir}/wiretap/libwiretap.la @GLIB_LIBS@ \
  ${top_builddir}/wsutil/libwsutil.la

might cause libtool to pick the wrong libwsutil based on what @GLIB_LIBS@ (or
in remote cases even libwiretap.la) happens to contain.

In fact libtool itself generates the same type of ordering I suggested here:

./wiretap/.libs/libwiretap.la:
dependency_libs=' .../wireshark/wsutil/libwsutil.la -lgcrypt -lgpg-error
-lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lz -lm -lnl-route-3 -lnl-genl-3 -lnl-3
-lsbc'

Objects first, then archives.


You are receiving this mail because:
  • You are watching all bug changes.