Re: libtool fails if user has environment variable D defined

2007-08-09 Thread Mike Frysinger
On Wednesday 08 August 2007, Peter O'Gorman wrote:
 On Wed, 2007-08-08 at 11:16 -1000, Sebastian Jester wrote:
  We do not want portage's install root ($D) present.

 This is not in the official libtool release, probably from a gentoo
 patch.

looks like an old one from about 5 years ago to work around issues with 
DESTDIR ... i'll review the situation to see if it's still relevant (and if 
so, why)
-mike


signature.asc
Description: This is a digitally signed message part.
___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


libtool fails if user has environment variable D defined

2007-08-08 Thread Sebastian Jester
Hi,

 Bug summary: compilation with libtool fails if user has an environment
variable D (and probably for S, too).

Description: while compiling a package that uses libtool, I ran into a
strange problem where paths to libraries like
/disk1/jester/IPP/bla/bla
got turned into
/IPP/bla/bla
and since that directory does not exist, much less contain the required
library, compilation fails in the libtool call.

It turns out that the failure is caused by one or more of these snippets
from ltmain.sh:

# We do not want portage's install root ($D) present.  Check only
for
# this if the .la is being installed.
if test $installed = yes  test $D; then
  eval mynewdependency_lib=`echo $libdir/$name |sed -e s:$D:/:g
-e 's:/\+:/:g'`
else
  mynewdependency_lib=$libdir/$name
fi
...
  # We do not want portage's install root ($D) present.
  my_little_ninja_foo_3=`echo $deplib |$EGREP -e $D`
  if test -n $my_little_ninja_foo_2  test $S; then
mynewdependency_lib=
  elif test -n $my_little_ninja_foo_3  test $D; then
eval mynewdependency_lib=`echo $deplib |sed -e s:$D:/:g -e
's:/\+:/:g'`
  else
mynewdependency_lib=$deplib
  fi
...
  # Do not add duplicates
  if test $installed = yes  test $D; then
install_libdir=`echo $install_libdir |sed -e s:$D:/:g -e
's:/\+:/:g'`
  fi

together with the fact that I use an environment variable D =
/disk1/jester (in this case) on every machine I have an account on
that points to my non-home-area data disk. Compilation works as
expected if I unset D.

I don't understand how libtool works and don't know what portage is,
so I can't offer a fix. Clearly, global environment variable names
like D and S are very very bad programming style for a
maximum-portability tool such as libtool (sorry to be so
blunt) so probably the straightforward fix is to rename them into
PORTAGE_INSTALL_ROOT_D or something like that
(MY_LITTLE_NINJA_FOO_D is very descriptive, too ;-)

This is the version info for ltmain.sh:

PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.22
TIMESTAMP= (1.1220.2.365 2005/12/18 22:14:06)

Cheers,

Sebastian Jester
___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: libtool fails if user has environment variable D defined

2007-08-08 Thread Peter O'Gorman
On Wed, 2007-08-08 at 11:16 -1000, Sebastian Jester wrote:
 We do not want portage's install root ($D) present.

This is not in the official libtool release, probably from a gentoo
patch.

Peter


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool