libtool
[Top][All Lists]
Advanced

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

Re: DESTDIR install and OpenBSD


From: Ralf Wildenhues
Subject: Re: DESTDIR install and OpenBSD
Date: Thu, 26 Jan 2006 14:27:42 +0100
User-agent: Mutt/1.5.11

Hi Jacob,

* Jacob Meuser wrote on Thu, Jan 26, 2006 at 03:57:03AM CET:
> On Wed, Jan 25, 2006 at 02:14:08PM +0100, Ralf Wildenhues wrote:
> > * Carlo Contavalli wrote on Wed, Jan 25, 2006 at 12:42:15PM CET:
> > > Hello, 
> > >   I have two libraries: libtesta and libtestb. libtestb depends
> > > upon libtesta. The compilation process is fine. If I make install,
> > > it seems ok. However, if I:
> > > 
> > >   make install DESTDIR=/tmp/root.openbsd/
> > > 
> > > On linux it seems to work ok, with a couple warnings. On OpenBSD,
> > > libtool returns the error:
> > 
> > Please rerun the relink with --debug added (add it manually to the
> > respective line in the uninstalled libtestb.la file).  Also please
> > post `../../libtool --config' (preferably packed).
> > 
> > Please also show how you configured the package.
> > 
> > > gcc -shared  -fPIC -DPIC -o .libs/libtestb.so.0.0  .libs/test1.o 
> > > .libs/test2.o /usr/local/lib/libtesta.so.0.0
> > 
> > Yeah, most likely part of the problem is a bug I introduced right before
> > 1.5.22.  But there might be more issues to it.
> 
> this is a long standing problem, actually.  it is related to
> hardcode_direct=yes.  there is a workaround in OpenBSD's libtool port
> for about 1.5 years:

It's a workaround.  If `$libdir/$linklib' happens to actually exist but
be the wrong thing, it fails to work around; if it does not exist,
libtool fails to add hardcoding for the respective library, resulting in
execution startup failure.

> --- ltmain.in.orig    Sun Dec 18 13:43:52 2005
> +++ ltmain.in Mon Jan 23 23:47:11 2006
> @@ -2741,7 +2752,7 @@ EOF
>           add_dir=
>           add=
>           # Finalize command for both is simple: just hardcode it.
> -         if test "$hardcode_direct" = yes; then
> +         if test "$hardcode_direct" = yes && test -f $libdir/$linklib; then
>             add="$libdir/$linklib"
>           elif test "$hardcode_minus_L" = yes; then
>             add_dir="-L$libdir"

I believe the logic should correctly be somehow like this:
   if test "$hardcode_direct" = yes && test -z "$inst_prefix_dir"; then
     add="$libdir/$linklib"
   elif ...
   #..
   
   else
     # We cannot seem to hardcode it;  try libdir_flag_spec
     if test -n "$hardcode_libdir_flag_spec"; then
        ... utilize that
     fi
     ... (add_dir calculation)
   fi

But I am only willing to apply a patch to this extent together with
significant testsuite exposure.  And I haven't checked how the
utilization of $hardcode_libdir_flag_spec needs to be written
(hardcode_libdir_separator must not be forgotten).

> > > Am I doing something wrong? Or should I report this as a bug?
> 
> I have brought this up here before ...
> 
> http://www.archivum.info/address@hidden/2004-11/msg00481.html

You brought it up there, but the cited thread actually deals with a
slightly different problem, IIRC.

Cheers,
Ralf




reply via email to

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