From nobody@FreeBSD.org  Sat May  7 17:07:32 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1A8F516A4DB
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 May 2005 17:07:32 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F237F43D75
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 May 2005 17:07:31 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j47H7TmD049100
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 7 May 2005 17:07:29 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j47H7Tgs049098;
	Sat, 7 May 2005 17:07:29 GMT
	(envelope-from nobody)
Message-Id: <200505071707.j47H7Tgs049098@www.freebsd.org>
Date: Sat, 7 May 2005 17:07:29 GMT
From: "Gabriel O'Brien" <go@quay.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeBSD default autotools install does not comply with "standard"
X-Send-Pr-Version: www-2.3

>Number:         80735
>Category:       ports
>Synopsis:       FreeBSD default autotools install does not comply with "standard"
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    thierry
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 07 17:10:02 GMT 2005
>Closed-Date:    Sat May 28 09:54:01 GMT 2005
>Last-Modified:  Sat May 28 09:54:01 GMT 2005
>Originator:     Gabriel O'Brien
>Release:        5.3-RELEASE-p13
>Organization:
>Environment:
FreeBSD sol.quay.net 5.3-RELEASE-p13 FreeBSD 5.3-RELEASE-p13 #2: Fri May  6 17:27:14 EDT 2005     root@sol.quay.net:/usr/obj/usr/src/sys/SOL  i386
>Description:
I have discovered this bug when trying to use PHP's pear installer with certain packages.  A specific example is when trying to install APC (http://pecl.php.net/package/APC) using my own (not the default FreeBSD) installation of PHP (4.3.11) and Apache (2.0.54) (though this has been present in every version of PHP and Apache I have tried in the past year).  I've searched the bugs but don't see it anywhere, if this is a duplicate I apologize.

This will also fail with the same error message if you try to install mmcache (http://turck-mmcache.sourceforge.net/) "manually", i.e.: without using pear, but running the ./configure script.  It fails on the step when you run phpize with the same error message as a pear install does.

sol# pear install APC
downloading APC-2.0.4.tgz ...
Starting to download APC-2.0.4.tgz (44,606 bytes)
...........done: 44,606 bytes
35 source files, building
running: phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20021010
aclocal: not found
`phpize' failed

I suspect that there may be some sort of non-default trickery I could do in my autotools Makefiles in order to force a more standard installation, however that would seem quite contrary to the idea that FreeBSD is a standards oriented platform (which it certainly is in my experience).  I would expect that packages in ports would install in a useable manner "out of the box".  I have a functioning solution/work-around and at least part of my intention is writing this bug is to make sure that at the very least this workaround is searchable.

I have the following relevant ports installed:

autoconf-2.59_2
automake-1.9.5
bison-1.75_2
libtool-1.3.5_2
libtool-1.5.10_1

My ports tree was synched and rebuilt using cvsup and portupgrade on 2005-05-06 at appx. 20:00 EDT.
>How-To-Repeat:
Step 1

Install Apache and PHP manually with the following options:

Apache:

./configure --prefix=/opt/apache \
--enable-so \
--enable-mods-shared="ssl usertrack alias rewrite"
make
make install

PHP:

./configure --prefix=/opt/php \
--with-apxs2=/opt/apache/bin/apxs \
--with-mysql=/usr/local \
--with-imap-ssl=/usr/local \
--with-imap=/usr/local \
--enable-force-cgi-redirect \
--enable-discard-path \
--with-zlib \
--enable-ftp \
--with-bz2 \
--with-dom \
--with-openssl=/usr \
--enable-exif \
--with-gd \
--with-jpeg \
--with-png \
--with-gettext \
--with-mm \
--with-mcal \
--with-mcrypt \
--enable-mbstring \
--enable-mbstr-enc-trans \
--enable-mbregex

Then run /opt/php/bin/pear install APC
>Fix:
This simple fix seems to work correctly:

#!/bin/sh

cd /usr/local/share

tar cfp aclocal-orig.tar aclocal  # backup the dir just in case
tar cfp aclocal19-orig.tar aclocal19  # backup the dir just in case

ln -s /usr/local/bin/aclocal19 /usr/local/bin/aclocal
ln -s /usr/local/bin/automake19 /usr/local/bin/automake
ln -s /usr/local/bin/autoconf259 /usr/local/bin/autoconf
ln -s /usr/local/bin/autoheader259 /usr/local/bin/autoheader
ln -s /usr/local/bin/libtool15 /usr/local/bin/libtool
ln -s /usr/local/bin/libtoolize15 /usr/local/bin/libtoolize
ln -s /usr/local/share/aclocal/libtool15.m4 /usr/local/share/aclocal/libtool.m4

cd /usr/local/share/aclocal19

for f in *; do ln -s /usr/local/share/aclocal19/$f /usr/local/share/aclocal/$f; done
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: thierry 
State-Changed-When: Sun May 8 13:51:23 GMT 2005 
State-Changed-Why:  

This is by design: these autotools are patched to be used by 
the FreeBSD ports system. Because several versions are required 
to address the different ports, they have been suffixed by a 
version number. 

If you want to build software *besides* the ports tree, you 
could use devel/gnu-autoconf, but watch carefully the post- 
installation message! 



Responsible-Changed-From-To: freebsd-ports-bugs->thierry 
Responsible-Changed-By: thierry 
Responsible-Changed-When: Sun May 8 13:51:23 GMT 2005 
Responsible-Changed-Why:  

Take follow-ups - if any. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80735 

From: Gabriel O'Brien <go@quay.net>
To: bug-followup@FreeBSD.org, go@quay.net
Cc:  
Subject: Re: ports/80735: FreeBSD default autotools install does not comply
 with "standard"
Date: Mon, 09 May 2005 15:26:38 -0400

 OK, I can accept that, but could I suggest that in this case you add a 
 similar warning message to the FreeBSD autotools install so that users 
 are aware of this?
 
 It is counter to the expected behavior of autotools (and the 
 out-of-the-box behavior on every other platform I have ever used) and I 
 have searched the documentation to find something that indicates this 
 fact.  I know I'm not the first person to come across this behavior and 
 in all my searching I've never seen anyone point to the info you 
 provided, so it would seem that this is not clear.
 
 Either way, thanks for your timely feedback.
 
 -Gabriel
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: thierry 
State-Changed-When: Sat May 28 09:52:58 GMT 2005 
State-Changed-Why:  

Feedback received, submitter is OK. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=80735 
>Unformatted:
