On Die, 2008-07-08 at 12:21 +0200, Holger Levsen wrote:
> Hi Bernd,
> 
> On Tuesday 08 July 2008 11:48, Bernd Petrovitsch wrote:
> > Can you `strace -eopen` it so that we can see where it is actually
> > searching?
> 
> The output is available at http://layer-acht.org/straceeopen.out and 

That looks like the shared loader is only searching in the directories
from /etc/ld.so.conf (and some hardcoded like /lib).
Grrml ....

> http://layer-acht.org/strace.out
> 
> > > Shouldn't that work or is the option to define LIBDIR more or less
> > > useless? ;)
> >
> > In theory it should work as we have
> > ----  snip  ----
> > LDFLAGS +=      -Wl,-rpath,$(LIBDIR)
> > ----  snip  ----
> > in Makefile.inc.
> > So you should also see it during the build (of the "olsrd" binary).
> 
> Thats inside an "ifdef OLSRD_PLUGIN else" statement..

Yes. It should then be used if we do not build a plugin. And that is
usually the "olsrd" binary (which contains the dlopen(3) call).
If I build hg-tip (adding `LIBDIR=/usr/lib/olsrd` to the `make`), I get:
----  snip  --- 
{19}/usr/bin/ccache gcc -Wl,-export-dynamic  -Wl,-rpath,/usr/lib/olsrd -Wl,--warn-common -o olsrd src/common/avl.o src/common/list.o src/build_msg.o src/duplicate_set.o src/fpm.o src/generate_msg.o src/hashing.o src/hna_set.o src/hysteresis.o src/interfaces.o src/ipcalc.o src/ipc_frontend.o src/link_set.o src/lq_mpr.o src/lq_packet.o src/lq_plugin.o src/lq_plugin_default_ff.o src/lq_plugin_default_float.o src/lq_plugin_default_fpm.o src/main.o src/mantissa.o src/mid_set.o src/mpr.o src/mpr_selector_set.o src/neighbor_table.o src/net_olsr.o src/olsr.o src/olsr_cookie.o src/olsr_spf.o src/packet.o src/parser.o src/plugin_loader.o src/plugin_util.o src/print_packet.o src/process_package.o src/process_routes.o src/rebuild_packet.o src/routing_table.o src/scheduler.o src/socket_parser.o src/tc_set.o src/two_hop_neighbor_table.o src/linux/apm.o src/linux/kernel_routes.o src/linux/link_layer.o src/linux/net.o src/unix/ifnet.o src/unix/log.o src/unix/misc.o src/cfgparser/olsrd_conf.o src/cfgparser/oparse.o src/cfgparser/oscan.o src/cfgparser/cfgfile_gen.o src/builddata.o -lpthread  -ldl
{20}strings olsrd | grep /usr/lib/olsrd
/usr/lib/olsrd
----  snip  --- 
So the string is at least in there somewhere.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




