Description of problem: libtool execute mode uses $lt_unset to unset locale environment variables. It is probably supposed to be defined to a command such as `unset', but it is never defined. Version-Release number of selected component (if applicable): libtool-1.5.22-6.1 How reproducible: Always. Steps to Reproduce: 1. echo 'int main(void) { return 0; }' >z.c 2. libtool --mode=compile --tag=CC gcc -c -o z.o z.c 3. libtool --mode=link --tag=CC gcc -o z z.o 4. libtool --mode=execute ./z Actual results: 1. (nothing) 2. gcc -c z.c -fPIC -DPIC -o .libs/z.o gcc -c z.c -o z.o >/dev/null 2>&1 3. gcc -o z z.o 4. /usr/bin/libtool: line 6823: LANG: command not found /usr/bin/libtool: line 6823: LC_ALL: command not found /usr/bin/libtool: line 6823: LC_COLLATE: command not found /usr/bin/libtool: line 6823: LC_MESSAGES: command not found Expected results: 1-3. Same as above. 4. (nothing) Additional info: a. The set of variables printed in 4. is the set of unset locale environment variables. It may differ depending on your locale setup. libtool returns the set ones to previous values, therefore lt_unset is only involved for unset variables. b. The same problem of course occurs also with libtools generated for software packages libtoolized with Fedora's libtool, not only when /usr/bin/libtool is used.
Upstream libtool does not exhibit this problem. The problem is RedHat/Fedora specific and caused by patch libtool-1.5.22-misc.patch. The variable lt_unset was introduced on 2006-05-18 to the HEAD (libtool-2.x) branch of libtool, it does NOT exist in the 1.5 branch.
that's not quite right, it does exist in the 1.5 branch, although not in 1.5.22: [libtool] >grep -r lt_unset . ./ltmain.in: $lt_unset $lt_var hagen:[libtool] >cvs status ltmain.in =================================================================== File: ltmain.in Status: Up-to-date Working revision: 1.334.2.138 Repository revision: 1.334.2.138 /sources/libtool/libtool/Attic/ltmain.in,v Sticky Tag: branch-1-5 (branch: 1.334.2) Sticky Date: (none) Sticky Options: (none) Anyway, this will be fixed in the next libtool package,