bug-libtool
[Top][All Lists]
Advanced

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

libtool shell feature checks run with wrong shell


From: Colin Watson
Subject: libtool shell feature checks run with wrong shell
Date: Fri, 14 Dec 2007 01:59:34 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Hi,

We recently tried to build Debian's current version of fakeroot on
Ubuntu. Debian's /bin/sh is a symlink to /bin/bash, while Ubuntu's
/bin/sh is a symlink to /bin/dash. The fakeroot package in question was
distributed with libtool 2.1a:

      host-triplet:     i686-pc-linux-gnu
      shell:            /bin/sh
      compiler:         gcc
      compiler flags:           -W -Wall -g -O2
      linker:           /usr/bin/ld (gnu? yes)
      libtool:          (GNU libtool 1.2460 2007/05/10 17:30:29) 2.1a Debian-1
      automake:         automake (GNU automake) 1.10
      autoconf:         autoconf (GNU Autoconf) 2.61

The build fails as follows (abbreviated; the full log is at
http://launchpadlibrarian.net/10661203/buildlog_ubuntu-hardy-i386.fakeroot_1.8.8ubuntu1_FAILEDTOBUILD.txt.gz
if you need it):

  /bin/sh ./libtool --tag=CC   --mode=link gcc  -W -Wall -g -O2   -o faked 
faked.o libcommunicate.la -ldl 
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: compile_command+=: not found
  eval: 1: finalize_command+=: not found
  eval: 1: libtool_args+=: not found
  eval: 1: libtool_args+=: not found
  libtool: link: gcc  ./.libs/libcommunicate.a -ldl
  /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o: In function 
`_start':
  (.text+0x18): undefined reference to `main'
  collect2: ld returned 1 exit status
  make[3]: *** [faked] Error 1

I tried relibtoolizing with the current version of libtool in Debian
experimental, and had the same problem:

      host-triplet:     i686-pc-linux-gnu
      shell:            /bin/sh
      compiler:         gcc
      compiler flags:           -W -Wall -g -O2
      linker:           /usr/bin/ld (gnu? yes)
      libtool:          (GNU libtool 1.2525 2007/10/16 22:45:48) 2.1a Debian-1
      automake:         automake (GNU automake) 1.10
      autoconf:         autoconf (GNU Autoconf) 2.61

dash does not support the += syntax, so I went looking to see why
libtool used it. The _LT_CHECK_SHELL_FEATURES macro checks a number of
shell features and determines accurately that the currently-running
shell supports +=. Unfortunately, the currently-running shell is bash at
this point, not dash. The reason for this is that configure has
different logic for re-execing itself under a different shell from that
used by libtool. libtool seems to try to account for this using:

  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}

... but at this point CONFIG_SHELL is not set, and so libtool ends up
running under a different shell than the one that configure
feature-tested.

I've had this mail postponed for several days in the hope of finding
time to dig into this further, but I haven't found such time and I think
it's better to send an incomplete report than none at all. Please let me
know if there's anything you'd like me to investigate further.

Thanks,

-- 
Colin Watson                                       address@hidden




reply via email to

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