octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LD_LIBRARY_PATH problems


From: Paul Kienzle
Subject: LD_LIBRARY_PATH problems
Date: Wed, 14 Aug 2002 13:34:44 -0400

Hi,

I've been trying to track down a problem in input.cc which comes about when I
have a really long input line:

        input.cc:307: int octave_read (char *, unsigned int): Assertion `len > 
0' failed.
        panic: Aborted -- stopping myself...

In the process of fixing it, I needed to override liboctinterp.so, so taking
some lines from test/Makefile I did the following:

        #! /bin/sh

        BASE=/home/pkienzle/cvs/octave
        OCTAVE=$BASE/src/octave
        ARGS="--norc --path .:$BASE/scripts//:$BASE/src"
        LIBPATH=$BASE/libcruft:$BASE/liboctave:$BASE/src
        LD_LIBRARY_PATH=$LIBPATH ldd $OCTAVE
        LD_LIBRARY_PATH=$LIBPATH $OCTAVE $ARGS

This didn't work.  The "ldd" command shows that it is still picking up
files from /usr/local/lib.  

A warning to other maintainers: before running make check, you should 
first run the above script and check that you are picking up the correct
libraries.

Looking at the ld.so man page, it seems to check for libraries in the
following order

        RPATH section of object
        LD_LIBRARY_PATH environment variable
        RUNPATH section of object
        /etc/ld.so.cache

Looking at my Makeconf, I see that RLD_FLAG contains -Xlinker -rpath, so ld
is doing what it claims.  Presumably the --disable-rpath option on ./configure
will make things work right, but I haven't checked (it takes a looong time to
compile on this box).

So my question is, is there any way to override the builtin rpath?

Using LD_PRELOAD I can explicitly load the libraries but this runs into another 
problem: liboct-pathsearch depends on symbols from libkpathsea.a which for
some reason is linked into src/octave directly.  I haven't tried linking it 
into liboct-pathsearch (again, it takes a long time to compile), but that might
fix it.

Paul Kienzle
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]