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

Re: The broken libjpeg-6b is in RH 5.1

On 27 May 1998, Michael Alan Dorman wrote:

> jdassen@wi.leidenuniv.nl writes:
> > - Recent versions of libtool compile everything with an explicit -rpath
> >   setting. Binaries built with it cannot be run on systems that have the
> >   same libraries, but in different locations.
> >   An example of this problematic behaviour is with Red Hat's TriTeal CDE
> >   1.2 on Debian "hamm" systems: the CDE is libc5, and was compiled -rpath
> >   /usr/X11R6/lib . Thus, on a Debian "hamm" system, ld.so only looks for
> >   the X libraries there, and thinks it finds them, but they are the wrong 
> >   ones: on Debian "hamm" (and thus, Debian 2.0), /usr/X11R6/lib contains
> >   X libraries for use with libc6. The result of this is that many CDE
> >   applications dump core and require editing of their binaries (replacing
> >   the RPATH in the Dynamic Section (see objdump --all-headers) with NULLs)
> >   before they can be run successfully.
> Could someone who is sufficiently knowledgable (you?) build a tool to
> do this automatically that could be run from in debian/rules---so that
> when people run lintian on their packages, and it bitches about the
> rpath, people can add a couple of lines like:
> find -type f -name '*.so.*' | xargs -r remove-rpath
> find -perm +x | xargs -r remove-rpath
> to debian/rules and have the problem zapped?

Do you mean a script like this?

#!/usr/bin/perl -w

# Open file
open IN, "$ARGV[0]" or die "can't find $ARGV[0]: $!";

# Read it in one slurp
select IN;
undef $/;
select STDOUT;
close IN;

# Remove this string
print "Replaced: $count occurences in $ARGV[0]\n";

# Write the file
open OUT, ">$ARGV[0].out" or die "can't write $ARGV[0].out: $!";
print OUT $file;
close OUT;

This script takes one filename and fixes that file. The output is written
to another file, with .out appended to the filename.

I don't remember who wrote it. It was posted to the Debian mailing lists
several times when the X libraries had just moved to libc6 and some
programs (among which fvwm2) were compiled with -rpath.


To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: