sshd on FBSD 8.0-RC2/3

Dmitry Pryanishnikov lynx.ripe at
Thu Dec 3 17:13:28 UTC 2009


2009/12/3 Peter Beckman <beckman at>:
>> ports/138466 (affects www/apache22 built
>> WITH_OPENSSL_PORT=yes). It is critical to make sure that right runtime
>> libraries (those from /usr/local/lib, not from the base) are used by _every_
>> application built WITH_OPENSSL_PORT=YES - and it's not always true ;(
>  Agreed.  I ran into this problem, I had an old ENV var LD_LIBRARY_PATH in
>  one of my .tcshrc scripts that caused lighttpd to compile with the libssl
>  from base but the libcrypto from the port.  Running make, then confirming
>  your binary/binaries are linked correctly to the right libraries using
>  'ldd' is recommended to confirm what you expect.

   Well, ldd's output _itself_ depends on the current environment and
thus can't insure that correct libraries will be used by the
application. Compare:



$ ldd /usr/local/libexec/apache22/
/usr/local/libexec/apache22/ => /usr/lib/ (0x2818c000) => /usr/lib/ (0x281c5000) => /usr/lib/ (0x282e2000) => /lib/ (0x283ad000) => /usr/local/lib/ (0x283c3000)

Weird, isn't it? from the base + 2 different!
However, apache's rc.d script sources /usr/local/sbin/envvars before
starting httpd (though not always - that's why my PR exists) to set


$ . /usr/local/sbin/envvars
$ ldd /usr/local/libexec/apache22/
/usr/local/libexec/apache22/ => /usr/local/lib/ (0x2818c000) => /usr/local/lib/ (0x281c9000) => /usr/lib/ (0x282ec000) => /lib/ (0x283b7000)

Now ldd shows proper libraries. Likewise, if one omit setting
LD_LIBRARY_PATH before running httpd, it (httpd itself) will just use
OpenSSL libraries from base instead of port-installed (despite being
built properly). So this is also run-time issue.

> Beckman
> ---------------------------------------------------------------------------
> Peter Beckman                                                  Internet Guy
> beckman at                       
> ---------------------------------------------------------------------------

Sincerely, Dmitry
nic-hdl: LYNX-RIPE

More information about the freebsd-ports mailing list