# phpize / shtool

- Thread: https://externals.io/message/22738
- Original archive: https://news-web.php.net/php.internals/22738
- Started by Richard Lynch on 2006-04-13T22:04:05+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22738 — Richard Lynch — 2006-04-13T22:04:05+00:00

URL: https://externals.io/message/22738#22738

After running phpize and successfully compiling my extension, I call
my function and get a lot of errors about a mis-match in versioning
and debug/non-debug.

I then realized that I had called the webhost's 'phpize' from
/usr/local/bin, rather than my new one in my own home directory.

Calling the CORRECT 'phpize', however, is disconcerting:

-bash-2.05b$ ../../usr/local/bin/phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

But I already set $PHP_AUTOCONF.  Honest!

-bash-2.05b$ echo $PHP_AUTOCONF
/usr/local/bin/autoconf213
-bash-2.05b$ $PHP_AUTOCONF -h
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
       [-l dir] [--localdir=dir] [--version] [template-file]

I look at the source of my phpize, and am not finding anything to see
why this is happening...

  test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf
  test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader

  if test ! -x "`$php_shtool path $PHP_AUTOCONF`"; then

In a shell:

test -z $PHP_AUTOCONF
test -z $PHP_AUTOHEADER
./build/shtool path $PHP_AUTOCONF
test ! -x "./build/shtool path $PHP_AUTOCONF"

all produced no output at all

I tried all the other build/shtool on my system, and none of them
produced output for "path $PHP_AUTOCONF"

Not quite sure what any of them are supposed to do, mind you...

Seems like phpize is expecting that last test to produce output...

-- 
Like Music?
http://l-i-e.com/artists.htm

---

## #22744 — Richard Lynch — 2006-04-14T01:47:57+00:00

URL: https://externals.io/message/22738#22744 · In reply to: #22738

Still slogging away at this.

> ./build/shtool path $PHP_AUTOCONF
> test ! -x "./build/shtool path $PHP_AUTOCONF"

Apparently, I'm the exception to this:

http://www.zend.com/lists/php-dev/200503/msg00414.html
"And finally: Common users should NEVER EVER run buildconf."

What's that old saying?   Every pro started as an amatuer

I don't claim to understand the implications of the thread, nor
Sebastion's problems where, but I gotta weigh that if a stock FreeBSD
can't use it, maybe it needs fixin'...

From what little I do understand, if I've managed to set $PHP_AUTOCONF
to point to a working autoconf, I don't think I ought to get told off
for not having it set... :-)

I'm about to try to just disable that check and move on with life --
But surely a FreeBSD user shouldn't have to do that.

The workaround implied in the thread linked above, of making
symlinks...  I'm thinking maybe "root" user can just symlink to
/usr/local/bin/autoconf and call it done.

But does every C source code developer who wants to add an extension
to PHP really need to run as "root"?

Rasmus made this look SOOOO easy in his talk :-)

-- 
Like Music?
http://l-i-e.com/artists.htm
