# mod_php emerge failed

## solaris

I have typed emerge mod_php and got this error, my use flags are:

USE="apache2 gd imap maildir mbox samba -3dnow -arts -avi -cups -encode \

     -gpm -gtk -imlib -java -kde -gnome -mikmod -motif -nls -oggvorbis \

     -opengl -xmms -xv -berkdb -python"

making all in programs/Xserver/hw/xnest...

make[4]: Entering directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver/hw/xnest'

make[4]: Nothing to be done for `all'.

make[4]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver/hw/xnest'

making all in programs/Xserver/hw/vfb...

make[4]: Entering directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver/hw/vfb'

make[4]: Nothing to be done for `all'.

make[4]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver/hw/vfb'

gcc -m32 -o XFree86 -mno-mmx -ansi -pedantic -Wno-return-type -w     -L../../exports/lib   xkb/xf86KillSrv.o xkb/xf86VT.o xkb/xf86Private.o        ../../programs/Xserver/hw/xfree86/common/xf86Init.o ../../programs/Xserver/hw/xfree86/common/xf86IniExt.o ../../programs/Xserver/hw/xfree86/common/libxf86.a             ../../programs/Xserver/hw/xfree86/parser/libxf86config.a ../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a ../../programs/Xserver/hw/xfree86/loader/libloader.a              ../../programs/Xserver/hw/xfree86/common/libxf86.a dix/libdix.a os/libos.a  ../../exports/lib/libXdmcp.a              ../../lib/font/fontbase.o                  ../../lib/font/libfontbase.a Xext/libexts.a xkb/libxkb.a Xi/libxinput.a                   lbx/liblbx.a                   ../../lib/lbxutil/liblbxutil.a  ../../programs/Xserver/hw/xfree86/common/libxf86.a          Xext/libexts.a xkb/libxkb.a Xi/libxinput.a                   lbx/liblbx.a                   ../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a dix/libxpstubs.a mi/libmi.a Xext/libexts.a xkb/libxkb.a Xi/libxinput.a                   lbx/liblbx.a                   ../../lib/lbxutil/liblbxutil.a  randr/librandr.a render/librender.a  ../../programs/Xserver/hw/xfree86/os-support/libxf86_os.a     -lz -lm                 -lpam -lpam_misc -rdynamic -ldl -lXau -rdynamic -ldl  -Wl,-rpath-link,../../exports/lib

../../programs/Xserver/hw/xfree86/loader/libloader.a(misym.o)(.data+0xbc): undefined reference to `miRegionEqual'

collect2: ld returned 1 exit status

make[3]: *** [XFree86] Error 1

make[3]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver'

make[2]: *** [install] Error 2

make[2]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs'

make[1]: *** [install] Error 2

make[1]: Leaving directory `/var/tmp/portage/xfree-4.3.0-r3/work/xc'

make: *** [install] Error 2

!!! ERROR: x11-base/xfree-4.3.0-r3 failed.

!!! Function src_install, Line 540, Exitcode 2

!!! (no error message)

and my emerge -pv mod_php told me this:

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N   ] x11-base/xfree-4.3.0-r3  -3dfx -sse +mmx -3dnow +xml2 +truetype -nls -cjk -doc -ipv6 -debug -static

[ebuild  N   ] media-libs/lcms-1.09

[ebuild  N   ] media-libs/libmng-1.0.5

[ebuild  N   ] x11-libs/qt-3.1.2-r3  -cups -nas -postgres -opengl +mysql -odbc +gif

[ebuild  N   ] dev-libs/libmcrypt-2.5.7

[ebuild  N   ] dev-libs/libxml2-2.5.8  -python +readline -ipv6

[ebuild  N   ] dev-libs/libxslt-1.0.31  -python

[ebuild    U ] sys-libs/cracklib-2.7-r7 [2.7-r6]

[ebuild  N   ] net-libs/c-client-2002d  +ssl

[ebuild    U ] media-libs/freetype-1.3.1-r3 [2.1.4] -nls

[ebuild  N   ] media-libs/t1lib-1.3.1  +X -tetex

[ebuild  N   ] net-libs/libwww-5.4.0-r1  +ssl +mysql

[ebuild  N   ] dev-php/mod_php-4.3.2-r3  +apache2 +X -cjk +crypt -curl -firebird -flash -freetds +gd -gd-external +gdbm +imap -informix -java +jpeg -ldap -mcal +mysql -nls -oci8 -odbc +pam +pdflib -memlimit +png -postgres +qt -snmp +spell +ssl -tiff +truetype +xml2

----------

## solaris

seems to be i forgot to -X in the use flags i'm sure i did this before!

now it's compiling without X dependencies - does anybody know how I get rid of those dependencies?

----------

## Stiffler

Hey, I got the same error trying to install Apache PHP mod_php and mod_ssl all at the same time. What is the exact command you used to get it to work?Last edited by Stiffler on Sat Jul 12, 2003 7:27 pm; edited 1 time in total

----------

## maxmc

I'm getting

```
checking for sys/ipc.h... yes

checking for fopencookie... yes

configure: error: can not run test program while cross compiling

 

!!! ERROR: dev-php/mod_php-4.3.2-r3 failed.

!!! Function econf, Line 304, Exitcode 1

!!! econf failed

 

k27 libgtkhtml #

```

I used 

```
USE="-java -X" emerge mod_php
```

but no no.. it wont work... anyone tried that version?

----------

## tomga

same error here, cant find a solution

----------

## 0problem.dk

