# [SOLVED - BYPASS] I can't emerge mod_php4 and even mod_php5

## Kulik

Both ebuild just won't provide .so files. When I try to emerge mod_php4, it spits out that it cannot find libphp4.so, only .la and .a are provided. When I try to emerge mod_php5 it spits at the end of emerge that it cannot stat .lib/libphp5.so

What's the problem? I really need PHP, I am just playing with PHP now  :Wink:  I would like to have php5 so I can write php5 aware scripts.

I tried to search through forums, but never found solution to that.

mod_php5 error output

```

libtool: link: warning: `/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/libstdc++.la' seems to be moved

*** Warning: linker path does not have real file for library -lX11.

*** I have the capability to make that library automatically link in when

*** you link to this library.  But I can only do this if you have a

*** shared version of the library, which you do not appear to have

*** because I did check the linker path looking for a file starting

*** with libX11 and none of the candidates passed a file format test

*** using a file magic. Last file checked: /lib/libpam.so.0.78

*** Warning: libtool could not satisfy all declared inter-library

*** dependencies of module libphp5.  Therefore, libtool will create

*** a static module, that should work as long as the dlopening

*** application is linked with the -dlopen flag.

Build complete.

(It is safe to ignore warnings about tempnam and tmpnam).

>>> Test phase [not enabled]: dev-php/mod_php-5.0.3-r2

>>> Install mod_php-5.0.3-r2 into /var/tmp/portage/mod_php-5.0.3-r2/image/ category dev-php

Installing PHP SAPI module:       apache2handler

/usr/lib/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-0/build/libtool' libphp5.la /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules

/usr/share/apr-0/build/libtool --mode=install cp libphp5.la /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/

cp .libs/libphp5.lai /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.la

cp .libs/libphp5.a /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.a

x86_64-pc-linux-gnu-ranlib /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.a

chmod 644 /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.a

libtool: install: warning: remember to run `libtool --finish /var/tmp/portage/mod_php-5.0.3-r2/work/php-5.0.3/libs'

Warning!  dlname not found in /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.la.

Assuming installing a .so rather than a libtool archive.

chmod 755 /var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.so

chmod: cannot access `/var/tmp/portage/mod_php-5.0.3-r2/image//usr/lib/apache2/modules/libphp5.so': No such file or directory

apxs:Error: Command failed with rc=65536

.

make: *** [install-sapi] Error 1

!!! ERROR: dev-php/mod_php-5.0.3-r2 failed.

!!! Function php5-sapi_src_install, Line 444, Exitcode 2

!!! install failed

!!! If you need support, post the topmost build error, NOT this status message.

```

emerge --info

```

Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r3 x86_64)

=================================================================

System uname: 2.6.11-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3000+

Gentoo Base System version 1.6.10

Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 24 2005, 11:37:48)]

dev-lang/python:     2.3.5

sys-devel/autoconf:  2.59-r6, 2.13

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5

sys-devel/binutils:  2.15.92.0.2-r6

sys-devel/libtool:   1.5.14

virtual/os-headers:  2.6.8.1-r3

ACCEPT_KEYWORDS="amd64 ~amd64"

AUTOCLEAN="yes"

CFLAGS="-march=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=athlon64 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"

GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="amd64 X acpi alsa apache2 berkdb bitmap-fonts cdr crypt curl dba encode fam flac flash font-server fortran freetds gd gdbm gif gimp gpm gtk gtk2 imap ipv6 java jp2 jpeg jpg junit kde kdevelop libwww lzw lzw-tiff mad motif mp3 mpeg mssql mysql ncurses nls ogg oggvorbis openal opengl oss pam pdflib perl php png postgres python qt readline samba sdl sqlite ssl tcpd tiff truetype truetype-fonts type1-fonts unicode usb userlocales xml2 xmms xpm xrandr xv zlib"

Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

```

Thx for help ... :Embarassed: 

----------

## Corellian

Well, I'm not sure what's de problem, but I think it could be caused by broken dependencies...  :Rolling Eyes: 

Have you tried to do a revdep-rebuild before?

```
 # revdep-rebuild 
```

I suppose you already tried first to update the path doing:

```
 # env-update

 # source /etc/profile 
```

----------

## Kulik

revdep-rebuild -p does only show OpenOffice, and it's because of permissions, not anything broken.

Yes I did:

env-update

source /etc/profile

doesn't help.  :Sad: 

----------

## Kulik

*bump* Anyone?

----------

## Kulik

It has something to do with particular USE flag. When I do USE="-* mysql apache2 php session" emerge mod_php it works  :Confused: 

I have no time to discover which USE flag is causing that -lX11 issues.

----------

