# FreeBSD 8.1_r2: Install Problem Apache 22



## Yettie (Dec 7, 2010)

Hello, I have a problem when reinstalling apache after portsnap upgrade:


```
===>  Installing for apache-2.2.17_1
===>   apache-2.2.17_1 depends on file: /usr/local/bin/perl5.10.1 - found
===>   apache-2.2.17_1 depends on shared library: expat.6 - found
===>   apache-2.2.17_1 depends on shared library: apr-1 - found
===>   apache-2.2.17_1 depends on shared library: pcre.0 - found
===>   apache-2.2.17_1 depends on shared library: iconv.3 - found
===>   apache-2.2.17_1 depends on shared library: mysqlclient.16 - found
===>   Generating temporary packing list
===>  Checking if www/apache22 already installed
Making install in srclib
Making install in os
Making install in unix
Making install in server
Making install in mpm
Making install in prefork
/usr/local/build-1/libtool --silent --mode=compile cc -O2 -pipe -I/usr/include -fno-strict-aliasing -I/usr/local/include  -O2 -pipe -
I/usr/include -fno-strict-aliasing      -I. -I/usr/ports/www/apache22/work/httpd-2.2.17/os/unix -I/usr/ports/www/apache22/work/httpd-
2.2.17/server/mpm/prefork -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/http -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/filters -
I/usr/ports/www/apache22/work/httpd-2.2.17/modules/proxy -I/usr/ports/www/apache22/work/httpd-2.2.17/include -
I/usr/ports/www/apache22/work/httpd-2.2.17/modules/generators -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/mappers -
I/usr/ports/www/apache22/work/httpd-2.2.17/modules/database -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/apache22/work/httpd-
2.2.17/modules/proxy/../generators -I/usr/include -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/ssl -I/usr/ports/www/apache22/work/httpd-
2.2.17/modules/dav/main -prefer-non-pic -static -c exports.c && touch exports.lo
/usr/local/build-1/libtool: not found
*** Error code 127

Stop in /usr/ports/www/apache22/work/httpd-2.2.17/server.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.17/server.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.17.
*** Error code 1

Stop in /usr/ports/www/apache22.
*** Error code 1

Stop in /usr/ports/www/apache22.
*** Error code 1

Stop in /usr/ports/www/apache22.
```

How can I solve this problem ?


----------



## wblock@ (Dec 7, 2010)

The 20101204 entry from /usr/ports/UPDATING may apply:


> IMPORTANT: if you have either devel/autoconf-wrapper or
> devel/automake-wrapper installed on your system (and you most likely do)
> PLEASE update these ports to their new versions before updating anything
> else -- Bad Things[tm] are likely to happen otherwise.


----------



## Yettie (Dec 8, 2010)

Are these files too old ?


```
autoconf-2.68       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20101119 Wrapper script for GNU autoconf
automake-1.11.1     GNU Standards-compliant Makefile generator (1.11)
automake-wrapper-20101119 Wrapper script for GNU automake
```


----------



## wblock@ (Dec 8, 2010)

Those are current.

Hmm.  The line that caused the error shows this on my system:

```
/usr/local/share/apr/build-1/libtool --silent --mode=compile cc -g -I/usr/local/include  -O2 -pipe -march=native -I/usr/include -fno-strict-aliasing
-I. -I/usr/ports/www/apache22/work/httpd-2.2.17/os/unix -I/usr/ports/www/apache22/work/httpd-2.2.17/server/mpm/prefork
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/http -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/filters 
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/proxy -I/usr/ports/www/apache22/work/httpd-2.2.17/include 
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/generators -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/mappers 
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/database -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/local/include/db42 
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/proxy/../generators -I/usr/include -I/usr/ports/www/apache22/work/httpd-2.2.17/modules/ssl 
-I/usr/ports/www/apache22/work/httpd-2.2.17/modules/dav/main -prefer-non-pic -static -c prefork.c && touch prefork.lo
```

Note the missing "apr" in the path to libtool.  Not sure why that's happening, but rebuilding apr (deinstall then install, not reinstall) should not harm anything.

The repetition of "-O2 -pipe" in your output suggest that you may have added CFLAGS in /etc/make.conf, which is not necessary and often a problem.


----------



## Yettie (Dec 8, 2010)

I rebuilt the whole system and it works now, but now I run into an other problem while installing php5-extensions


```
/bin/sh /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/libtool --mode=compile cc  -I. -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-
mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli.c -o mysqli.lo
/bin/sh /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/libtool --mode=compile cc  -I. -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-
mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c -o mysqli_api.lo
/bin/sh /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/libtool --mode=compile cc  -I. -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-
mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_prop.c -o mysqli_prop.lo
/bin/sh /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/libtool --mode=compile cc  -I. -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-
mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql  -DHAVE_CONFIG_H  -O2 -pipe -fno-strict-aliasing   -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_nonapi.c -o mysqli_nonapi.lo
 cc -I. -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -
I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli.c  -fPIC -DPIC -o .libs/mysqli.o
 cc -I. -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -
I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c  -fPIC -DPIC -o .libs/mysqli_api.o
 cc -I. -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -
I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_prop.c  -fPIC -DPIC -o .libs/mysqli_prop.o
 cc -I. -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli -DPHP_ATOM_INC -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli/include -I/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/main -I/usr/ports/databases/php5-mysqli/work/php-
5.3.3/ext/mysqli -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -
I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/mysql -DHAVE_CONFIG_H -O2 -pipe -fno-strict-aliasing -c 
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_nonapi.c  -fPIC -DPIC -o .libs/mysqli_nonapi.o
In file included from /usr/local/include/mysql/my_global.h:76,
                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/php_mysqli_structs.h:58,
                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c:33:
/usr/local/include/mysql/my_config.h:1214:1: warning: "PACKAGE_NAME" redefined
In file included from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c:24:
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/config.h:56:1: warning: this is the location of the previous definition
In file included from /usr/local/include/mysql/my_global.h:76,
                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/php_mysqli_structs.h:58,
                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c:33:
/usr/local/include/mysql/my_config.h:1217:1: warning: "PACKAGE_STRING" redefined
In file included from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli_api.c:24:
/usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/config.h:59:1: warning: this is the location of the previous definition
--- cut

--- endcut

                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli.c:33:
/usr/local/include/mysql/m_string.h:219:26: error: mysql/plugin.h: No such file or directory
In file included from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/php_mysqli_structs.h:78,
                 from /usr/ports/databases/php5-mysqli/work/php-5.3.3/ext/mysqli/mysqli.c:33:
/usr/local/include/mysql/m_string.h: In function 'lex_string_set':
/usr/local/include/mysql/m_string.h:304: error: dereferencing pointer to incomplete type
/usr/local/include/mysql/m_string.h:305: error: dereferencing pointer to incomplete type
*** Error code 1
*** Error code 1
*** Error code 1
4 errors
*** Error code 1

Stop in /usr/ports/databases/php5-mysqli.
*** Error code 1

Stop in /usr/ports/databases/php5-mysqli.
```

Do I have to reinstall php5.3.3 ?


----------



## Yettie (Dec 10, 2010)

If there is no help for the second part of this post, please, how can I set this thread as solved ?


----------



## wblock@ (Dec 10, 2010)

Can't help with the PHP, stopped using it years ago.  You can edit the title of your original post to mark it as solved, but new users aren't allowed to edit posts until they've after they've posted ten times.


----------

