Skip to contentSkip to conversation

automake/aclocal or env problem?

DISCUSSION Steffen Sledz 2 participants 3 messages Sep 16, 2009 – Sep 17, 2009

lore
Share & tools
lore
#0 lore raw

We're using automake (1.10.2) on our target machine for rapid prototyping.

Calling "autoreconf --install" results in this error:

/usr/bin/env: perl -w: No such file or directory
autoreconf: aclocal failed with exit status: 127

An strace shows this:

[pid  1258] execve("/usr/local/bin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/usr/bin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/bin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/usr/local/sbin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/usr/sbin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/sbin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/opt/bin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] execve("/opt/avr/bin/perl -w", ["perl -w", "/usr/bin/aclocal", "--output=aclocal.m4t"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
[pid  1258] write(2, "/usr/bin/env: ", 14/usr/bin/env: ) = 14
[pid  1258] write(2, "perl -w", 7perl -w)      = 7
[pid  1258] write(2, ": No such file or directory", 27: No such file or directory) = 27
[pid  1258] write(2, "\n", 1

My interpretation is that execve looks e.g. for an executable named "/usr/bin/perl -w" and not for "/usr/bin/perl" with option "-w". A look into /usr/bin/aclocal shows this shebang line:

#!/usr/bin/env perl -w
# -*- perl -*-
# Generated from aclocal.in; do not edit by hand.

I'm not sure if this is wrong or /usr/bin/env is buggy.

Steffen

PS: A few lines later /usr/bin/aclocal contains pathes into the staging area. This should be fixed too.

#1 lore raw
Quoted 6 lines · Steffen Sledz

We're using automake (1.10.2) on our target machine for rapid prototyping.

Calling "autoreconf --install" results in this error:

/usr/bin/env: perl -w: No such file or directory
autoreconf: aclocal failed with exit status: 127

I see this problem on Zaurus as well.

Quoted 1 line

My interpretation is that execve looks e.g. for an executable named "/usr/bin/perl -w" and not for "/usr/bin/perl" with option "-w". A look into /usr/bin/aclocal shows this shebang line:

Yes.

Quoted 1 line

I'm not sure if this is wrong or /usr/bin/env is buggy.

Well. I was thinking so as well. But if you call /usr/bin/env perl -w from the command line, then it works as expected. In #! line it does not work. Neither in busybox env nor in coreutils env. It's probably expected behavior and the problem is introduced by recipes/autoconf/autoconf-2.63/path_prog_fixes.patch.

We would probably need ac_cv_path_ magic, exactly as it is done in recipes/libtool. It seems to work properly for both native and target.

Signature · 2 lines
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
#2 lore raw

Stanislav Brabec wrotr:

Quoted 11 lines
Quoted 1 line · Steffen Sledz

I'm not sure if this is wrong or /usr/bin/env is buggy.

Well. I was thinking so as well. But if you call /usr/bin/env perl -w from the command line, then it works as expected. In #! line it does not work. Neither in busybox env nor in coreutils env. It's probably expected behavior and the problem is introduced by recipes/autoconf/autoconf-2.63/path_prog_fixes.patch.

We would probably need ac_cv_path_ magic, exactly as it is done in recipes/libtool. It seems to work properly for both native and target.

I hope that this is a fix that does not break anything:
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=33cee0586991e235d0fe3d984f822ef2f310e7c3

The construction
if ${@['true', 'false'][bb.data.inherits_class('native', d)]} seems to be cleaner than tricks used in libtool. I am just testing the same approach for libtool recipes.

________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus