bug-libtool
[Top][All Lists]
Advanced

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

Re: DESTDIR install final relinking issue.


From: Ralf Wildenhues
Subject: Re: DESTDIR install final relinking issue.
Date: Wed, 2 Mar 2005 11:13:17 +0100
User-agent: Mutt/1.4.1i

Hi Paul,

[ re-ordered and reformatted ]

* Ryan, Paul L.  wrote on Wed, Mar 02, 2005 at 01:29:44AM CET:
> > 
> > I realize that this destdir issue has been hammered on for quite a
> > while and I've searched the archives for my particular version of
> > this issue with no success. While running a 
> > make DESTDIR=/var/tmp/infomanagement-B2C5E4/ install 
> > I get the following warnings and the final install as you can see
> > installs the wrapper script instead of the actual binary:
> > 
> >   /bin/sh ../../libtool --mode=install /usr/bin/install -c IMMetrics
> > /var/tmp/infomanagement-B2C5E4/home/ofw/bin/ix86/IMMetrics
> > libtool: install: warning:
> > `/tmp/infomanagement-rpm-build/BUILD/infomanagement-B2C5E4/FFWError/src/
> > libF
> > FWError.la' has not been installed in `/home/ofw/lib/ix86'
*snip*

Alright.  All of the warnings are harmless.

> > libtool: install: warning: cannot relink `IMMetrics'
> > /usr/bin/install -c IMMetrics
> > /var/tmp/infomanagement-B2C5E4/home/ofw/bin/ix86/IMMetrics

OK, bug.

> > This build is being done on an x86 and has been tried with libtool
> > verions 1.5.6 and 1.5.14 without success in either. Any assistance
> > on this issue would be greatly apprceated.

It would be really great to have a testcase exposing the problem.
I suppose your software package is quite big -- if it's hard for
you to create a small example yourself, at least provide more info
on the relevant Makefile.am snippets and any other relevant parts
(including the commands you executed to expose this), so we can try
to build a testcase.

> As an update I've identified the area within ltmain.sh that causes the
> problem and below is a patch for 1.5.14 that works for me in fixing this
> problem. I realize it's probably not generic enough but it does take a
> DESTDIR into account when present and ignores it all other times. I would
> definetly like to see something that fixes this in 2.0 and if I can give
> anymore input I will be glad to.

Your patch as-is is not ok.  libtool has -inst-prefix and @inst-prefix@
for this, and direct use of DESTDIR would definitely need updated
documentation if necessary.  Other than that, a patch against ltmain.in
(ltmain.m4sh for branch-2-0) would be appreciated, but that is a minor
detail.

Regards,
Ralf


> --- ltmain.sh.orig    2005-03-01 15:20:59.444761786 -0700
> +++ ltmain.sh 2005-03-01 15:21:02.018584203 -0700
> @@ -5693,6 +5693,7 @@
>         fi
>  
>         finalize=yes
> +          useddestdir=no
>         for lib in $notinst_deplibs; do
>           # Check to see that each library is installed.
>           libdir=
> @@ -5706,10 +5707,20 @@
>           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ###
> testsuite: skip nested quoting test
>           if test -n "$libdir" && test ! -f "$libfile"; then
>             $echo "$modename: warning: \`$lib' has not been installed in
> \`$libdir'" 1>&2
> -           finalize=no
> +              if test -n "$DESTDIR$libdir" && test ! -f "$DESTDIR$libfile";
> then
> +                  $echo "$modname: warning: \`$lib' has not been installed
> in \`$DESTDIR$libdir'" 1>&2
> +                  finalize=no
> +              else
> +                  useddestdir=yes
> +              fi
>           fi
>         done
>  
> +          if test "$useddestdir" = yes; then
> +              $echo "$modename: info: linking to DESTDIR install" 
> +              $echo "$modename: info: You must put the DESTDIR in your LD
> path to run \`$file'" 1>&2
> +          fi
> +
>         relink_command=
>         # To insure that "foo" is sourced, and not "foo.exe",
>         # finese the cygwin/MSYS system by explicitly sourcing "foo."
> @@ -5741,16 +5752,20 @@
>             fi
>             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
>             outputname="$tmpdir/$file"
> +              if test ! "$useddestdir" = yes ; then
>             # Replace the output file specification.
> -           relink_command=`$echo "X$relink_command" | $Xsed -e
> 'address@hidden@%'"$outputname"'%g'`
> -
> -           $show "$relink_command"
> -           if $run eval "$relink_command"; then :
> -           else
> -             $echo "$modename: error: relink \`$file' with the above
> command before installing it" 1>&2
> -             ${rm}r "$tmpdir"
> -             continue
> -           fi
> +                  relink_command=`$echo "X$relink_command" | $Xsed -e
> 'address@hidden@%'"$outputname"'%g'`
> +                  $show "$relink_command"
> +                  if $run eval "$relink_command"; then :
> +                  else
> +                      $echo "$modename: error: relink \`$file' with the
> above command before installing it" 1>&2
> +                      ${rm}r "$tmpdir"
> +                      continue
> +                  fi
> +              else
> +                  outputname=.libs/$file
> +                  $echo "$modename: warning: cannot relink \`$file'" 1>&2
> +              fi
>             file="$outputname"
>           else
>             $echo "$modename: warning: cannot relink \`$file'" 1>&2




reply via email to

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