Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 396579

Summary: sys-devel/libtool has #!/bin/bash yet uses $(SHELL) to call it
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Failing build log

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-31 10:34:46 UTC
/usr/share/aclocal/libtool.m4:
	# Always use our own libtool.
	LIBTOOL='$(SHELL) $(top_builddir)/libtool'
	AC_SUBST(LIBTOOL)dnl

where SHELL defaults to /bin/sh, and /usr/bin/libtool installed to package has #!/bin/bash.

This is triggered, for example, in dev-libs/libtar.
Comment 1 Rafał Mużyło 2011-12-31 16:36:02 UTC
The catch lies most likely in one of ltmain.sh lines:
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}

/usr/bin/libtool inherits its shell from PMS - it's one that was used at the time of generation.
Comment 2 SpanKY gentoo-dev 2011-12-31 20:02:21 UTC
if your /bin/sh sucks, then autoconf should have detected that and used /bin/bash.  so why didn't libtar do that ?
Comment 3 SpanKY gentoo-dev 2013-01-14 18:34:18 UTC
please post a full build log showing the problem.  libtar seems to work for me.

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jan 14 13:36 /bin/sh -> dash

$ ebuild libtar-1.2.11-r5.ebuild clean unpack prepare configure compile
...
/bin/bash ../libtool --mode=compile x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g -Wimplicit-function-declaration -I. -I.. -I. -I../compat -I../listhash -DCPPFLAGS_TEST -c -o append.lo append.c
...
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-14 19:13:27 UTC
Created attachment 335640 [details]
Failing build log
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-14 19:15:01 UTC
I can reproduce it with -r4, the version which was in gx86 one year ago, when this bug was filed.
Comment 6 SpanKY gentoo-dev 2013-04-28 01:05:01 UTC
libtar r5 includes a lot of patches to the build system.  they have their own hand written Makefile.in instead of using automake.

if the only package you can hit this problem with is libtar and it doesn't use automake, then i don't think it's worth investigating.  i don't see a bug w/libtool here.
Comment 7 SpanKY gentoo-dev 2013-04-28 01:05:01 UTC
libtar r5 includes a lot of patches to the build system.  they have their own hand written Makefile.in instead of using automake.

if the only package you can hit this problem with is libtar and it doesn't use automake, then i don't think it's worth investigating.  i don't see a bug w/libtool here.