Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't seem to get Imagick to work.
I have PHP Version 5.2.8 installed (php-fpm used toghether with nginx).

I have installed the latest ImageMagick from source.

$ convert -version
Version: ImageMagick 6.5.5-1 2009-08-25 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

I have installed imagick with the pecl installer:

$ pecl list
Package Version State
imagick 2.3.0   stable

When I try to restart the php server, I get:

Starting php_fpm PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - /usr/lib/libgomp.so.1: cannot allocate memory in static TLS block in Unknown on line 0

I am running:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.2"

Any ideas what might be causing this? Thanks.

share|improve this question

2 Answers 2

Any particular reason you wanted to make it difficult on yourself and purposely avoid the Ubuntu packaging system?

jbouse@solitare:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"

Then I installed: aptitude install imagemagick

jbouse@solitare:~$ convert --version
Version: ImageMagick 6.4.5 2009-06-04 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

Then for good measure: aptitude install php5-imagick

I now have a PHP page that watermarks my images on the fly for me and another one that allows me to upload and watermark them. I've written a Python script to submit all images in a directory to the form and save the watermarked versions in another directory.

share|improve this answer
    
I'm not trying to avoid apt-get and that is how I installed both ImageMagick and Imagick until now, but I'm having problems with the 'quantizeImage' function and I need to upgrade (not sure which of them is causing the problems, but my guess is that it's ImageMagick) –  andi Aug 25 '09 at 10:55

Turns out this was caused by a bug in gcc 4.2.
More information: mailing list discussion and bug report

After recompiling ImageMagick with the --disable-openmp flag, imagick now loads fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.