[Top][All Lists]

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

Re: Libtool sysroot RPATH problems

From: Ralf Wildenhues
Subject: Re: Libtool sysroot RPATH problems
Date: Thu, 13 Jan 2011 08:24:41 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Richard,

* Richard Purdie wrote on Wed, Jan 12, 2011 at 12:06:13AM CET:
> Firstly, for the first time ever for us, it appears libtool is no longer
> relinking our libraries at install time.

That's weird, I don't think the sysroot feature should've caused this
change.  Not quite sure though.

> This is welcome as we're cross
> compiling to a sysroot and we'd never want to actually run them in situ
> so this could probably save us some build time. It does however mean we
> never go for a relink step so we're hitting codepaths and issues that
> I've never seen. For reference, we always used to set installed="no" in
> our "staged" libraries prior to sysroot support since this let us hack
> around the lack of sysroot support easier.
> Anyhow, the problem I'm seeing is that the final library has an RPATH
> including the sysroot prefix when make is calling libtool with
> -rpath /usr/lib at link time. I looked at the code in ltmain.m4sh
> starting at line 7240 (see the end of the email for a quotation) and
> firstly, I don't understand why the func_replace_sysroot call is inside
> the $hardcode_libdir_separator test? Surely it should be outside it and
> happen whenever $hardcode_libdir_flag_spec is set?

Please show the --mode={link,install} commands plus all of their output,
also './libtool --config'.  Please also show how exactly you invoke
configure.  Thanks.

> Changing that helps a bit and I end up with an RPATH of "=/usr/lib" so
> the sysroot prefix is gone but the "=" is there. I suspect that isn't
> valid so I added the following code after the func_replace_sysroot call
> func_stripname '=' '' "$libdir"
> libdir=$func_stripname_result
> and then I get an RPATH of "/usr/lib" which is ok to a point.

The replacing of '=' can be achieved by running 'libtool --mode=finish
LIB' later, although I see we don't document this everywhere yet.

> Of course this is listed in $sys_lib_dlsearch_path_spec so shouldn't be
> getting added at all. Its coming to this function via $compile_rpath
> which is being set around line 5939 which in turn is coming from absdir.
> absdir is being compared against $sys_lib_dlsearch_path_spec but without
> adding/removing any sysroot prefixes.

Hmm, that sounds like a bug indeed.

> I'd really therefore like to ask what behaviour to be expecting from
> libtool before I try and write patches to fix any of this. To summarise
> some of my questions:

I can answer them only with more information, sorry.


reply via email to

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