Trouble building GD into PHP

vikins

Well-Known Member
Oct 3, 2006
120
1
168
I have two servers both running the same version of cPanel/WHM:
WHM 10.8.0 cPanel 10.9.0-R57

One server is running CentOS 3.8. The other is running RHE4.

When I try to use WHM to rebuild Apache and include the GD module for PHP the CentOS machine builds fine, the RHE4 machine fails.

I've seen references to this issue here, for example:
http://forums.spry.com/showthread.php?t=238

That post is about Fedora, so I modified the instructions to use up2date instead of yum, as follows:
up2date xorg-x11-devel

But this didn't fix the problem, so just to be sure, I ran this:
up2date xorg-x11

Both packages installed fine. I reran the build, but still came up with errors. Here's the juicy parts from /usr/local/cpanel/logs/error_log:

================================================================
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x3a): In function `AllocColor':
: undefined reference to `XParseColor'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x53): In function `AllocColor':
: undefined reference to `XAllocColor'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x3b4): In function `SetColor':
: undefined reference to `XQueryColors'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x448): In function `SetColor':
: undefined reference to `XUngrabServer'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x458): In function `SetColor':
: undefined reference to `XGrabServer'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x4cf): In function `SetColor':
: undefined reference to `XUngrabServer'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x4ff): In function `SetColor':
: undefined reference to `XUngrabServer'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x652): In function `CreateColors':
: undefined reference to `XQueryColors'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xaa8): In function `CreateColors':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xab7): In function `CreateColors':
: undefined reference to `XDefaultColormap'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xaca): In function `CreateColors':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xad9): In function `CreateColors':
: undefined reference to `XDefaultVisual'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xb8c): In function `CreateXImage':
: undefined reference to `XCreateImage'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x13a8): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x13b7): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultVisual'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x184c): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x185b): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultDepth'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x186d): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x187c): In function `XpmCreateImageFromXpmImage':
: undefined reference to `XDefaultColormap'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x2112): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x2121): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultVisual'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x25d5): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x25e4): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultDepth'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x25f6): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultScreen'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0x2605): In function `xpmParseDataAndCreate':
: undefined reference to `XDefaultColormap'
/usr/X11R6/lib/libXpm.a(create.o)(.text+0xb25): In function `FreeColors':
: undefined reference to `XFreeColors'
/usr/X11R6/lib/libXpm.a(CrPFrI.o)(.text+0x31): In function `xpmCreatePixmapFromImage':
: undefined reference to `XCreatePixmap'
/usr/X11R6/lib/libXpm.a(CrPFrI.o)(.text+0x5f): In function `xpmCreatePixmapFromImage':
: undefined reference to `XCreateGC'
/usr/X11R6/lib/libXpm.a(CrPFrI.o)(.text+0xa7): In function `xpmCreatePixmapFromImage':
: undefined reference to `XPutImage'
/usr/X11R6/lib/libXpm.a(CrPFrI.o)(.text+0xb3): In function `xpmCreatePixmapFromImage':
: undefined reference to `XFreeGC'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
=================================================================

The NOC that install RHE4 initially did tell me later that their default install does not include X11, so maybe there is more I need to install than just the two up2date commands I presented earlier.

Any help or guidance would be appreciated. I'd be glad to provide any information that might help resolve the issue if I haven't included enough so far.

FYI, I'm trying to build PHP 5.2.0 but the problem happens even if I downgrade to a lower version, so I don't think this has anything to do with the issue.

Thanks!
vikins