Bug 40857 - autoconf port fails if shells/ksh93 is installed
Summary: autoconf port fails if shells/ksh93 is installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Christian Weisgerber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-21 20:50 UTC by sec
Modified: 2002-08-10 01:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sec 2002-07-21 20:50:01 UTC
NB: This is actually the same bug as ports/38696 (which I previously
submitted).  I have since debugged it some more. 

The configure script of autoconf-2.53 is broken, as it makes a wrong
assumption about shells.

As the standard FreeBSD /bin/sh does not support $LINENO, configure then
tries random shells to see if they do. The first that does is 
"/usr/local/bin/ksh" on my system.

configure then re-execs itself in ksh.

This ksh does search '.' when its PATH contains an invalid element. To
wit:

| ice:/usr/ports/devel/autoconf>/usr/local/bin/ksh
| $ cat conftest.sh
| #! /bin/sh
| echo got called
| exit 0
| $ ls -l conftest.sh
| -rwxr-xr-x  1 root  wheel  36 Jul 21 20:41 conftest.sh

| $ PATH=/bin
| $ conftest.sh
| /usr/local/bin/ksh: conftest.sh: not found
| $ PATH=foobar
| $ conftest.sh
| got called
| $ PATH=".;."
| $ conftest.sh
| got called

This makes the Test at line 90 go wrong and configure sets
PATH_SEPERATOR to ';' and later on fails trying to find programs:

| checking for perl... no
| configure: error: perl is not found
| ===>  Script "configure" failed unexpectedly.

Fix: 

I have sent a bug report to <bug-autoconf@gnu.org>, but I expect fixes
to take quite long. A sensible workaround would be to set
CONFIG_SHELL=/bin/sh in the environment of ./configure.

This is also proposed by ports/39492
How-To-Repeat: 
cd /usr/ports/shells/ksh93
make install clean 
cd /usr/ports/devel/autoconf
make
Comment 1 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2002-08-04 18:58:17 UTC
Responsible Changed
From-To: freebsd-ports->naddy

Over to maintainer
Comment 2 Christian Weisgerber freebsd_committer freebsd_triage 2002-08-10 01:30:30 UTC
State Changed
From-To: open->closed

This is effectively a duplicate of ports/39492.