Subject: make replace and library dynamic loading
To: None <>
From: Xavier HUMBERT <>
List: tech-pkg
Date: 02/26/2003 14:59:36

I've been bitten by "make replace" breaking dynamic libraries dependencies.

I updated expat, from which depends php-xml, then after upgrading php,
got this error in the logfile :

> [26-Feb-2003 14:30:41] PHP Warning:  Unable to load dynamic library
>       '/usr/pkg/lib/php/20020429/' - Shared object ""
>       notfound in Unknown on line 0

Fortunately, I do have a log file....

And, in fact, if I check the library (this is ldd *after* I fix the problem) :

> # ldd /usr/pkg/lib/php/20020429/ 
> /usr/pkg/lib/php/20020429/
>          -lexpat.4 => /usr/pkg/lib/

What hurts me, is that php-xml is linked against a versioned library,
while there is a symlink which is precisely done for this purpose :

> ls -l /usr/pkg/lib/
> lrwxr-xr-x  1 root  wheel      15 Feb 12 15:00 
>                       /usr/pkg/lib/ ->

So I'm asking if :

-- there is a way to check your system for those problems (with find and ldd ?)
-- why use -llibname.vers in make file, instead relying on symlinks mechanisms ?

Xavier HUMBERT  -  Systemes et Reseaux     |
INJEP                                      |