Library creep and additional dependencies for net/ntp?
Cy Schubert
Cy.Schubert at komquats.com
Wed Mar 30 06:09:42 UTC 2016
In message <CAGnMC6pGQ9iMZAHE-NWHboCw4MaRT+k2nXzOsXD2fkWg+kdhhw at mail.gmail.c
om>
, Dewayne Geraghty writes:
> --001a114035e2660c5e052f3be038
> Content-Type: text/plain; charset=UTF-8
>
> Overnight I updated /usr/ports via svnlite, rebuilt all ports and noticed
> additional libraries and dependencies for net/ntp
>
> On 12th Feb, I'd built ntp-4.2.8p6.txz. Checking the libraries, I had
> # ldd /usr/local/sbin/ntpd
> /usr/local/sbin/ntpd:
> libmd.so.6 => /lib/libmd.so.6 (0x280fb000)
> libm.so.5 => /lib/libm.so.5 (0x2810f000)
> libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x28139000)
> libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282ca000)
> libthr.so.3 => /lib/libthr.so.3 (0x282d3000)
> libc.so.7 => /lib/libc.so.7 (0x282f4000)
>
> Today, I rebuilt ntp and found
> # ldd /usr/local/sbin/ntpd
> /usr/local/sbin/ntpd:
> * libmd5.so.0 => /usr/local/lib/libmd5.so.0 (0x280fc000) - from
> libwww*
> libm.so.5 => /lib/libm.so.5 (0x280fe000)
> libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x28128000)
> * libdns_sd.so.1 => /usr/local/lib/libdns_sd.so.1 (0x282b9000) -
> mDNSResponder*
> libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282c1000)
> libthr.so.3 => /lib/libthr.so.3 (0x282ca000)
> libc.so.7 => /lib/libc.so.7 (0x282eb000)
>
> * libz.so.6 => /lib/libz.so.6 (0x2845e000) libssl.so.8 =>
> /usr/local/lib/libssl.so.8 (0x28473000)*
>
> Checking pkg info -d ntpd
> # pkg info -d ntp
> ntp-4.2.8p6:
> openssl-1.0.2_8
> libevent2-2.0.22_1
> gettext-runtime-0.19.6
> libedit-3.1.20150325_1
>
> Can anyone shed any light on why ntp has picked up these additional
> libraries and created additional dependencies on libwww and mDNSresponder?
>
> I'm also curious as to how *libz *and *libssl *are now required, between
> ntp4.2.8p6 built in February vs the March build?
>
> By way of comparison,
> /usr/sbin/ntpd: (base OS ntp also ntp4.2.8p6)
> libm.so.5 => /lib/libm.so.5 (0x8008d2000)
> libthr.so.3 => /lib/libthr.so.3 (0x800afa000)
> libcrypto.so.7 => /lib/libcrypto.so.7 (0x800d1f000)
> libc.so.7 => /lib/libc.so.7 (0x801115000)
>
> These results are on "FreeBSD 10.3-PRERELEASE #0 r296427M:" My options for
> ntp have remained unchanged since 20140914.
Actually nothing has changed. However the net/ntp ./configure script
detects if additional libraries are already on your system, e.g. libmd5,
libdns_sd, and uses them. For instance, my laptop has huge collection of
packages installed to support various GUI environments under X:
slippy$ ldd /usr/local/sbin/ntpd
/usr/local/sbin/ntpd:
libmd5.so.0 => /usr/local/lib/libmd5.so.0 (0x2c4c6000)
libm.so.5 => /lib/libm.so.5 (0x2c6c8000)
libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x2ca00000)
libdns_sd.so.1 => /usr/local/lib/libdns_sd.so.1 (0x2ce5e000)
libintl.so.8 => /usr/local/lib/libintl.so.8 (0x2d066000)
libthr.so.3 => /lib/libthr.so.3 (0x2d271000)
libc.so.7 => /lib/libc.so.7 (0x2d496000)
libz.so.6 => /lib/libz.so.6 (0x2d843000)
libssl.so.7 => /usr/lib/libssl.so.7 (0x2da59000)
libcrypto.so.7 => /lib/libcrypto.so.7 (0x2dcc5000)
slippy$
My firewall OTOH bare bones, has very few packages and no X installed:
cwfw# ldd /usr/local/sbin/ntpd
/usr/local/sbin/ntpd:
libmd.so.6 => /lib/libmd.so.6 (0x8008ba000)
libm.so.5 => /lib/libm.so.5 (0x800aca000)
libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x800e00000)
libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801253000)
libthr.so.3 => /lib/libthr.so.3 (0x80145e000)
libc.so.7 => /lib/libc.so.7 (0x801683000)
cwfw#
In my poudriere build repo, the cached package (it's still building), ntpd
references:
cwsys$ ldd /tmp/usr/local/sbin/ntpd
/tmp/usr/local/sbin/ntpd:
libmd.so.6 => /lib/libmd.so.6 (0x2c4c4000)
libm.so.5 => /lib/libm.so.5 (0x2c6d4000)
libcrypto.so.7 => /lib/libcrypto.so.7 (0x2c8fd000)
libthr.so.3 => /lib/libthr.so.3 (0x2ccf3000)
libc.so.7 => /lib/libc.so.7 (0x2cf18000)
cwsys$
The ntp tarball does this out of the box -- read ./configure. The more
libraries the ntp build finds, the more it uses. Don't worry about it
dragging in gratuitous packages. It won't. But, it does use whatever it
detects.
If you want a minimal build, use poudriere to build your own binary
packages or use FreeBSD.org built binary packages. (If you're wondering,
ntpd on my laptop looks as it does because I did a point upgrade of net/ntp
outside of poudriere built packages.) Generally, it's recommended people
use binary packages.
To summarize, use binary packages. If you want to roll your own, use
poudriere, the install your own binary packages. Otherwise ports/net/ntp
will dynamically discover libraries during ./configure it can use.
Hope this helps.
--
Cheers,
Cy Schubert <Cy.Schubert at komquats.com> or <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
More information about the freebsd-ports
mailing list