# Unable to build php extensions.



## nitro7 (Dec 16, 2010)

Greetings,

I can not build any php extension. I get the following:


```
mail# cd /usr/ports/www/php5-session/
mail# make install clean
===>   php5-session-5.3.3_2 depends on file: /usr/local/bin/phpize - found
===>   php5-session-5.3.3_2 depends on file: /usr/local/bin/autoconf-2.68 - found
===>  PHPizing for php5-session-5.3.3_2
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
autoconf: required version 2.68 not found
*** Error code 1

Stop in /usr/ports/www/php5-session.
```

This is a fresh install of FreeBSD 8.1 with a newly cvsupped ports tree. Autoconf is 2.68 as you can see.

Any ideas appreciated.

Thanks,
Clint


----------



## graudeejs (Dec 16, 2010)

Are you doing fresh install, or updating?
Have you read /usr/ports/UPDATING about autotools?


----------



## nitro7 (Dec 16, 2010)

Fresh Install of the extension.


```
mail# pkg_info | grep -i php5
php5-5.3.3_2        PHP Scripting Language
mail#
```


----------



## graudeejs (Dec 16, 2010)

Ye, but did you have autotools installed already and now decided to install extensions? (if so read /usr/ports/UPDATING)
Or you installed everything from scratch?


----------



## nitro7 (Dec 16, 2010)

Yes, everything is fresh. I installed FreeBSD yesterday, cvsupped ports, and started installing needed ports.


----------



## mievmk (Dec 17, 2010)

I wrote about it before..
`portupgrade -f lang/php5`


----------



## nitro7 (Dec 17, 2010)

This has been resolved by some aggressive measures. I removed all of my ports that I had already installed, supped a new port tree, and everything is happy now. Should had done that to begin with. Not the solution for a production machine, but considering it was just setup it is all good.

I did do the `portupgrade -f lang/php5` as mievmk suggested prior, but since this was clean installs it did nothing for me.


----------



## graudeejs (Dec 17, 2010)

Like I suspected cvs ports mirror wasn't up to date enough....
I suggest you use portsnap to update your ports tree.


----------



## nitro7 (Dec 17, 2010)

> Like I suspected cvs ports mirror wasn't up to date enough....
> I suggest you use portsnap to update your ports tree.



Thanks Killasmurf86, I will use portsnap in the future.


----------



## FF (Dec 17, 2010)

I have the same problem. Reinstalling all ports is not a good solution for me because this is production server. I'm download ports using portsnap.


----------



## FF (Dec 17, 2010)

Problem solved after reading UPDATING.


----------



## zw (Jan 5, 2011)

autoconf is actually symlinked to autoconf-wrapper, which is a shell script. If you upgrade autoconf from ports, you also need to upgrade autoconf-wrapper:

[CMD="cd /usr/ports/devel/autoconf-wrapper && make install"][/CMD]

That worked for me


----------



## elqbenzo (Jan 30, 2011)

hi, I had the same problem and I confirm: manually reinstalling autoconf-wrapper port after following /usr/ports/UPDATING instruction for auto*tools solved the problem for me.


----------



## Yoshi (Mar 9, 2011)

Sorry for bumping an old thread...

 Just wanted to say I had the exact same problem yesterday when I tried installing the php5-mysqli port. Turns out it was because there were 2 versions of autoconf installed and it was trying to use the old one. Deinstalled all versions of autoconf and installed 2.68 on its own and now PHP extensions compile with no issues.


----------



## regis (Jul 7, 2012)

Other way to omit autoconf errors is installing *devel/autoconf-wrapper*.
Worked with autoconf 2.68 and 2.69 for me.


----------

