Library creep and additional dependencies for net/ntp?

Cy Schubert Cy.Schubert at
Wed Mar 30 06:09:42 UTC 2016

In message <CAGnMC6pGQ9iMZAHE-NWHboCw4MaRT+k2nXzOsXD2fkWg+kdhhw at
, 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:
> => /lib/ (0x280fb000)
> => /lib/ (0x2810f000)
> => /usr/local/lib/ (0x28139000)
> => /usr/local/lib/ (0x282ca000)
> => /lib/ (0x282d3000)
> => /lib/ (0x282f4000)
> Today, I rebuilt ntp and found
> # ldd /usr/local/sbin/ntpd
> /usr/local/sbin/ntpd:
>        * => /usr/local/lib/ (0x280fc000) - from
> libwww*
> => /lib/ (0x280fe000)
> => /usr/local/lib/ (0x28128000)
>        * => /usr/local/lib/ (0x282b9000) -
> mDNSResponder*
> => /usr/local/lib/ (0x282c1000)
> => /lib/ (0x282ca000)
> => /lib/ (0x282eb000)
> * => /lib/ (0x2845e000) =>
> /usr/local/lib/ (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)
> => /lib/ (0x8008d2000)
> => /lib/ (0x800afa000)
> => /lib/ (0x800d1f000)
> => /lib/ (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: => /usr/local/lib/ (0x2c4c6000) => /lib/ (0x2c6c8000) => /usr/local/lib/ (0x2ca00000) => /usr/local/lib/ (0x2ce5e000) => /usr/local/lib/ (0x2d066000) => /lib/ (0x2d271000) => /lib/ (0x2d496000) => /lib/ (0x2d843000) => /usr/lib/ (0x2da59000) => /lib/ (0x2dcc5000)

My firewall OTOH bare bones, has very few packages and no X installed:

cwfw# ldd /usr/local/sbin/ntpd
/usr/local/sbin/ntpd: => /lib/ (0x8008ba000) => /lib/ (0x800aca000) => /usr/local/lib/ (0x800e00000) => /usr/local/lib/ (0x801253000) => /lib/ (0x80145e000) => /lib/ (0x801683000)

In my poudriere build repo, the cached package (it's still building), ntpd 

cwsys$ ldd /tmp/usr/local/sbin/ntpd
/tmp/usr/local/sbin/ntpd: => /lib/ (0x2c4c4000) => /lib/ (0x2c6d4000) => /lib/ (0x2c8fd000) => /lib/ (0x2ccf3000) => /lib/ (0x2cf18000)

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 

If you want a minimal build, use poudriere to build your own binary 
packages or use 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.

Cy Schubert <Cy.Schubert at> or <Cy.Schubert at>
FreeBSD UNIX:  <cy at>   Web:

	The need of the many outweighs the greed of the few.

More information about the freebsd-ports mailing list