-   Slackware (
-   -   Need PHP/Pear extension GD (

enine 11-10-2010 05:26 PM

Need PHP/Pear extension GD

pear/Image_Color requires PHP extension "gd"
It looks like I have to recompile php to include the pear extensions I need but how can I tell what all configure switches were used to compile the original Slackware php package

GrapefruiTgirl 11-10-2010 05:27 PM

Grab yourself the original Slackbuild script used to build the package. It will be on your installation media in the sources (DVD) or on any mirror that holds your version of Slack, or get one from

Modify the original, adding the extra flags you need, and rebuild.

EDIT: For example, look in here (if you were running -current):

enine 11-10-2010 07:21 PM

Ok, I didn't realize the slack source was made from slackbuild scripts.
So I downloaded php and added the --with-gd at the end of the configure, then it needed alpine so I downloaded it and its compiling now.

enine 11-10-2010 07:35 PM

well, another roadblock'

checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
make: *** No targets specified and no makefile found. Stop.
make: *** No targets specified and no makefile found. Stop.

looks like something to do with imap-ssl which I shouldn't need, trying without.

took out both --with-imap options and got this far

configure: error: libXpm.(a|so) not found.

which says I need libXpm

which needs xorg-macros

I'm not finding either of these on slackware or slackbuilds so I wonder how the original slackbuild worked, or maybe these are not needed without GD which is why GD was not included.
documenting in case anyone else ever tries.

niels.horn 11-10-2010 09:10 PM

Well, first of all, you can simply type:

php -i | less
on the command line to see all the options php was compiled with.

Second, I use Image_Color here as well and never needed to rebuild my own php...

enine 11-10-2010 09:32 PM

How did you get it to install? Mine says that extension is missing and stops.
even the php that came with slack doesn't look right, I started up apache and I get the listing of the php source when I browse to it instead of it actually running it.

niels.horn 11-11-2010 03:41 AM

I needed three extensions and simply typed:

  # pear install Image_Color-1.0.4
  # pear install Image_Canvas-0.3.2
  # pear install Image_Graph-0.7.2

as simple as that...

Just tried it on a clean Slackware 13.1 system and it works.


enine 11-11-2010 07:11 AM

This is a new install of 13.1

pear install Image_Color-1.0.4
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/' - cannot open shared object file: No such file or directory in Unknown on line 0
pear/Image_Color requires PHP extension "gd"
No valid packages found
install failed

OK, I need to back up a step, I see but is missing. I did an install all of slack so I need to see where to find that.

GrapefruiTgirl 11-11-2010 09:46 AM


root@reactor: grep /var/log/packages/*

Note I'm not running the exact same Slack version as you, but above, you can see the package that your (apparently) missing thing comes from. With a full install however, you shouldn't be missing this.

niels.horn 11-11-2010 10:43 AM

@enine: It really looks like your Slackware installation is not complete then... :(

I did that test a few posts back on a clean box, fresh, full, stock Slackware 13.1 installation.
Run that 'grep' line GrapefruiTgirl posted and tell us the result.

enine 11-11-2010 11:17 AM

I don't know what happened, others seem missing as well, guessing maybe I missed a section during the install or something, I reinstalled the whole thing again.

niels.horn 11-11-2010 01:01 PM

Well, I hope this way it works out fine then :)

mRgOBLIN 11-11-2010 02:17 PM

Yep GD links with a few packages from X

Refer to

enine 11-11-2010 05:28 PM

Yes, worked fine after a reinstall, I don't know how I missed those packages the first time.
I still have the same php problem though but its unrelated.

niels.horn 11-11-2010 06:36 PM

Well, glad it was solved :)

All times are GMT -5. The time now is 04:24 AM.