On 04/06/10 01:25, Fabian Groffen wrote:
> On 05-04-2010 23:18:35 -0500, Johan Hattne wrote:
>> On 30 Mar 2010, at 03:13, Fabian Groffen wrote:
>>
>>> On 30-03-2010 07:19:02 +0200, Markus Duft wrote:
>>>> just to chime in on the movability: i successfully moved whole prefix
>>>> installations to other directories, and they worked fine (hint: i used
>>>> chpathtool to adjust paths) the only limitation is, that the path has to
>>>> be the exact same length (or less long, but that one didn't work for me
>>>> yet, but that could be fixable). of course this is not really
>>>> convenient, but it should be possibly for you to create
>>>>
>>>> "/home/user/prefix-with-long-path1"
>>>> and
>>>> "/cluster/disk25/user/prefix-short"
>>>>
>>>> those would be exchangeable. Of course chpathtool is possibly still not
>>>> perfect, and i observed the one or the other segfault with certain files
>>>> (none of those lately though). However you're free to fix it ;)
>>>
>>> That could match chpathtool's changes that it got recently.  Instead of
>>> trying to shorten paths, it now pads them with leading slashes, e.g.:
>>>
>>> original prefix:  /path/to/my/long/prefix
>>> target prefix:    ////////my/short/prefix
>>>
>>> As a result, the target prefix is always as long as the original prefix,
>>> be it somewhat ugly.  We found that this solves misc issues that you get
>>> when you suddenly make a string smaller ;)
>>
>> Apologies for resurrecting this topic, and I just realised I've
>> probably been confusing chpathtool with chrpath during all previous
>> discussions, but I haven't seen any mention of patchelf.  I got the
>> Intel compiler running in a Linux-prefixed-portage last week.
> 
> What can patchelf do that you needed to get it going?

It can set (grow or shrink) the rpath.  It can also set the run-time
linker, but I didn't seem to need that for this exercise.  ebuild attached.

// Cheers; Johan
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:$

EAPI="3"

DESCRIPTION="A small utility to modify the dynamic linker and RPATH of ELF 
executables"
HOMEPAGE="http://nixos.org/patchelf.html";
SRC_URI="http://hydra.nixos.org/build/114505/download/2/${PN}-${PV}.tar.bz2";

KEYWORDS="~x86-linux"
LICENSE="GPL-3"
SLOT="0"

src_configure() {
        econf --docdir="${EROOT}/usr/share/doc/${PN}-${PV}" \
        || die "configure failed"
}

src_install() {
        emake install DESTDIR="${D}" || die "make install failed"
}

Reply via email to