ID:               39890
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gabriel at oxeva dot fr
-Status:           Open
+Status:           Feedback
 Bug Type:         *Compile Issues
 Operating System: Linux 2.6
 PHP Version:      5.2.0
 New Comment:

What if you move $datarootdir declaration before this line:
EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`?
Like this: http://tony2001.phpclub.net/dev/tmp/bug39890.diff



Previous Comments:
------------------------------------------------------------------------

[2006-12-22 20:23:03] gabriel at oxeva dot fr

Thanks for giving me some clues about where to look for a bug. I think
i have found it : this is related to the $datarootdir variable. Here is
my debug with some "echo" to see how the variable expansion is done
(this is done in reverse order):
--- line ~ 134948 : EXPANDED_PEAR_INSTALLDIR=`eval echo
$PEAR_INSTALLDIR`
echo $EXPANDED_PEAR_INSTALLDIR outputs "${prefix}/share/pear"

--- now we look at line ~131622 : 
PEAR_INSTALLDIR=$datadir/pear which gives:

echo $PEAR_INSTALLDIR outputs "${datarootdir}/pear"

--- one level up, line ~1011: datadir='${datarootdir}'

We clearly see a nested variable expansion case which can't be expanded
with 1 pass.

The line numbers may not match, as my configure script may differs from
yours since it's auto-generated.

Replacing "GNU) PEAR_INSTALLDIR=$datadir/pear;;"
 in configure.in line 984 by "GNU)
PEAR_INSTALLDIR=$datarootdir/pear;;"

then ./buildconf seems to correct the problem. But some regression
tests with older autoconf might be needed.

There is definitely something weird with this "datarootdir" thing :
having datadir and datarootdir variable seems ambiguous and maybe
redundant ?

------------------------------------------------------------------------

[2006-12-22 18:53:58] [EMAIL PROTECTED]

>What I don't understand is how you can build properly the
>configure script with autconf 2.61 ?

Well, I don't understand how it is possible not to build it, because
there are these lines in configure.in.

EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR

and $prefix is defined just before these lines.

So the result you get looks like 2x2=5 to me.

------------------------------------------------------------------------

[2006-12-22 18:44:15] gabriel at oxeva dot fr

My autoconf is 2.61 and built from vanilla sources too.
What are the possible dependencies linked to autoconf which might cause
this bug ?

I tried running configure with autoconf 2.60 and I have the problem
too. Only from autoconf 2.59 the problem seems to be solved.

What I don't understand is how you can build properly the configure
script with autconf 2.61 ?

If this can be useful, my libtool is version 1.5.22. What are the other
tools versions which can play a role in the build process ?

Now I'm not sure if the include_path issue is from my tools or a small
bug/typo in the *.in files from the PHP source. We need to know where
does this bug comes from to report the bug to the right person :)

------------------------------------------------------------------------

[2006-12-22 15:41:39] [EMAIL PROTECTED]

Where did you get this particular autoconf and did you try to build it
from sources?
A configure script which is unable to set the value of ${prefix} seems
like an autoconf issue to me and I'm unable to reproduce it with
autoconf 2.61 built from vanilla sources.

------------------------------------------------------------------------

[2006-12-21 16:13:17] gabriel at oxeva dot fr

I have tested other case with a minimal configure line :
./configure --prefix=/usr --sysconfdir=/etc/php --with-layout=GNU

When using the included "configure" script, the include_path is set
properly (.:/usr/share/pear), but when using a rebuilt configure script
(with ./buildconf --force; to make it effective, you need to delete the
configure script then type ./buildconf --force), the include_path is
set to .:${prefix}/share/pear.

The buildconf output is following :
# ./buildconf --force
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.61 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
           Running cvsclean for you.
           To avoid this, install autoconf-2.13.
rebuilding configure
aclocal.m4:2017: PHP_PROG_LEX is expanded from...
rebuilding main/php_config.h.in
autoheader: WARNING: Using auxiliary files such as `acconfig.h',
`config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for
`config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a
template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:             [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced,
see the
autoheader: WARNING: documentation.
aclocal.m4:2017: PHP_PROG_LEX is expanded from...

I need to use the buildconf to add some extensions statically into php
(APC and memcache for example)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39890

-- 
Edit this bug report at http://bugs.php.net/?id=39890&edit=1

Reply via email to