Has any of you found a solution to the "cross compiling" problem?

Working on the same issue here.

I tried masking the r3-version, but I still had to recompile mod_php-4.3.2 due to my upgrade of MySQL, and I got the same error...

----------

## Tuppu

The same "configure: error: can not run test program while cross compiling" problem here as well ...

----------

## Peregrine

I was hit by the same error. To fix it, I ran "emerge libwww" again, since I compiled it with MySQL support and I had just emerge'd the new version of MySQL. This broke libwww, as it was trying to find the old .so file, and mod_php was using one of the libraries from libwww when performing the 'Configure' stage.

----------

## |Spiller|

Same here as well..

----------

## Peregrine

One other thing to note: I've just read the announcement for mysql/apache2, and one of the things you are told to do is run 'revdep-rebuild' - this is used to update all the packages that were using the old mysqlclient lib to use the new one. Its a part of the gentoolkit ebuild, if I read the announcement right

----------

## 0problem.dk

 *Peregrine wrote:*   

> One other thing to note: I've just read the announcement for mysql/apache2, and one of the things you are told to do is run 'revdep-rebuild' - this is used to update all the packages that were using the old mysqlclient lib to use the new one. Its a part of the gentoolkit ebuild, if I read the announcement right

 

I read that one too. The only problem is that it also fails due to mod_php not working correctly...  :Smile: 

Well, I'm gonna try the solution suggested above. Will post status later...

----------

## 0problem.dk

 *Peregrine wrote:*   

> I was hit by the same error. To fix it, I ran "emerge libwww" again, since I compiled it with MySQL support and I had just emerge'd the new version of MySQL. This broke libwww, as it was trying to find the old .so file, and mod_php was using one of the libraries from libwww when performing the 'Configure' stage.

 

So far, it passed the configuring stage, so this seems to do the trick!

Thank you very much, Peregrine!

-Asbjørn

----------

## Tuppu

I made (as revdep-rebuild complaint about DBD-mysql)

```
foo root # emerge DBD-mysql
```

Then:

```
foo root # /usr/portage/app-admin/gentoolkit/files/scripts/revdep-rebuild
```

No error messages, so everything fine. At next step I tried again:

```
foo root # emerge apache mod_ssl mod_php
```

And it still does not work:

```
checking for pam_start in -lpam... yes

checking for crypt in -lcrypt... yes

configure: error: Cannot find imap library (libc-client.a). Please check your IMAP installation.

!!! ERROR: dev-php/mod_php-4.3.2-r3 failed.

!!! Function econf, Line 304, Exitcode 1

!!! econf failed

```

Now it is complaining about imap ??? Acc. to my knowledge imap is working correctly ...

Any ideas ?

----------

## Tuppu

Continued to above....

It says "Cannot find imap library (libc-client.a)"

```

foo root # locate libc-client.a 

/usr/lib/libc-client.a

```

So, libc-client.a is there. How do I fix this ?

I also tried as somewhere else proposed

```

emerge libwww

emerge mod_php

```

It does not work with me. The result is the same complaint about libc-client.a and imap. I use courier-imap should it matter...

Anybody ?

----------

## ddanier

there were an update of gentoolkit today, i test this  :Wink: 

----------

## ddanier

 *ddanier wrote:*   

> there were an update of gentoolkit today, i test this 

 

..works for me

(php compiles in the background)

----------

## mgirard

I was having the same problem.

The new mod_php was failing to compile becuase of cross-compiler weirdness.

I ran the following commands and the users are happy again:

```
emerge unmerge mod_php

revdep-rebuild

emerge -u --deep mod_php
```

 :Very Happy: 

----------

## eagle_cz

cool thanks that helped

----------

## Tuppu

Tried this as well.... I still get the same error message as before (this thread on 14th July) about "configure: error: Cannot find imap library (libc-client.a). Please check your IMAP installation."

```
emerge unmerge mod_Php

```

This command results an error message as there is nothing to unmerge   :Rolling Eyes: 

```
revdep-rebuild

```

This command results re-emerging of

1. blackdown-jdk

2. qt

```
emerge -u --deep mod_php

```

And here we go again:

 *Quote:*   

> checking if iconv is glibc's... yes
> 
> checking for IMAP support... yes
> 
> checking for pam_start in -lpam... yes
> ...

 

I am loosing hair with this ¤¤¤   :Evil or Very Mad: 

----------

## Ox-

 *Tuppu wrote:*   

> Tried this as well.... I still get the same error message as before (this thread on 14th July) about "configure: error: Cannot find imap library (libc-client.a). Please check your IMAP installation."
> 
> ```
> emerge unmerge mod_Php
> 
> ...

 

That's probably because the package is called "mod_php" ... not "mod_Php".

I had problems with php a few days ago with "update -u world".  Simply unmerging mod_php and then emerging it again worked.  The revdep-rebuild shouldn't have anything to do with it (other than identifying mod_php as a package that needs to be re-emerged because of a dependency on old MySQL library).

----------

## Tuppu

Uups, that was a typo (of course it is not mod_Php).

Here copy from ssh window:

```
foo root # emerge unmerge mod_php

!!! Couldn't find match for mod_php

>>> unmerge: No packages selected for removal.

```

This is a new project I started some weeks ago...

----------

## Ox-

Ah, well that's interesting.  Maybe try:

```

USE="-imap" emerge mod_php

```

since it seems to be having trouble finding imap?

----------

## Tuppu

GREAT !!! That helped. Squirrelmail works as well now !!  :Very Happy: 

----------

