# php and mod_php will not compile.

## reves

I'm trying to compile mod_php 4.2.3 for Apache 1.3.27. I wanted GD 2 for support for imagecreatetruecolor(). I got gd2 installed by modifying the ebuild a little bit (it should only have one SRC_URI line).  When trying to compile mod_php I get the following from the conifgure script: 

 *Quote:*   

> checking for gdImageString16 in -lgd... no
> 
> checking for gdImagePaletteCopy in -lgd... no
> 
> checking for gdImageCreateFromPng in -lgd... no
> ...

 

I checked the config.log file and for every gd test and for the mcrypt test it gets the following output:

 *Quote:*   

> /usr/lib/libgd.so: undefined reference to `FT_Init_FreeType'
> 
> /usr/lib/libgd.so: undefined reference to `FT_Load_Glyph'
> 
> /usr/lib/libgd.so: undefined reference to `FT_Done_Face'
> ...

 

I'm running Gentoo 1.4rc1.

My CFLAGS are:

```
CHOST="i586-pc-linux-gnu"

CFLAGS="-O3 -march=k6-2 -fomit-frame-pointer -ffast-math -pipe"

CXXFLAGS="${CFLAGS}"
```

I read somewhere on the Internet that I need xpm so installed that and the configure script detects it. I read somewhere on the forums that I can't USE both pdflib and gd so I added -pdflib to my USE settings. Any other suggestions?

----------

## rac

Might this be a relative of emerge gtk+/pango problem, where unmerging freetype and remerging some dependent libraries would help?

----------

## reves

Well I unmerged GD and Freetype. I emerged freetypte 1.3.1 and 2.0.9 then libgd 2.0.1. After all of that I tried mod_php again and got the same error.

----------

## reves

I realized I didn't have freetype in my USE settings to I added it. I umerged freetype and gd and merged them again an I'm still getting the same error. Any other suggestions?

----------

## derheld42

Two other topics that talk about the same problem: 

https://forums.gentoo.org/viewtopic-t-2177.html

https://forums.gentoo.org/viewtopic-t-6839.html

I found that reemerging libmcrypt fixed it.

----------

